diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
commit | d079b656b4719739b2247dcd9d46e9bec793095a (patch) | |
tree | d2c950c70a776bcf697c963151c5bd959f8a9f03 /collectors/python.d.plugin/proxysql | |
parent | Releasing debian version 1.37.1-2. (diff) | |
download | netdata-d079b656b4719739b2247dcd9d46e9bec793095a.tar.xz netdata-d079b656b4719739b2247dcd9d46e9bec793095a.zip |
Merging upstream version 1.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/proxysql')
-rw-r--r-- | collectors/python.d.plugin/proxysql/README.md | 108 | ||||
-rw-r--r-- | collectors/python.d.plugin/proxysql/proxysql.chart.py | 2 |
2 files changed, 10 insertions, 100 deletions
diff --git a/collectors/python.d.plugin/proxysql/README.md b/collectors/python.d.plugin/proxysql/README.md index 8c6a394f1..d6c626b51 100644 --- a/collectors/python.d.plugin/proxysql/README.md +++ b/collectors/python.d.plugin/proxysql/README.md @@ -1,106 +1,14 @@ <!-- title: "ProxySQL monitoring with Netdata" -custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/proxysql/README.md -sidebar_label: "ProxySQL" +custom_edit_url: "https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/proxysql/README.md" +sidebar_label: "proxysql-python.d.plugin" +learn_status: "Published" +learn_topic_type: "References" +learn_rel_path: "References/Collectors references/Databases" --> # 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: - -1. **Connections (frontend)** - - - connected: number of frontend connections currently connected - - aborted: number of frontend connections aborted due to invalid credential or max_connections reached - - non_idle: number of frontend connections that are not currently idle - - created: number of frontend connections created - -2. **Questions (frontend)** - - - 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 Bandwidth (backends)** - - - in - - out - -4. **Status (backends)** - - - Backends - - `1=ONLINE`: backend server is fully operational - - `2=SHUNNED`: backend sever is temporarily taken out of use because of either too many connection errors in a time that was too short, or replication lag exceeded the allowed threshold - - `3=OFFLINE_SOFT`: when a server is put into OFFLINE_SOFT mode, new incoming connections aren't accepted anymore, while the existing connections are kept until they became inactive. In other words, connections are kept in use until the current transaction is completed. This allows to gracefully detach a backend - - `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. **Bandwidth (backends)** - - - Backends - - in - - out - -6. **Queries (backends)** - - - Backends - - queries - -7. **Latency (backends)** - - - Backends - - ping time - -8. **Pool connections (backends)** - - - Backends - - Used: The number of connections are currently used by ProxySQL for sending queries to the backend server. - - Free: The number of connections are currently free. - - Established/OK: The number of connections were established successfully. - - Error: The number of connections weren't established successfully. - -9. **Commands** - - - Commands - - Count - - Duration (Total duration for each command) - -10. **Commands Histogram** - - - 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 - -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: - name : 'local' - user : 'stats' - pass : 'stats' - host : '127.0.0.1' - port : '6032' -``` - -If no configuration is given, module will fail to run. - ---- - - +This collector is deprecated. +Use [go.d/proxysql](https://github.com/netdata/go.d.plugin/tree/master/modules/proxysql#proxysql-monitoring-with-netdata) +instead.
\ No newline at end of file diff --git a/collectors/python.d.plugin/proxysql/proxysql.chart.py b/collectors/python.d.plugin/proxysql/proxysql.chart.py index 982c28ee7..7e06b7bdc 100644 --- a/collectors/python.d.plugin/proxysql/proxysql.chart.py +++ b/collectors/python.d.plugin/proxysql/proxysql.chart.py @@ -6,6 +6,8 @@ from bases.FrameworkServices.MySQLService import MySQLService +disabled_by_default = True + def query(table, *params): return 'SELECT {params} FROM {table}'.format(table=table, params=', '.join(params)) |