diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 54b17c7fb5e0..6d42ee36d061 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -135,6 +135,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add support for ssl_request_log in apache2 module. {issue}8088[8088] {pull}9833[9833] - Add support for iis 7.5 log format. {issue}9753[9753] {pull}9967[9967] - Add service.type field to all Modules. By default the field is set with the module name. It can be overwritten with `service.type` config. {pull}10042[10042] +- Add support for MariaDB in the `slowlog` fileset of `mysql` module. {pull}9731[9731] - Elasticsearch module's slowlog now populates `event.duration` (ECS). {pull}9293[9293] - HAProxy module now populates `event.duration` and `http.response.bytes` (ECS). {pull}10143[10143] diff --git a/filebeat/docs/fields.asciidoc b/filebeat/docs/fields.asciidoc index a18125d75056..9711da595ff3 100644 --- a/filebeat/docs/fields.asciidoc +++ b/filebeat/docs/fields.asciidoc @@ -6409,6 +6409,16 @@ 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.timestamp`*:: @@ -6434,7 +6444,117 @@ The slow query. -- type: long -The connection ID for the query. +The connection or thread ID for the query. + + +-- + +*`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.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.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. -- diff --git a/filebeat/docs/modules/mysql.asciidoc b/filebeat/docs/modules/mysql.asciidoc index f99f1ee39ef3..703effc24a40 100644 --- a/filebeat/docs/modules/mysql.asciidoc +++ b/filebeat/docs/modules/mysql.asciidoc @@ -16,7 +16,8 @@ include::../include/what-happens.asciidoc[] [float] === Compatibility -The +{modulename}+ module was tested with logs from versions 5.5 and 5.7. +The +{modulename}+ module was tested with logs from MySQL 5.5 and 5.7 and +MariaDB 10.1 and 10.2. On Windows, the module was tested with MySQL installed from the Chocolatey repository. diff --git a/filebeat/module/mysql/_meta/docs.asciidoc b/filebeat/module/mysql/_meta/docs.asciidoc index a4de39e5a8d0..c54601fbff9d 100644 --- a/filebeat/module/mysql/_meta/docs.asciidoc +++ b/filebeat/module/mysql/_meta/docs.asciidoc @@ -11,7 +11,8 @@ include::../include/what-happens.asciidoc[] [float] === Compatibility -The +{modulename}+ module was tested with logs from versions 5.5 and 5.7. +The +{modulename}+ module was tested with logs from MySQL 5.5 and 5.7 and +MariaDB 10.1 and 10.2. On Windows, the module was tested with MySQL installed from the Chocolatey repository. diff --git a/filebeat/module/mysql/fields.go b/filebeat/module/mysql/fields.go index ab5fe57e6c7f..2ac249397f25 100644 --- a/filebeat/module/mysql/fields.go +++ b/filebeat/module/mysql/fields.go @@ -31,5 +31,5 @@ func init() { // Asset returns asset data func Asset() string { - return "eJy0lMFu2zwMgO95CqLn1g/gw3/5twED1sPQ3lPGpm0hMumKUlK//SA7izNHyep05dEK+X1UKD7Alvoc2l5f7QrAG28ph7vH/unnj7sVQElaONN5I5zDfysAgEcpgyWoxEGHTg3X4BuCIQWs1FAZS5qtALQR59eFcGXqHLwLtAKoDNlS86HUAzC2NOFj+L6jHGonoTt8STjE+DYUgspJe0kgxinvlEnOiTt+TXGvsGP8L+zRsB4Ic5GhftQ5mqRsTo28aUk9tt0fp1cdYjw3NKVOFvEirGGa6Glo4wjLtSlndcfrQGtQZycd+iaHzklBqtmYn53lt6Z2OCof/vhztqUd2YVcK3WWynsPryVVrGkhMZ11ifebpVb2VupPHLBIWDRfr4Fcv46jkikVyVuorKC/YfzEox2GcPAbQOBFtvdgGJQK4VLvARVwRMSl0YlhDxzaDbksPR9SbD/FF1sJ7EGqufMejady2G3jGyq24AU2BLhDY3FjKYsVzqru0AYCox/q18le10o872js1QrXy1sdebHVWB0c+eCYStj0U9tXbOgNW8OU3g7/xEgL5PcJXdqPH5EJbN5OtqfHLfH00F6evj5Ppy/X5Iaj5fzhEV8pe2Ev39ZsIcxUxF/A9y/HIZ/RkxpByS1cmzEli9k3LOpGNP0GLuNUgisoK6VFwzcgTXqq/go8y5vDfgUAAP//9N14WQ==" + return "eJy0l8GO4zYMhu95CmJPLbCbB8ihl2kLFOgWKHaBHr2MRNtsZNEjycmkT19QTuJsYmcm2bEOc4iG/D9SIil/gg3tV9Ds47NbACROjlbw4fP+y99/flgAWIomcJtY/Ap+WQAAfBbbOYJSArQYIvsKUk2QTcBJBSU7issFQKwlpMKIL7laQQodLQBKJmfjKrv6BB4bGuR1pX1LK6iCdO3hlxEGXb9nR1AGaaYAdJ3rnWtSCBJOv47p3tDW9SQ+Ift4ULgEyf4V50QyRnNOlLihmLBpv9u9yaDra02D6UChiXDsaVAfF60DoS3YXvjt04GOMV7stJjqFbRBDMW47O2XV/YNVwF75MPBX2s72pK7U9dJtRyze4teQzFiRXcqjltN6R21opOdk2rGC6YKd92v547CvtCrsoxkRrNQOsH0wPWThC5fwsyXhSCJbD4Ce4hkxNv4ETAC9hLaNFphn8B3zZrCcvx+iNnMwouNdD6BlJfMO+RENve2vobMBpLAmgC3yA7Xjpbq4crrFl1HwPGH4g2yi0UkfxlRH6sTX90faq+noap3CJS64MnCej+EfYOGXrBhT+Pd4V2IokF/BxCWJZk0J1Ajlkt+E9FUx/4Rms7zy1k/T7ghP5T+ty+/fR12v92Cy1v36+e2csPtxKR4LFgj3pPR/4BccjpL4I9fTwV4gyOamhocZdnQfifhkvMtsWefsKsp9F1hSAbsMAK9kOkS2XEi04VAPhVdpPB+XE+9V8Au1eQTG9QOpRof9a/V/mQpUdA6BTQ6laENvGVHFcUlPKEHy2VJYbhGfbvSLKujV54I/dwwaGoqah5vTmsRR+jvC+2fmlJNZycNWSSnuuY0UXNNWyRtxO/PgZCoaSWgTi+VyCTHJAeK4rb0ak848hXiC8txM2e+PJFVuu+xI4geedyME+bnsYQZDvLoGaRN3PB/+YF0SuJtmvnSdZsK0Fvg9Fgq28ASOO2L5466WW7kUQGywkCttXsMbCKxnXOFTtc5sNT5oUZUInMdMnjs3a8Nksz3r/B8fOr8Nhn85AXYW3qhCDvt+qfkqnH8eRy9oVBR0WKMdPnN8Og0/Ov0CMnOoXd+mjhTE3EUb3IATX/k5DGg1g98VtUSx3vJtFyULhhaWmnw6vzfIsnjL65XBa/sLsX+DwAA///cNZmy" } diff --git a/filebeat/module/mysql/slowlog/_meta/fields.yml b/filebeat/module/mysql/slowlog/_meta/fields.yml index c6b4a2ac5a2e..64abf9085c3e 100644 --- a/filebeat/module/mysql/slowlog/_meta/fields.yml +++ b/filebeat/module/mysql/slowlog/_meta/fields.yml @@ -20,6 +20,10 @@ type: long description: > The number of rows scanned by the query. + - name: rows_affected + type: long + description: > + The number of rows modified by the query. - name: timestamp type: long description: > @@ -30,7 +34,52 @@ - name: id type: long description: > - The connection ID for the query. + The connection or thread ID for the query. + - name: schema + type: keyword + description: > + The schema where the slow query was executed. + - name: current_user + type: keyword + description: > + Current authenticated user, used to determine access privileges. Can differ from the value for user. + + - name: query_cache_hit + type: boolean + description: > + Whether the query cache was hit. + - name: tmp_table + type: boolean + description: > + Whether a temporary table was used to resolve the query. + - name: tmp_table_on_disk + type: boolean + description: > + Whether the query needed temporary tables on disk. + - name: filesort + type: boolean + description: > + Whether filesort optimization was used. + - name: filesort_on_disk + type: boolean + description: > + Whether filesort optimization was used and it needed temporary tables on disk. + - name: priority_queue + type: boolean + description: > + Whether a priority queue was used for filesort. + - name: full_scan + type: boolean + description: > + Whether a full table scan was needed for the slow query. + - name: full_join + type: boolean + description: > + Whether a full join was needed for the slow query (no indexes were used for joins). + - name: merge_passes + type: long + description: > + Number of merge passes executed for the query. - name: user type: alias diff --git a/filebeat/module/mysql/slowlog/ingest/pipeline.json b/filebeat/module/mysql/slowlog/ingest/pipeline.json index c8287e947c7a..0f9e224d5cc1 100644 --- a/filebeat/module/mysql/slowlog/ingest/pipeline.json +++ b/filebeat/module/mysql/slowlog/ingest/pipeline.json @@ -4,10 +4,12 @@ "grok": { "field": "message", "patterns":[ - "^# User@Host: %{USER:user.name}(\\[[^\\]]+\\])? @ (%{HOSTNAME:source.domain})? \\[(%{IP:source.ip})?\\](\\s*Id:\\s* %{NUMBER:mysql.slowlog.id:long})?\n# Query_time: %{NUMBER:mysql.slowlog.query_time.sec:float}\\s* Lock_time: %{NUMBER:mysql.slowlog.lock_time.sec:float}\\s* Rows_sent: %{NUMBER:mysql.slowlog.rows_sent:long}\\s* Rows_examined: %{NUMBER:mysql.slowlog.rows_examined:long}\n(SET timestamp=%{NUMBER:mysql.slowlog.timestamp:long};\n)?%{GREEDYMULTILINE:mysql.slowlog.query}" + "^# User@Host: %{USER:user.name}(\\[%{USER:mysql.slowlog.current_user}\\])? @ %{HOSTNAME:source.domain}? \\[%{IP:source.ip}?\\](\\s*Id:\\s* %{NUMBER:mysql.slowlog.id:long})?\n(# Thread_id:%{SPACE}%{NUMBER:mysql.slowlog.id}%{METRICSPACE}Schema: %{WORD:mysql.slowlog.schema}?%{METRICSPACE}QC_hit: %{WORD:mysql.slowlog.query_cache_hit}\n)?%{METRICSPACE}Query_time: %{NUMBER:mysql.slowlog.query_time.sec:float}%{METRICSPACE}Lock_time: %{NUMBER:mysql.slowlog.lock_time.sec:float}%{METRICSPACE}Rows_sent: %{NUMBER:mysql.slowlog.rows_sent:long}%{METRICSPACE}Rows_examined: %{NUMBER:mysql.slowlog.rows_examined:long}%{METRICSPACE}(Rows_affected: %{NUMBER:mysql.slowlog.rows_affected:long}%{METRICSPACE})?(Full_scan: %{WORD:mysql.slowlog.full_scan}%{METRICSPACE})?(Full_join: %{WORD:mysql.slowlog.full_join}%{METRICSPACE})?(Tmp_table: %{WORD:mysql.slowlog.tmp_table}%{METRICSPACE})?(Tmp_table_on_disk: %{WORD:mysql.slowlog.tmp_table_on_disk}%{METRICSPACE})?(Filesort: %{WORD:mysql.slowlog.filesort}%{METRICSPACE})?(Filesort_on_disk: %{WORD:mysql.slowlog.filesort_on_disk}%{METRICSPACE})?(Merge_passes: %{NUMBER:mysql.slowlog.merge_passes}%{METRICSPACE})?(Priority_queue: %{WORD:mysql.slowlog.priority_queue}%{METRICSPACE})?%{EXPLAIN}?(use %{WORD:mysql.slowlog.schema};\n)?SET timestamp=%{NUMBER:mysql.slowlog.timestamp:long};\n%{GREEDYMULTILINE:mysql.slowlog.query}" ], "pattern_definitions" : { - "GREEDYMULTILINE" : "(.|\n)*" + "GREEDYMULTILINE": "(.|\n)*", + "METRICSPACE": "([ #\n]*)", + "EXPLAIN": "(# explain:.*\n|#\\s*\n)*" }, "ignore_missing": true } @@ -15,6 +17,27 @@ "remove":{ "field": "message" } + }, { + "script": { + "lang": "painless", + "source": "for (field in params.fields) { def v = ctx.mysql.slowlog.get(field); if (v != null) { ctx.mysql.slowlog.put(field, params.mapping.get(v)) } }", + "params": { + "mapping": { + "Yes": true, + "No": false + }, + "fields": [ + "query_cache_hit", + "tmp_table", + "tmp_table_on_disk", + "filesort", + "filesort_on_disk", + "priority_queue", + "full_scan", + "full_join" + ] + } + } }, { "script":{ "lang": "painless", diff --git a/filebeat/module/mysql/slowlog/test/mariadb-10.1.21.log b/filebeat/module/mysql/slowlog/test/mariadb-10.1.21.log new file mode 100644 index 000000000000..a451c6b7e404 --- /dev/null +++ b/filebeat/module/mysql/slowlog/test/mariadb-10.1.21.log @@ -0,0 +1,6 @@ +# Time: 180613 11:04:36 +# User@Host: root[root] @ localhost [121.0.0.1] +# Thread_id: 5 Schema: QC_hit: No +# Query_time: 2.000652 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0 +SET timestamp=1528898676; +select sleep(2); diff --git a/filebeat/module/mysql/slowlog/test/mariadb-10.1.21.log-expected.json b/filebeat/module/mysql/slowlog/test/mariadb-10.1.21.log-expected.json new file mode 100644 index 000000000000..bbeb18701128 --- /dev/null +++ b/filebeat/module/mysql/slowlog/test/mariadb-10.1.21.log-expected.json @@ -0,0 +1,28 @@ +[ + { + "@timestamp": "2018-06-13T14:04:36.000Z", + "ecs.version": "1.0.0-beta2", + "event.dataset": "mysql.slowlog", + "event.duration": 2000652000, + "event.module": "mysql", + "fileset.name": "slowlog", + "input.type": "log", + "log.flags": [ + "multiline" + ], + "log.offset": 24, + "mysql.slowlog.current_user": "root", + "mysql.slowlog.id": "5", + "mysql.slowlog.lock_time.sec": 0.0, + "mysql.slowlog.query": "select sleep(2);", + "mysql.slowlog.query_cache_hit": false, + "mysql.slowlog.query_time.sec": 2.000652, + "mysql.slowlog.rows_examined": 0, + "mysql.slowlog.rows_sent": 1, + "mysql.slowlog.timestamp": 1528898676, + "service.type": "mysql", + "source.domain": "localhost", + "source.ip": "121.0.0.1", + "user.name": "root" + } +] \ No newline at end of file diff --git a/filebeat/module/mysql/slowlog/test/mariadb-10.2.12.log b/filebeat/module/mysql/slowlog/test/mariadb-10.2.12.log new file mode 100644 index 000000000000..36b01fb6d675 --- /dev/null +++ b/filebeat/module/mysql/slowlog/test/mariadb-10.2.12.log @@ -0,0 +1,23 @@ +mysqld, Version: 10.2.12-MariaDB-10.2.12+maria~jessie-log (mariadb.org binary distribution). started with: +Tcp port: 0 Unix socket: /var/run/mysqld/mysqld.sock +Time Id Command Argument +mysqld, Version: 10.2.12-MariaDB-10.2.12+maria~jessie-log (mariadb.org binary distribution). started with: +Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock +Time Id Command Argument +# Time: 190117 16:04:03 +# User@Host: root[root] @ localhost [] +# Thread_id: 8 Schema: QC_hit: No +# Query_time: 2.000227 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0 +# Rows_affected: 0 +SET timestamp=1547741043; +select sleep(2) +AS foo; +# Time: 190117 16:04:18 +# User@Host: root[root] @ [192.168.0.10] +# Thread_id: 25844 Schema: blah QC_hit: No +# Query_time: 178.306017 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 53022772 +# Rows_affected: 3062 +# Full_scan: Yes Full_join: No Tmp_table: Yes Tmp_table_on_disk: No +# Filesort: Yes Filesort_on_disk: No Merge_passes: 0 Priority_queue: No +SET timestamp=1547741058; +call PROC('blah'); diff --git a/filebeat/module/mysql/slowlog/test/mariadb-10.2.12.log-expected.json b/filebeat/module/mysql/slowlog/test/mariadb-10.2.12.log-expected.json new file mode 100644 index 000000000000..8517b4a6fda8 --- /dev/null +++ b/filebeat/module/mysql/slowlog/test/mariadb-10.2.12.log-expected.json @@ -0,0 +1,63 @@ +[ + { + "@timestamp": "2019-01-17T16:04:03.000Z", + "ecs.version": "1.0.0-beta2", + "event.dataset": "mysql.slowlog", + "event.duration": 2000227000, + "event.module": "mysql", + "fileset.name": "slowlog", + "input.type": "log", + "log.flags": [ + "multiline" + ], + "log.offset": 437, + "mysql.slowlog.current_user": "root", + "mysql.slowlog.id": "8", + "mysql.slowlog.lock_time.sec": 0.0, + "mysql.slowlog.query": "select sleep(2)\nAS foo;", + "mysql.slowlog.query_cache_hit": false, + "mysql.slowlog.query_time.sec": 2.000227, + "mysql.slowlog.rows_affected": 0, + "mysql.slowlog.rows_examined": 0, + "mysql.slowlog.rows_sent": 1, + "mysql.slowlog.timestamp": 1547741043, + "service.type": "mysql", + "source.domain": "localhost", + "user.name": "root" + }, + { + "@timestamp": "2019-01-17T16:04:18.000Z", + "ecs.version": "1.0.0-beta2", + "event.dataset": "mysql.slowlog", + "event.duration": 178306016000, + "event.module": "mysql", + "fileset.name": "slowlog", + "input.type": "log", + "log.flags": [ + "multiline" + ], + "log.offset": 682, + "mysql.slowlog.current_user": "root", + "mysql.slowlog.filesort": true, + "mysql.slowlog.filesort_on_disk": false, + "mysql.slowlog.full_join": false, + "mysql.slowlog.full_scan": true, + "mysql.slowlog.id": "25844", + "mysql.slowlog.lock_time.sec": 0.0, + "mysql.slowlog.merge_passes": "0", + "mysql.slowlog.priority_queue": false, + "mysql.slowlog.query": "call PROC('blah');", + "mysql.slowlog.query_cache_hit": false, + "mysql.slowlog.query_time.sec": 178.30602, + "mysql.slowlog.rows_affected": 3062, + "mysql.slowlog.rows_examined": 53022772, + "mysql.slowlog.rows_sent": 0, + "mysql.slowlog.schema": "blah", + "mysql.slowlog.timestamp": 1547741058, + "mysql.slowlog.tmp_table": true, + "mysql.slowlog.tmp_table_on_disk": false, + "service.type": "mysql", + "source.ip": "192.168.0.10", + "user.name": "root" + } +] \ No newline at end of file diff --git a/filebeat/module/mysql/slowlog/test/mariadb-explain.log b/filebeat/module/mysql/slowlog/test/mariadb-explain.log new file mode 100644 index 000000000000..26bb97b449ce --- /dev/null +++ b/filebeat/module/mysql/slowlog/test/mariadb-explain.log @@ -0,0 +1,15 @@ +# Time: 131112 17:03:32 +# User@Host: root[root] @ localhost [] +# Thread_id: 2 Schema: dbt3sf1 QC_hit: No +# Query_time: 5.524103 Lock_time: 0.000337 Rows_sent: 1 Rows_examined: 65633 +# +# explain: id select_type table type possible_keys key key_len ref rows Extra +# explain: 1 SIMPLE nation ref PRIMARY,n_name n_name 26 const 1 Using where; Using index +# explain: 1 SIMPLE customer ref PRIMARY,i_c_nationkey i_c_nationkey 5 dbt3sf1.nation.n_nationkey 3145 Using index +# explain: 1 SIMPLE orders ref i_o_custkey i_o_custkey 5 dbt3sf1.customer.c_custkey 7 Using index +# +SET timestamp=1384261412; +select count(*) from customer, orders, nation + where c_custkey=o_custkey + and c_nationkey=n_nationkey + and n_name='GERMANY'; diff --git a/filebeat/module/mysql/slowlog/test/mariadb-explain.log-expected.json b/filebeat/module/mysql/slowlog/test/mariadb-explain.log-expected.json new file mode 100644 index 000000000000..562e9317c927 --- /dev/null +++ b/filebeat/module/mysql/slowlog/test/mariadb-explain.log-expected.json @@ -0,0 +1,28 @@ +[ + { + "@timestamp": "2013-11-12T13:03:32.000Z", + "ecs.version": "1.0.0-beta2", + "event.dataset": "mysql.slowlog", + "event.duration": 5524103000, + "event.module": "mysql", + "fileset.name": "slowlog", + "input.type": "log", + "log.flags": [ + "multiline" + ], + "log.offset": 24, + "mysql.slowlog.current_user": "root", + "mysql.slowlog.id": "2", + "mysql.slowlog.lock_time.sec": 0.000337, + "mysql.slowlog.query": "select count(*) from customer, orders, nation\n where c_custkey=o_custkey\n and c_nationkey=n_nationkey\n and n_name='GERMANY';", + "mysql.slowlog.query_cache_hit": false, + "mysql.slowlog.query_time.sec": 5.524103, + "mysql.slowlog.rows_examined": 65633, + "mysql.slowlog.rows_sent": 1, + "mysql.slowlog.schema": "dbt3sf1", + "mysql.slowlog.timestamp": 1384261412, + "service.type": "mysql", + "source.domain": "localhost", + "user.name": "root" + } +] \ No newline at end of file diff --git a/filebeat/module/mysql/slowlog/test/mysql-5.7.22.log-expected.json b/filebeat/module/mysql/slowlog/test/mysql-5.7.22.log-expected.json index 3ff2200ff9a9..1c675dd94c2b 100644 --- a/filebeat/module/mysql/slowlog/test/mysql-5.7.22.log-expected.json +++ b/filebeat/module/mysql/slowlog/test/mysql-5.7.22.log-expected.json @@ -11,6 +11,7 @@ "multiline" ], "log.offset": 41, + "mysql.slowlog.current_user": "root", "mysql.slowlog.id": 7234, "mysql.slowlog.lock_time.sec": 0.0, "mysql.slowlog.query": "select sleep(15);", @@ -34,6 +35,7 @@ "multiline" ], "log.offset": 254, + "mysql.slowlog.current_user": "debian-sys-maint", "mysql.slowlog.lock_time.sec": 6.1e-05, "mysql.slowlog.query": "SELECT count(*) FROM mysql.user WHERE user='root' and password='';", "mysql.slowlog.query_time.sec": 0.000153, @@ -56,6 +58,7 @@ "multiline" ], "log.offset": 526, + "mysql.slowlog.current_user": "appuser", "mysql.slowlog.id": 10997316, "mysql.slowlog.lock_time.sec": 0.000212, "mysql.slowlog.query": "SELECT mcu.mcu_guid, mcu.cus_guid, mcu.mcu_url, mcu.mcu_crawlelements, mcu.mcu_order, GROUP_CONCAT(mca.mca_guid SEPARATOR \";\") as mca_guid\n FROM kat_mailcustomerurl mcu, kat_customer cus, kat_mailcampaign mca\n WHERE cus.cus_guid = mcu.cus_guid\n AND cus.pro_code = 'CYB'\n AND cus.cus_offline = 0\n AND mca.cus_guid = cus.cus_guid\n AND (mcu.mcu_date IS NULL OR mcu.mcu_date < CURDATE())\n AND mcu.mcu_crawlelements IS NOT NULL\n GROUP BY mcu.mcu_guid\n ORDER BY mcu.mcu_order ASC\n LIMIT 1000;", @@ -80,6 +83,7 @@ "multiline" ], "log.offset": 1438, + "mysql.slowlog.current_user": "appuser", "mysql.slowlog.id": 10999834, "mysql.slowlog.lock_time.sec": 3.6e-05, "mysql.slowlog.query": "call load_stats(1, '2017-04-28 00:00:00');",