Skip to main content

ProxySQL collector

ProxySQL is an open-source proxy for mySQL.

This module monitors one or more ProxySQL servers, depending on your configuration.

Metrics

All metrics have "proxysql." prefix.

Labels per scope:

  • global: no labels.
  • command: command.
  • user: user.
  • backend: host, port.
MetricScopeDimensionsUnits
client_connections_countglobalconnected, non_idle, hostgroup_lockedconnections
client_connections_rateglobalcreated, abortedconnections/s
server_connections_countglobalconnectedconnections
server_connections_rateglobalcreated, aborted, delayedconnections/s
backends_trafficglobalrecv, sentB/s
clients_trafficglobalrecv, sentB/s
active_transactions_countglobalclientconnections
questions_rateglobalquestionsquestions/s
slow_queries_rateglobalslowqueries/s
queries_rateglobalautocommit, autocommit_filtered, commit_filtered, rollback, rollback_filtered, backend_change_user, backend_init_db, backend_set_names, frontend_init_db, frontend_set_names, frontend_use_dbqueries/s
backend_statements_countglobaltotal, uniquestatements
backend_statements_rateglobalprepare, execute, closestatements/s
client_statements_countglobaltotal, uniquestatements
client_statements_rateglobalprepare, execute, closestatements/s
cached_statements_countglobalcachedstatements
query_cache_entries_countglobalentriesentries
query_cache_memory_usedglobalusedB
query_cache_ioglobalin, outB/s
query_cache_requests_rateglobalread, write, read_successrequests/s
mysql_monitor_workers_countglobalworkers, auxiliarythreads
mysql_monitor_workers_rateglobalstartedworkers/s
mysql_monitor_connect_checks_rateglobalsucceed, failedchecks/s
mysql_monitor_ping_checks_rateglobalsucceed, failedchecks/s
mysql_monitor_read_only_checks_rateglobalsucceed, failedchecks/s
mysql_monitor_replication_lag_checks_rateglobalsucceed, failedchecks/s
jemalloc_memory_usedglobalactive, allocated, mapped, metadata, resident, retainedB
memory_usedglobalauth, sqlite3, query_digest, query_rules, firewall_users_table, firewall_users_config, firewall_rules_table, firewall_rules_config, mysql_threads, admin_threads, cluster_threadsB
uptimeglobalin, outB/s
mysql_command_execution_ratecommanduptimeseconds
mysql_command_execution_timecommandtimemicroseconds
mysql_command_execution_durationcommand100us, 500us, 1ms, 5ms, 10ms, 50ms, 100ms, 500ms, 1s, 5s, 10s, +Infmicroseconds
mysql_user_connections_utilizationuserusedpercentage
mysql_user_connections_countuserusedconnections
backend_statusbackendonline, shunned, offline_soft, offline_hardstatus
backend_connections_usagebackendfree, usedconnections
backend_connections_ratebackendsucceed, failedconnections/s
backend_queries_ratebackendqueriesqueries/s
backend_trafficbackendrecv, sendB/s
backend_latencybackendlatencymicroseconds

Configuration

Note: this collector uses stats username and password which is enabled by default.

Edit the go.d/proxysql.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/proxysql.conf

DSN syntax in details.

jobs:
- name: local
dsn: '[username[:password]@][protocol[(address)]]/'
# username:[email protected](address)/
# Examples:
# - name: remote
# dsn: stats:[email protected]/

For all available options see module configuration file.

Troubleshooting

To troubleshoot issues with the proxysql collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
  • Switch to the netdata user.

    sudo -u netdata -s
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m proxysql

Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.