Skip to content

Add PMM compatible 'runtime_mysql_servers_*' metrics to Prometheus exporter#4854

Merged
JavierJF merged 3 commits intov2.7from
v2.7-pmm_runtime_servers_metrics
Mar 7, 2025
Merged

Add PMM compatible 'runtime_mysql_servers_*' metrics to Prometheus exporter#4854
JavierJF merged 3 commits intov2.7from
v2.7-pmm_runtime_servers_metrics

Conversation

@JavierJF
Copy link
Collaborator

@JavierJF JavierJF commented Mar 6, 2025

This PR adds the following metrics, compatible with PMM, to the native Prometheus exporter:

# HELP proxysql_runtime_mysql_servers_status The status of the backend server (1 - ONLINE, 2 - SHUNNED, 3 - OFFLINE_SOFT, 4 - OFFLINE_HARD, 5 - SHUNNED_REPLICATION_LAG).
# TYPE proxysql_runtime_mysql_servers_status gauge
# HELP proxysql_runtime_mysql_servers_weight Configured 'weight' for the backend server.
# TYPE proxysql_runtime_mysql_servers_weight gauge
# HELP proxysql_runtime_mysql_servers_compression If 'compression' is enabled for the backend server.
# TYPE proxysql_runtime_mysql_servers_compression gauge
# HELP proxysql_runtime_mysql_servers_max_connections Configured 'max_connections' for the backend server.
# TYPE proxysql_runtime_mysql_servers_max_connections gauge
# HELP proxysql_runtime_mysql_servers_max_replication_lag Configured 'max_replication_lag' for the backend server.
# TYPE proxysql_runtime_mysql_servers_max_replication_lag gauge
# HELP proxysql_runtime_mysql_servers_use_ssl If 'ssl' is enabled for the backend server.
# TYPE proxysql_runtime_mysql_servers_use_ssl gauge
# HELP proxysql_runtime_mysql_servers_max_latency_ms Configured 'max_latency_ms' for the backend server.
# TYPE proxysql_runtime_mysql_servers_max_latency_ms gauge

JavierJF added 3 commits March 6, 2025 21:36
This new set of tests aims to check consistency between metrics exposed
by both, the Admin interface and the Prometheus exporter.
Dynamic Prometheus gauge metrics are only exposed while the source for
the data used for the time-series exists. If the source of the data is
no longer present, we omit the metric in the exporter output.
@JavierJF JavierJF merged commit 3c4eaa7 into v2.7 Mar 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant