ProxySQL sits between your applications and MySQL-compatible backends, fully parsing the MySQL wire protocol and making per-query routing, caching, and connection-pooling decisions.

This checklist defines the monitoring signals every ProxySQL deployment needs, organized into four maturity levels: survival, operational, mature, and expert. Each level builds on the previous one. If you track query digest anomalies at level 4 but cannot tell whether your backends are ONLINE at level 1, you are debugging blind.

All ProxySQL stats are read through the admin interface on port 6032 as SQL queries against stats_* tables. The data-plane listener is port 6033. If you use the built-in Prometheus exporter (disabled by default, port 6070 when enabled via admin-restapi_enabled), it reads from the same underlying tables.

flowchart TD
    L4["Level 4: expert
Processlist, digest anomalies,
per-thread CPU, monitor freshness"] L3["Level 3: mature
Multiplexing ratio, config drift,
query cache, FD utilization"] L2["Level 2: operational
Pool saturation, latency histograms,
monitor checks, slow queries, CPU"] L1["Level 1: survival
Process, port 6033, ONLINE backends,
ConnERR, aborted, RSS"] L4 --> L3 L3 --> L2 L2 --> L1

Level 1: survival

These six signals answer one question: is ProxySQL alive and serving traffic? If any fail, you have an active outage.

SignalSourceWhat it tells youAlert
ProxySQL process aliveHost-level process checkProcess is runningPAGE if down
Port 6033 accepts connectionsExternal TCP check to data-plane portListener accepts client connectionsPAGE if refusing
At least 1 ONLINE backend per hostgroupstats_mysql_connection_pool, status columnBackends can receive queriesPAGE if zero ONLINE (with conditions below)
ConnERR per backendstats_mysql_connection_poolBackend unreachable or rejecting connectionsTICKET if sustained
Client_Connections_abortedstats_mysql_globalClients rejected or crashingTICKET if sustained rate
ProxySQL RSSHost-level /proc/<pid>/status or stats_memory_metrics.jemalloc_residentPhysical memory footprint, OOM riskPAGE if approaching system limit

The “zero ONLINE” page needs conditions. Alert only when: zero ONLINE backends persist for more than 60 seconds (two monitor intervals), ProxySQL_Uptime exceeds 600 (past cold start), and Client_Connections_non_idle > 0 or Questions rate is nonzero (there is actual traffic). Without these conditions, you will page on idle instances, cold starts, and backup windows.

The port 6033 check is not a ProxySQL stats metric. It must be an external TCP connect check, not a query against the admin interface. A hung listener with a running process will pass an admin-interface check but fail a port 6033 check.

SHUNNED is not a page. A backend in SHUNNED state is ProxySQL’s protection mechanism, often transient and self-correcting when replication catches up or the network blip clears. Page on zero ONLINE backends in a hostgroup, not on individual SHUNNED events. Paging on every SHUNNED transition causes alert fatigue.

Level 2: operational

These signals tell you whether ProxySQL is healthy under load, not just alive. Skip this level and you will not know you have a problem until it becomes an outage.

SignalSourceWhat it tells youAlert
ConnUsed / ConnFree per backendstats_mysql_connection_poolBackend pool pressureTICKET if ConnFree == 0 sustained with ConnUsed > 0
Questions ratestats_mysql_global (cumulative counter, compute rate)Throughput baseline; sudden drop signals upstream failure or proxy rejectionINFO baseline; investigate on deviation
Slow_queries ratestats_mysql_globalQueries exceeding mysql-long_query_time thresholdTICKET if sustained increase
Monitor check OK/ERR per typestats_mysql_global, MySQL_Monitor_*_check_OK/ERRBackend health probe success/failureTICKET if sustained failure rate
Client_Connections_connected vs mysql-max_connectionsstats_mysql_global vs global variableFrontend saturation approaching limitTICKET > 80%, PAGE > 95%
ProxySQL process CPUHost-levelWorker thread saturationTICKET > 70% sustained
Backend status changes (flapping)stats_mysql_connection_pool statusBackends alternating ONLINE and SHUNNEDTICKET if > 3 transitions in 10 min
stats_mysql_errors breakdownstats_mysql_errors tablePer-errno error counts per hostgroup and userTICKET on new error types or ProxySQL 9000+ errors

ConnFree == 0 does not mean saturation. ProxySQL can still create new connections up to max_connections configured in mysql_servers. True saturation means ConnERR is rising because ProxySQL tried and failed to open a connection. The most direct saturation indicator is ConnPool_get_conn_failure in stats_mysql_global, covered in level 3.

Latency_us in stats_mysql_connection_pool is ping latency, not query latency. It is measured by the monitor module’s ping check, representing network round-trip and protocol overhead. Actual query execution latency lives in the stats_mysql_commands_counters histogram buckets (cnt_100us through cnt_INFs). Building dashboards on Latency_us thinking it represents user-facing query performance is the most common ProxySQL monitoring mistake.

Stats tables reset on restart. stats_mysql_connection_pool, stats_mysql_query_digest, and most other stats tables are in-memory only. Baseline comparisons against pre-restart data are invalid. External collection must persist this data if you need historical context.

Level 3: mature

These signals answer: is ProxySQL actually doing its job efficiently? At this level you move from “is it broken?” to “is it providing value?”

SignalSourceWhat it tells youAlert
Multiplexing ratio (hostgroup_locked / connected)stats_mysql_globalEffectiveness of connection poolingTICKET if > 50% pinned
ConnPool_get_conn_failurestats_mysql_globalQueries that could not acquire a backend connectionTICKET if sustained
Query cache hit rate (GET_OK / GET)stats_mysql_global, Query_Cache_count_*Cache effectiveness vs backend load shieldingPLAN if declining with high purge rate
backend_lagging / backend_offline_during_querystats_mysql_globalQueries routed to a backend after it became laggy or offline mid-executionTICKET if sustained
Active_Transactionsstats_mysql_globalConnections holding pinned backend connectionsTICKET if high relative to connected count
Per-user connection utilizationstats_mysql_users (frontend_connections / frontend_max_connections)Approaching per-user connection ceilingTICKET > 90%
Access_Denied breakdownstats_mysql_global (Access_Denied_Wrong_Password, _Max_Connections, _Max_User_Connections)Authentication failure cause: credential mismatch vs capacity limitTICKET on sustained Wrong_Password
File descriptor usageHost-level /proc/<pid>/fdApproaching ulimitTICKET if > 50% of ulimit
Memory breakdownstats_memory_metrics (jemalloc_resident, jemalloc_allocated, jemalloc_active)Physical RSS, allocator fragmentationTICKET on sustained growth trend

The hostgroup_locked ratio is the most important ProxySQL-specific signal. Compute it as Client_Connections_hostgroup_locked / Client_Connections_connected. When this ratio approaches 1.0, every client has a dedicated backend connection. The proxy is adding latency and operational complexity with zero pooling benefit. Common causes: ORMs setting session variables (SET NAMES, SET sql_mode, SET time_zone) on every connection, long transactions, prepared statements in certain configurations, LOCK TABLES, user-defined variables, and GET_LOCK(). When multiplexing breaks, backend connection demand scales linearly with client count instead of sublinearly, and the capacity plan that assumed 10:1 multiplexing is fiction.

ConnPool_get_conn_failure is the most direct pool starvation signal. It tells you ProxySQL actually tried to get a backend connection and failed, not just that the pool is busy. This is more actionable than watching ConnFree == 0, which can occur during legitimate burst traffic without actual query failures.

Configuration drift has no metric. The three-layer model (MEMORY, RUNTIME, DISK) means a change can exist in MEMORY without being loaded to RUNTIME, or loaded to RUNTIME without being saved to DISK. A restart reverts to DISK state. There is no stats table that reports layer divergence. You must compare mysql_servers (memory layer) against runtime_mysql_servers (runtime layer) and disk state directly. This is one of the most dangerous silent failures: everything looks fine until ProxySQL restarts and comes back with stale or missing configuration.

File descriptor exhaustion is a binary cliff. ProxySQL uses approximately one FD per connection (client and backend), plus monitor and admin connections. At the ulimit, all new connections and health checks fail simultaneously. ProxySQL does not expose FD counts in stats tables. This must be a host-level check via /proc/<pid>/fd. Set ulimit -n to at least 4x peak expected client connections.

Polling stats_memory_metrics is expensive. ProxySQL collects jemalloc metrics on a separate interval because the collection itself has measurable cost. Polling more frequently than every 60 seconds can impact production query performance.

Level 4: expert

These signals exist for teams who have been paged at 3 a.m. by ProxySQL enough times to want deeper visibility. They require custom queries beyond what standard monitoring agents collect.

SignalSourceWhat it tells youWhy it matters
stats_mysql_processlist snapshotsstats_mysql_processlistPer-session state: user, client IP, hostgroup, command, multiplex status, extended_infoShows what is happening right now, including which sessions have multiplexing disabled and why
Query digest top-Nstats_mysql_query_digestTop queries by count, total time, max time, rows sentIdentifies optimization targets and new anomalous query patterns from deployments
Query rule hit distributionstats_mysql_query_rules hits columnWhich rules match, which are dead codeDetects routing misconfiguration (writes to readers) before it causes data issues
ConnPool_get_conn_immediate vs successstats_mysql_globalConnection acquisition contention ratioReveals whether pool gets are queuing or serving immediately
Monitor check freshnessmonitor.mysql_server_ping_log, monitor.mysql_server_connect_log (time_start_us)Gap between configured check interval and actual execution timeDetects monitor thread starvation: health checks lagging reality
Per-thread CPUHost-level ps -L -p $(pidof proxysql)Hot-thread detectionOne thread handling disproportionate connections; mysql-threads changes require restart
Prepared statement handle countsstats_mysql_global (Stmt_Server_Active_Total, Stmt_Cached)Handle leak detectionGrowing handles indicate application not closing prepared statements
ProxySQL cluster checksumsstats_proxysql_servers_checksumsConfig divergence between cluster peersSplit-brain routing: different ProxySQL instances route traffic differently
stats_mysql_errors per-errnostats_mysql_errorsGranular MySQL error code breakdown with hostgroup, user, schema contextError 1040 (too many connections) vs 1045 (access denied) vs 9001+ (ProxySQL internal)

The stats_mysql_errors table is gold during incidents. It shows the actual MySQL error number, the hostgroup it came from, the user and schema context, first and last occurrence, and count. ProxySQL internal errors in the 9000+ range always indicate proxy-side failures, not backend issues. Standard monitoring rarely collects this table.

stats_mysql_query_digest grows unboundedly. Use stats_mysql_query_digest_reset (which reads and clears the table in one operation) for periodic collection. Without this, the table accumulates entries in memory. Also note that queries served from the query cache still appear in this table, routed to hostgroup -1.

How Netdata helps

Netdata’s ProxySQL collector reads from the admin interface on port 6032 at per-second resolution, turning the stats tables in this checklist into continuous time-series data. The signals most improved by per-second collection and cross-signal correlation:

  • Backend health transitions with ConnERR context. When a backend moves to SHUNNED, the exact ConnERR spike that triggered it is visible in the same time window, not minutes later when a 60-second poller catches up.
  • Multiplexing ratio as a derived chart. Netdata tracks Client_Connections_hostgroup_locked alongside Client_Connections_connected, making the pinning ratio a visible trend rather than something you compute from two separate admin queries.
  • Questions rate and Slow_queries as per-second derivatives. Cumulative counters become immediate rate-of-change charts. A traffic drop or slow-query spike is visible within seconds, not after the next scrape interval.
  • Memory metrics at safe cadence. The collector respects the cost of stats_memory_metrics collection, polling jemalloc metrics at intervals that do not add load to a busy proxy.
  • ML anomaly detection on workload-dependent signals. Questions rate, connection counts, and ConnERR are inherently workload-dependent, which makes absolute thresholds brittle across environments. Anomaly detection flags deviations from learned baselines without requiring per-environment threshold tuning.