summaryrefslogtreecommitdiffstats
path: root/conf.d/health.d/mysql.conf
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--conf.d/health.d/mysql.conf4
1 files changed, 2 insertions, 2 deletions
diff --git a/conf.d/health.d/mysql.conf b/conf.d/health.d/mysql.conf
index 78773e5b..1eeb993f 100644
--- a/conf.d/health.d/mysql.conf
+++ b/conf.d/health.d/mysql.conf
@@ -49,7 +49,7 @@ template: mysql_10s_table_locks_waited
template: mysql_10s_waited_locks_ratio
on: mysql.table_locks
- calc: ($mysql_10s_table_locks_waited * 100) / ($mysql_10s_table_locks_waited + $mysql_10s_table_locks_immediate)
+ calc: ( ($mysql_10s_table_locks_waited + $mysql_10s_table_locks_immediate) > 0 ) ? (($mysql_10s_table_locks_waited * 100) / ($mysql_10s_table_locks_waited + $mysql_10s_table_locks_immediate)) : 0
units: %
every: 10s
warn: $this > (($status >= $WARNING) ? (10) : (25))
@@ -65,7 +65,7 @@ template: mysql_10s_waited_locks_ratio
template: mysql_replication
on: mysql.slave_status
calc: ($sql_running == -1 OR $io_running == -1)?0:1
- units: status
+ units: ok/failed
every: 10s
crit: $this == 0
delay: down 5m multiplier 1.5 max 1h