MySQL fields

edit

Module for parsing the MySQL log files.

mysql fields

edit

Fields from the MySQL log files.

mysql.thread_id

type: long

The connection or thread ID for the query.

error fields

edit

Contains fields from the MySQL error logs.

mysql.error.thread_id

type: alias

alias to: mysql.thread_id

mysql.error.level

type: alias

alias to: log.level

mysql.error.message

type: alias

alias to: message

slowlog fields

edit

Contains fields from the MySQL slow logs.

mysql.slowlog.lock_time.sec

type: float

The amount of time the query waited for the lock to be available. The value is in seconds, as a floating point number.

mysql.slowlog.rows_sent

type: long

The number of rows returned by the query.

mysql.slowlog.rows_examined

type: long

The number of rows scanned by the query.

mysql.slowlog.rows_affected

type: long

The number of rows modified by the query.

mysql.slowlog.bytes_sent

type: long

format: bytes

The size of the query result.

mysql.slowlog.query

The slow query.

mysql.slowlog.id

type: alias

alias to: mysql.thread_id

mysql.slowlog.schema

type: keyword

The schema where the slow query was executed.

mysql.slowlog.current_user

type: keyword

Current authenticated user, used to determine access privileges. Can differ from the value for user.

mysql.slowlog.last_errno

type: keyword

Last SQL error seen.

mysql.slowlog.killed

type: keyword

Code of the reason if the query was killed.

mysql.slowlog.query_cache_hit

type: boolean

Whether the query cache was hit.

mysql.slowlog.tmp_table

type: boolean

Whether a temporary table was used to resolve the query.

mysql.slowlog.tmp_table_on_disk

type: boolean

Whether the query needed temporary tables on disk.

mysql.slowlog.tmp_tables

type: long

Number of temporary tables created for this query

mysql.slowlog.tmp_disk_tables

type: long

Number of temporary tables created on disk for this query.

mysql.slowlog.tmp_table_sizes

type: long

format: bytes

Size of temporary tables created for this query.

mysql.slowlog.filesort

type: boolean

Whether filesort optimization was used.

mysql.slowlog.filesort_on_disk

type: boolean

Whether filesort optimization was used and it needed temporary tables on disk.

mysql.slowlog.priority_queue

type: boolean

Whether a priority queue was used for filesort.

mysql.slowlog.full_scan

type: boolean

Whether a full table scan was needed for the slow query.

mysql.slowlog.full_join

type: boolean

Whether a full join was needed for the slow query (no indexes were used for joins).

mysql.slowlog.merge_passes

type: long

Number of merge passes executed for the query.

mysql.slowlog.log_slow_rate_type

type: keyword

Type of slow log rate limit, it can be session if the rate limit is applied per session, or query if it applies per query.

mysql.slowlog.log_slow_rate_limit

type: keyword

Slow log rate limit, a value of 100 means that one in a hundred queries or sessions are being logged.

innodb fields

edit

Contains fields relative to InnoDB engine

mysql.slowlog.innodb.trx_id

type: keyword

Transaction ID

mysql.slowlog.innodb.io_r_ops

type: long

Number of page read operations.

mysql.slowlog.innodb.io_r_bytes

type: long

format: bytes

Bytes read during page read operations.

mysql.slowlog.innodb.io_r_wait.sec

type: long

How long it took to read all needed data from storage.

mysql.slowlog.innodb.rec_lock_wait.sec

type: long

How long the query waited for locks.

mysql.slowlog.innodb.queue_wait.sec

type: long

How long the query waited to enter the InnoDB queue and to be executed once in the queue.

mysql.slowlog.innodb.pages_distinct

type: long

Approximated count of pages accessed to execute the query.

mysql.slowlog.user

type: alias

alias to: user.name

mysql.slowlog.host

type: alias

alias to: source.domain

mysql.slowlog.ip

type: alias

alias to: source.ip