From 6b873cbfd8bb15fd2f6b48096aa8bf3bc5b98055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Mon, 11 Jan 2021 13:16:51 +0000 Subject: [PATCH] Changed several metrics name for being fully being fully complaint with 'promtool' checker --- lib/MySQL_Thread.cpp | 11 +++++------ lib/ProxySQL_Admin.cpp | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 5f308d5f3..187cdf020 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -792,19 +792,19 @@ th_metrics_map = std::make_tuple( ), std::make_tuple ( p_th_counter::queries_with_max_lag_ms, - "proxysql_queries_with_max_lag_ms_total", + "proxysql_queries_with_max_lag_total", "Received queries that have a 'max_lag' attribute.", metric_tags {} ), std::make_tuple ( p_th_counter::queries_with_max_lag_ms__delayed, - "proxysql_queries_with_max_lag_ms__delayed_total", + "proxysql_queries_with_max_lag__delayed_total", "Query delayed because no connection was selected due to 'max_lag' annotation.", metric_tags {} ), std::make_tuple ( p_th_counter::queries_with_max_lag_ms__total_wait_time_us, - "proxysql_queries_with_max_lag_ms__total_wait_time_us_total", + "proxysql_queries_with_max_lag__total_wait_time_total", "Total waited time due to connection selection because of 'max_lag' annotation.", metric_tags {} ), @@ -815,10 +815,9 @@ th_metrics_map = std::make_tuple( metric_tags {} ), std::make_tuple ( - // TODO: Add meaningful HELP p_th_counter::hostgroup_locked_set_cmds, - "proxysql_hostgroup_locked_set_cmds", - "", + "proxysql_hostgroup_locked_set_cmds_total", + "Total number of connections that have been locked in a hostgroup.", metric_tags {} ), std::make_tuple ( diff --git a/lib/ProxySQL_Admin.cpp b/lib/ProxySQL_Admin.cpp index 355f9c02e..0b498cbb3 100644 --- a/lib/ProxySQL_Admin.cpp +++ b/lib/ProxySQL_Admin.cpp @@ -728,7 +728,7 @@ admin_metrics_map = std::make_tuple( // stmt metrics std::make_tuple ( p_admin_gauge::stmt_client_active_total, - "proxysql_stmt_client_active_total", + "proxysql_stmt_client_active", "The total number of prepared statements that are in use by clients.", metric_tags {} ), @@ -740,7 +740,7 @@ admin_metrics_map = std::make_tuple( ), std::make_tuple ( p_admin_gauge::stmt_server_active_total, - "proxysql_stmt_server_active_total", + "proxysql_stmt_server_active", "The total number of prepared statements currently available across all backend connections.", metric_tags {} ),