2 # make sure mysql is running
4 template: mysql_last_collected_secs
6 calc: $now - $last_collected_t
9 warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
10 crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
11 delay: down 5m multiplier 1.5 max 1h
12 info: number of seconds since the last successful data collection
15 # -----------------------------------------------------------------------------
18 template: mysql_10s_slow_queries
20 lookup: sum -10s of slow_queries
23 warn: $this > (($status >= $WARNING) ? (5) : (10))
24 crit: $this > (($status == $CRITICAL) ? (10) : (20))
25 delay: down 5m multiplier 1.5 max 1h
26 info: number of mysql slow queries over the last 10 seconds
30 # -----------------------------------------------------------------------------
33 template: mysql_10s_table_locks_immediate
35 lookup: sum -10s absolute of immediate
36 units: immediate locks
38 info: number of table immediate locks over the last 10 seconds
41 template: mysql_10s_table_locks_waited
43 lookup: sum -10s absolute of waited
46 info: number of table waited locks over the last 10 seconds
49 template: mysql_10s_waited_locks_ratio
51 calc: $mysql_10s_table_locks_waited * 100 / ( $mysql_10s_table_locks_waited + $mysql_10s_table_locks_immediate)
54 warn: $this > (($status >= $WARNING) ? (10) : (20))
55 crit: $this > (($status == $CRITICAL) ? (20) : (50))
56 delay: down 5m multiplier 1.5 max 1h
57 info: the ratio of mysql waited table locks, for the last 10 seconds