From 8468966ea05049f556dae801d6229edc8e9136ec Mon Sep 17 00:00:00 2001 From: "Dressler Armon, B2B-PAP-HLT-DO-ENG" Date: Sat, 15 Jan 2022 15:50:55 +0100 Subject: [PATCH] fixed erroneous usage of rate() function on gauges --- _data/rules.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_data/rules.yml b/_data/rules.yml index 1f98cb6..fd5aa22 100644 --- a/_data/rules.yml +++ b/_data/rules.yml @@ -494,12 +494,12 @@ groups: severity: critical - name: MySQL too many connections (> 80%) description: 'More than 80% of MySQL connections are in use on {{ $labels.instance }}' - query: 'avg by (instance) (rate(mysql_global_status_threads_connected[1m])) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 80' + query: 'max_over_time(mysql_global_status_threads_connected[1m]) / mysql_global_variables_max_connections * 100 > 80' severity: warning for: 2m - name: MySQL high threads running description: 'More than 60% of MySQL connections are in running state on {{ $labels.instance }}' - query: 'avg by (instance) (rate(mysql_global_status_threads_running[1m])) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 60' + query: 'max_over_time(mysql_global_status_threads_running[1m]) / mysql_global_variables_max_connections * 100 > 60' severity: warning for: 2m - name: MySQL Slave IO thread not running