From 91aca539b44670591f4254c5e0ec94bf6f6f6ff1 Mon Sep 17 00:00:00 2001 From: Mario Castro Date: Tue, 14 Jul 2020 17:33:16 +0200 Subject: [PATCH] Add cache, rows stats and connection errors data to status metricset in MySQL module (#19844) --- CHANGELOG.next.asciidoc | 1 + metricbeat/docs/fields.asciidoc | 197 +++++++++++++++- metricbeat/module/mysql/fields.go | 2 +- .../module/mysql/status/_meta/data.json | 217 +++++++++++------- .../module/mysql/status/_meta/fields.yml | 97 +++++++- metricbeat/module/mysql/status/data.go | 30 +++ 6 files changed, 449 insertions(+), 95 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index a64c23d273d..a78735eec6f 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -570,6 +570,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Added `performance` and `query` metricsets to `mysql` module. {pull}18955[18955] - The `elasticsearch-xpack/index` metricset now reports hidden indices as such. {issue}18639[18639] {pull}18706[18706] - Adds support for app insights metrics in the azure module. {issue}18570[18570] {pull}18940[18940] +- Added cache and connection_errors metrics to status metricset of MySQL module {issue}16955[16955] {pull}19844[19844] *Packetbeat* diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index 2c9c7c00124..29ccf23b0b1 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -32345,6 +32345,153 @@ type: long The number of failed attempts to connect to the MySQL server. +type: long + +-- + +[float] +=== connection + + + + +[float] +=== errors + + + + +*`mysql.status.connection.errors.peer_address`*:: ++ +-- +The number of errors that occurred while searching for connecting client IP addresses. + +type: long + +-- + +*`mysql.status.connection.errors.accept`*:: ++ +-- +The number of errors that occurred during calls to accept() on the listening port. + +type: long + +-- + +*`mysql.status.connection.errors.internal`*:: ++ +-- +The number of connections refused due to internal errors in the server, such as failure to start a new thread or an out-of-memory condition. + + +type: long + +-- + +*`mysql.status.connection.errors.max`*:: ++ +-- +The number of connections refused because the server max_connections limit was reached. thread or an out-of-memory condition. + +type: long + +-- + +*`mysql.status.connection.errors.tcpwrap`*:: ++ +-- +The number of connections refused by the libwrap library. + +type: long + +-- + +*`mysql.status.connection.errors.select`*:: ++ +-- +The number of errors that occurred during calls to select() or poll() on the listening port. (Failure of this operation does not necessarily means a client connection was rejected.) + + +type: long + +-- + +[float] +=== cache + + + + +[float] +=== ssl + +SSL session cache hits and misses. + + +*`mysql.status.cache.ssl.hits`*:: ++ +-- +The number of SSL session cache hits. + +type: long + +-- + +*`mysql.status.cache.ssl.misses`*:: ++ +-- +The number of SSL session cache misses. + +type: long + +-- + +*`mysql.status.cache.ssl.size`*:: ++ +-- +The SSL session cache size. + +type: long + +-- + +[float] +=== table + + + + +[float] +=== open_cache + + + + +*`mysql.status.cache.table.open_cache.hits`*:: ++ +-- +The number of hits for open tables cache lookups. + +type: long + +-- + +*`mysql.status.cache.table.open_cache.misses`*:: ++ +-- +The number of misses for open tables cache lookups. + +type: long + +-- + +*`mysql.status.cache.table.open_cache.overflows`*:: ++ +-- +Number of times, after a table is opened or closed, a cache instance has an unused entry and the size of the instance is larger than table_open_cache / table_open_cache_instances + + type: long -- @@ -32737,7 +32884,7 @@ type: long *`mysql.status.handler.read.last`*:: + -- -The number of requests to read the last key in an index. +The number of requests to read the last key in an index. type: long @@ -32767,7 +32914,7 @@ type: long *`mysql.status.handler.read.rnd`*:: + -- -The number of requests to read a row based on a fixed position. +The number of requests to read a row based on a fixed position. type: long @@ -32777,7 +32924,7 @@ type: long *`mysql.status.handler.read.rnd_next`*:: + -- -The number of requests to read the next row in the data file. +The number of requests to read the next row in the data file. type: long @@ -32840,6 +32987,48 @@ type: long +[float] +=== rows + + + + +*`mysql.status.innodb.rows.reads`*:: ++ +-- +The number of rows reads into InnoDB tables. + +type: long + +-- + +*`mysql.status.innodb.rows.inserted`*:: ++ +-- +The number of rows inserted into InnoDB tables. + +type: long + +-- + +*`mysql.status.innodb.rows.deleted`*:: ++ +-- +The number of rows deleted into InnoDB tables. + +type: long + +-- + +*`mysql.status.innodb.rows.updated`*:: ++ +-- +The number of rows updated into InnoDB tables. + +type: long + +-- + [float] === buffer_pool @@ -32875,7 +33064,7 @@ type: long *`mysql.status.innodb.buffer_pool.bytes.data`*:: + -- -The total number of bytes in the InnoDB buffer pool containing data. +The total number of bytes in the InnoDB buffer pool containing data. type: long diff --git a/metricbeat/module/mysql/fields.go b/metricbeat/module/mysql/fields.go index 8b04d180f45..227a3306ea6 100644 --- a/metricbeat/module/mysql/fields.go +++ b/metricbeat/module/mysql/fields.go @@ -32,5 +32,5 @@ func init() { // AssetMysql returns asset data. // This is the base64 encoded gzipped contents of module/mysql. func AssetMysql() string { - return "eJzkXc1z2ziyv+ev6JrLZKocvbnsYVP1tsrrOLuuip2s7ey8d9K0yBaJNQgwAChF89e/QoNfkkiJ+qCct6tLbIsEft3obzSQd/BCq/eQrew3+QbACSfpPfx0v3r6x6ef3gDEZCMjcie0eg9/eQMAwN+BJbMgA9ahKyxk5IyILERaSoocxTA3OguPTt4A2FQbN420movkPcxRWnoDYEgSWnoPCb4BmAuSsX3Pc7wDhRk1uPzHrXL/qNFFXv6lA5z//M5v/Q6RVg6FsuBSqhG6FB0syRDomf92DWo9xLeCzGpS/toG1gaXoCSD08CC+tsuoP5TEzsjh62/9xDBhKzNMJyg2YqfKNfGrxbTA1rB33jESWuaTeraFGKey9XaN33U7aHEf679YBWoMOtk46EuLG08Wmva+rKCFOtiJru+3oPLf/6ul6DnjhSTLIJgGy/HSyMcvbPkAjOESkAX7p2ev9MmJgNvczQoJUnxB/oZgOZzEQlS0eqXhrxdFMmRKWooWKIFq8FKvQSnA0Gl/DTPCJdCKpLU84C+Kf2zDdIVGBMDofEM2ly68PknyoIsRFJbMn6OX8HQPPyIkBhCRwYSzL0WLIlUAIMqhjnaFg47gHdLoWK9HIV71wsymBDEwjpUEdVwmTPWMWKpl/7HSKuoMIaUk6uaS8y6Hhoq/B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vpAUOr42UKZtscEc342RZsOynO2elm8qbiwYWo353c5nfxrY/OdlbK9RYYLmh5M+yDABWSPU3sc/vQ7p+HyWkzeMVTO03i+qKpvdrC08Pej8ndV/q1Jbp3Vt8U0XMPv5Kr+zZjqgH6KC2+9wz7lml3wzndfwNjHuf589phc+8GgSnT2Q4shXmcJJ7DssQg8HExMZVZfw27ouYhRBhmocAxzUrt/DfSCiqI/cQUX41nZplBumlgXsuyKQSfsbNV4RmsaGVUCKSZ1KSERhmK/XfjxRNjnA2THq/9dAf0YzLD1D9dtp0TYHPVokmSlMPPMk6uN8LwKzcMJs62omwfN0WBGjkx7nMGcWqJw0cW8zHttskBmaKCGfvUafi6x8noa1TqBX1NS1TcUUdIUn7QpDyHwLwHNqWzHglgSluae/SRcoJA4lXRVjROiBwtWZ7QWmIRCO9+ij9VRznBevb2+M+9MpWW3VtXwwP/aut+k/EVDsuFWsWH6hNkU7VSF50pNbdwyaSHRoezS5zT/fwAAAP//t0fTvw==" } diff --git a/metricbeat/module/mysql/status/_meta/data.json b/metricbeat/module/mysql/status/_meta/data.json index 09c4e618c20..d4bba333e0e 100644 --- a/metricbeat/module/mysql/status/_meta/data.json +++ b/metricbeat/module/mysql/status/_meta/data.json @@ -1,41 +1,105 @@ { - "@timestamp": "2017-10-12T08:05:34.853Z", - "event": { - "dataset": "mysql.status", - "duration": 115000, - "module": "mysql" + "@timestamp": "2020-07-13T16:36:00.626Z", + "@metadata": { + "beat": "metricbeat", + "type": "_doc", + "version": "8.0.0" }, - "metricset": { - "name": "status" + "agent": { + "version": "8.0.0", + "ephemeral_id": "d9d0d455-c440-453e-aea3-3b6fa512f6f3", + "id": "803dfdba-e638-4590-a2de-80cb1cebe78d", + "name": "mcastro", + "type": "metricbeat" }, "mysql": { "status": { - "aborted": { - "clients": 3, - "connects": 4 + "connections": 28, + "threads": { + "running": 2, + "cached": 1, + "created": 4, + "connected": 3 }, - "binlog": { - "cache": { - "disk_use": 0, - "use": 0 + "innodb": { + "rows": { + "updated": 0, + "deleted": 0, + "inserted": 0, + "reads": 0 + }, + "buffer_pool": { + "write_requests": 1634, + "bytes": { + "data": 15908864, + "dirty": 0 + }, + "pages": { + "data": 971, + "dirty": 0, + "flushed": 144, + "free": 7216, + "misc": 5, + "total": 8192 + }, + "read": { + "requests": 15600, + "ahead": 0, + "ahead_evicted": 0, + "ahead_rnd": 0 + }, + "pool": { + "reads": 830, + "wait_free": 0 + } } }, - "bytes": { - "received": 1272, - "sent": 47735 - }, - "command": { + "handler": { + "update": 315, + "read": { + "rnd_next": 394983, + "first": 33, + "key": 2100, + "last": 0, + "next": 4533, + "prev": 0, + "rnd": 2494 + }, + "write": 168505, + "mrr_init": 0, "delete": 0, - "insert": 0, - "select": 1, - "update": 0 + "external_lock": 8167, + "savepoint_rollback": 0, + "rollback": 0, + "commit": 625, + "savepoint": 0, + "prepare": 0 + }, + "bytes": { + "sent": 6228481, + "received": 143324 }, - "connections": 12, "created": { "tmp": { + "tables": 364, "disk_tables": 0, - "files": 5, - "tables": 6 + "files": 5 + } + }, + "binlog": { + "cache": { + "disk_use": 0, + "use": 0 + } + }, + "connection": { + "errors": { + "max": 0, + "peer_address": 0, + "select": 0, + "tcpwrap": 0, + "accept": 0, + "internal": 0 } }, "delayed": { @@ -43,74 +107,59 @@ "insert_threads": 0, "writes": 0 }, - "flush_commands": 1, - "handler": { - "commit": 0, - "delete": 0, - "external_lock": 140, - "mrr_init": 0, - "prepare": 0, - "read": { - "first": 3, - "key": 2, - "last": 0, - "next": 32, - "prev": 0, - "rnd": 0, - "rnd_next": 1728 - }, - "rollback": 0, - "savepoint": 0, - "savepoint_rollback": 0, + "max_used_connections": 4, + "opened_tables": 195, + "queries": 1183, + "flush_commands": 3, + "command": { + "insert": 0, + "select": 705, "update": 0, - "write": 1705 + "delete": 0 }, - "innodb": { - "buffer_pool": { - "bytes": { - "data": 6914048, - "dirty": 0 - }, - "pages": { - "data": 422, - "dirty": 0, - "flushed": 207, - "free": 7768, - "misc": 1, - "total": 8191 - }, - "pool": { - "reads": 423, - "wait_free": 0 - }, - "read": { - "ahead": 0, - "ahead_evicted": 0, - "ahead_rnd": 0, - "requests": 14198 - }, - "write_requests": 207 + "aborted": { + "clients": 0, + "connects": 2 + }, + "cache": { + "table": { + "open_cache": { + "hits": 3889, + "misses": 195, + "overflows": 0 + } + }, + "ssl": { + "size": 128, + "hits": 0, + "misses": 0 } }, - "max_used_connections": 3, + "questions": 1173, "open": { - "files": 16, "streams": 0, - "tables": 60 - }, - "opened_tables": 67, - "queries": 10, - "questions": 9, - "threads": { - "cached": 0, - "connected": 3, - "created": 3, - "running": 1 + "tables": 116, + "files": 2 } } }, + "event": { + "dataset": "mysql.status", + "module": "mysql", + "duration": 1871014 + }, + "metricset": { + "name": "status", + "period": 10000 + }, "service": { - "address": "127.0.0.1:3306", + "address": "172.17.0.2:3306", "type": "mysql" + }, + "ecs": { + "version": "1.5.0" + }, + "host": { + "name": "mcastro" } -} \ No newline at end of file +} diff --git a/metricbeat/module/mysql/status/_meta/fields.yml b/metricbeat/module/mysql/status/_meta/fields.yml index 56fd1580b0f..74cd2f54e7f 100644 --- a/metricbeat/module/mysql/status/_meta/fields.yml +++ b/metricbeat/module/mysql/status/_meta/fields.yml @@ -19,6 +19,75 @@ description: > The number of failed attempts to connect to the MySQL server. + - name: connection + type: group + description: > + fields: + - name: errors + type: group + description: > + fields: + - name: peer_address + type: long + description: The number of errors that occurred while searching for connecting client IP addresses. + - name: accept + type: long + description: The number of errors that occurred during calls to accept() on the listening port. + - name: internal + type: long + description: > + The number of connections refused due to internal errors in the server, such as failure to start a new + thread or an out-of-memory condition. + - name: max + type: long + description: The number of connections refused because the server max_connections limit was reached. + thread or an out-of-memory condition. + - name: tcpwrap + type: long + description: The number of connections refused by the libwrap library. + - name: select + type: long + description: > + The number of errors that occurred during calls to select() or poll() on the listening port. + (Failure of this operation does not necessarily means a client connection was rejected.) + + - name: cache + type: group + description: > + fields: + - name: ssl + type: group + description: SSL session cache hits and misses. + fields: + - name: hits + type: long + description: The number of SSL session cache hits. + - name: misses + type: long + description: The number of SSL session cache misses. + - name: size + type: long + description: The SSL session cache size. + - name: table + type: group + description: > + fields: + - name: open_cache + type: group + description: > + fields: + - name: hits + type: long + description: The number of hits for open tables cache lookups. + - name: misses + type: long + description: The number of misses for open tables cache lookups. + - name: overflows + type: long + description: > + Number of times, after a table is opened or closed, a cache instance has an unused entry and the + size of the instance is larger than table_open_cache / table_open_cache_instances + - name: binlog type: group description: > @@ -217,7 +286,7 @@ - name: last type: long description: > - The number of requests to read the last key in an index. + The number of requests to read the last key in an index. - name: next type: long @@ -232,12 +301,12 @@ - name: rnd type: long description: > - The number of requests to read a row based on a fixed position. + The number of requests to read a row based on a fixed position. - name: rnd_next type: long description: > - The number of requests to read the next row in the data file. + The number of requests to read the next row in the data file. - name: rollback type: long @@ -264,10 +333,26 @@ description: > The number of requests to insert a row in a table. - - name: innodb + - name: innodb type: group description: > fields: + - name: rows + type: group + description: > + fields: + - name: reads + type: long + description: The number of rows reads into InnoDB tables. + - name: inserted + type: long + description: The number of rows inserted into InnoDB tables. + - name: deleted + type: long + description: The number of rows deleted into InnoDB tables. + - name: updated + type: long + description: The number of rows updated into InnoDB tables. - name: buffer_pool type: group description: > @@ -289,7 +374,7 @@ - name: data type: long description: > - The total number of bytes in the InnoDB buffer pool containing data. + The total number of bytes in the InnoDB buffer pool containing data. - name: dirty type: long @@ -381,4 +466,4 @@ - name: write_requests type: long description: > - The number of writes done to the InnoDB buffer pool. \ No newline at end of file + The number of writes done to the InnoDB buffer pool. diff --git a/metricbeat/module/mysql/status/data.go b/metricbeat/module/mysql/status/data.go index de1f9579e95..ab55a47e450 100644 --- a/metricbeat/module/mysql/status/data.go +++ b/metricbeat/module/mysql/status/data.go @@ -125,6 +125,36 @@ var ( }, "write_requests": c.Int("Innodb_buffer_pool_write_requests"), }, + "rows": s.Object{ + "reads": c.Int("Innodb_rows_read"), + "updated": c.Int("Innodb_rows_updated"), + "deleted": c.Int("Innodb_rows_deleted"), + "inserted": c.Int("Innodb_rows_inserted"), + }, + }, + "cache": s.Object{ + "table": s.Object{ + "open_cache": s.Object{ + "hits": c.Int("Table_open_cache_hits"), + "misses": c.Int("Table_open_cache_misses"), + "overflows": c.Int("Table_open_cache_overflows"), + }, + }, + "ssl": s.Object{ + "hits": c.Int("Ssl_session_cache_hits"), + "misses": c.Int("Ssl_session_cache_misses"), + "size": c.Int("Ssl_session_cache_size"), + }, + }, + "connection": s.Object{ + "errors": s.Object{ + "accept": c.Int("Connection_errors_accept"), + "internal": c.Int("Connection_errors_internal"), + "max": c.Int("Connection_errors_max_connections"), + "peer_address": c.Int("Connection_errors_peer_address"), + "select": c.Int("Connection_errors_select"), + "tcpwrap": c.Int("Connection_errors_tcpwrap"), + }, }, } )