From 2e85f9325a797977eea9dfea0a925775ddd211d9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Feb 2021 12:49:00 +0100 Subject: Merging upstream version 1.29.0. Signed-off-by: Daniel Baumann --- collectors/python.d.plugin/proxysql/README.md | 33 ++++++++++++++++++---- .../python.d.plugin/proxysql/proxysql.chart.py | 5 ++-- 2 files changed, 31 insertions(+), 7 deletions(-) (limited to 'collectors/python.d.plugin/proxysql') diff --git a/collectors/python.d.plugin/proxysql/README.md b/collectors/python.d.plugin/proxysql/README.md index 23a67751a..f1b369a44 100644 --- a/collectors/python.d.plugin/proxysql/README.md +++ b/collectors/python.d.plugin/proxysql/README.md @@ -1,6 +1,21 @@ -# proxysql + -This module monitors proxysql backend and frontend performance metrics. +# ProxySQL monitoring with Netdata + +Monitors database backend and frontend performance metrics. + +## 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 ProxySQL server. + +To create the `netdata` user, follow [the documentation](https://github.com/sysown/proxysql/wiki/Users-configuration#creating-a-new-user). + +## Charts It produces: @@ -16,7 +31,7 @@ It produces: - questions: total number of queries sent from frontends - slow_queries: number of queries that ran for longer than the threshold in milliseconds defined in global variable `mysql-long_query_time` -3. **Overall Bandwith (backends)** +3. **Overall Bandwidth (backends)** - in - out @@ -30,7 +45,7 @@ It produces: - `4=OFFLINE_HARD`: when a server is put into OFFLINE_HARD mode, the existing connections are dropped, while new incoming connections aren't accepted either. This is equivalent to deleting the server from a hostgroup, or temporarily taking it out of the hostgroup for maintenance work - `-1`: Unknown status -5. **Bandwith (backends)** +5. **Bandwidth (backends)** - Backends - in @@ -65,7 +80,15 @@ It produces: - Commands - 100us, 500us, ..., 10s, inf: the total number of commands of the given type which executed within the specified time limit and the previous one. -## configuration +## Configuration + +Edit the `python.d/proxysql.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/proxysql.conf +``` ```yaml tcpipv4: diff --git a/collectors/python.d.plugin/proxysql/proxysql.chart.py b/collectors/python.d.plugin/proxysql/proxysql.chart.py index c97147486..982c28ee7 100644 --- a/collectors/python.d.plugin/proxysql/proxysql.chart.py +++ b/collectors/python.d.plugin/proxysql/proxysql.chart.py @@ -189,7 +189,8 @@ CHARTS = { 'lines': [] }, 'commands_duration': { - 'options': [None, 'ProxySQL Commands Duration', 'milliseconds', 'commands', 'proxysql.commands_duration', 'line'], + 'options': [None, 'ProxySQL Commands Duration', 'milliseconds', 'commands', 'proxysql.commands_duration', + 'line'], 'lines': [] } } @@ -289,7 +290,7 @@ class Service(MySQLService): @staticmethod def histogram_chart(cmd): return [ - 'commands_historgram_' + cmd['name'], + 'commands_histogram_' + cmd['name'], None, 'ProxySQL {0} Command Histogram'.format(cmd['name'].title()), 'commands', -- cgit v1.2.3