diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:45:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:45:55 +0000 |
commit | a8220ab2d293bb7f4b014b79d16b2fb05090fa93 (patch) | |
tree | 77f0a30f016c0925cf7ee9292e644bba183c2774 /collectors/python.d.plugin/mysql | |
parent | Adding upstream version 1.19.0. (diff) | |
download | netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.tar.xz netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.zip |
Adding upstream version 1.29.0.upstream/1.29.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/mysql')
-rw-r--r-- | collectors/python.d.plugin/mysql/README.md | 32 | ||||
-rw-r--r-- | collectors/python.d.plugin/mysql/mysql.chart.py | 3 |
2 files changed, 24 insertions, 11 deletions
diff --git a/collectors/python.d.plugin/mysql/README.md b/collectors/python.d.plugin/mysql/README.md index 7dca8f40..d8d3c1d0 100644 --- a/collectors/python.d.plugin/mysql/README.md +++ b/collectors/python.d.plugin/mysql/README.md @@ -1,8 +1,14 @@ -# mysql +<!-- +title: "MySQL monitoring with Netdata" +custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/mysql/README.md +sidebar_label: "MySQL" +--> -Module monitors one or more mysql servers +# MySQL monitoring with Netdata -**Requirements:** +Monitors one or more MySQL servers. + +## Requirements - python library [MySQLdb](https://github.com/PyMySQL/mysqlclient-python) (faster) or [PyMySQL](https://github.com/PyMySQL/PyMySQL) (slower) - `netdata` local user to connect to the MySQL server. @@ -39,7 +45,7 @@ This module will produce following charts (if data is available): - cache hits - replace -4. **Handlerse** in handlers/s +4. **Handlers** in handlers/s - commit - delete @@ -61,7 +67,7 @@ This module will produce following charts (if data is available): - immediate - waited -6. **Table Select Join Issuess** in joins/s +6. **Table Select Join Issues** in joins/s - full join - full range join @@ -69,7 +75,7 @@ This module will produce following charts (if data is available): - range check - scan -7. **Table Sort Issuess** in joins/s +7. **Table Sort Issues** in joins/s - merge passes - range @@ -158,7 +164,7 @@ This module will produce following charts (if data is available): - updated - deleted -24. **InnoDB Buffer Pool Pagess** in pages +24. **InnoDB Buffer Pool Pages** in pages - data - dirty @@ -328,7 +334,15 @@ This module will produce following charts (if data is available): - update - other -## configuration +## Configuration + +Edit the `python.d/mysql.conf` configuration file using `edit-config` from the Netdata [config +directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`. + +```bash +cd /etc/netdata # Replace this path with your Netdata config directory, if different +sudo ./edit-config python.d/mysql.conf +``` You can provide, per server, the following: @@ -371,7 +385,7 @@ remote: ``` If no configuration is given, the module will attempt to connect to MySQL server via a unix socket at -`/var/run/mysqld/mysqld.sock` without password and with username `root`. +`/var/run/mysqld/mysqld.sock` without password and with username `root` or `netdata` (you granted permissions for `netdata` user in the Requirements section of this document). `userstats` graph works only if you enable the plugin in MariaDB server and set proper MySQL privileges (SUPER or PROCESS). For more details, please check the [MariaDB User Statistics diff --git a/collectors/python.d.plugin/mysql/mysql.chart.py b/collectors/python.d.plugin/mysql/mysql.chart.py index f3731547..1737e16b 100644 --- a/collectors/python.d.plugin/mysql/mysql.chart.py +++ b/collectors/python.d.plugin/mysql/mysql.chart.py @@ -6,7 +6,6 @@ from bases.FrameworkServices.MySQLService import MySQLService - # query executed on MySQL server QUERY_GLOBAL = 'SHOW GLOBAL STATUS;' QUERY_SLAVE = 'SHOW SLAVE STATUS;' @@ -348,7 +347,7 @@ CHARTS = { ] }, 'threads_creation_rate': { - 'options': [None, 'Threads Creation Rate', 'threads/s', 'threads', 'mysql.threads', 'line'], + 'options': [None, 'Threads Creation Rate', 'threads/s', 'threads', 'mysql.threads_creation_rate', 'line'], 'lines': [ ['Threads_created', 'created', 'incremental'], ] |