@cryptotaxi247 / netdata-1 / commits / 796dec5d2

added mysql slow_queries and waited locks alarms; #1454

Costa Tsaousis (ktsaou) committed Dec 29, 2016 at 18:10 UTC 796dec5d29c6ff55cc5f30febe9e669289c84b5f
1 file changed +46
conf.d/health.d/mysql.conf
+46
@@ -11,3 +11,49 @@ template: mysql_last_collected_secs
11 delay: down 5m multiplier 1.5 max 1h
12 info: number of seconds since the last successful data collection
13 to: dba
14 +
15 +# -----------------------------------------------------------------------------
16 +# slow queries
17 +
18 +template: mysql_10s_slow_queries
19 + on: mysql.queries
20 + lookup: sum -10s of slow_queries
21 + units: slow queries
22 + every: 10s
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
27 + to: dba
28 +
29 +
30 +# -----------------------------------------------------------------------------
31 +# lock waits
32 +
33 +template: mysql_10s_table_locks_immediate
34 + on: mysql.table_locks
35 + lookup: sum -10s absolute of immediate
36 + units: immediate locks
37 + every: 10s
38 + info: number of table immediate locks over the last 10 seconds
39 + to: dba
40 +
41 +template: mysql_10s_table_locks_waited
42 + on: mysql.table_locks
43 + lookup: sum -10s absolute of waited
44 + units: waited locks
45 + every: 10s
46 + info: number of table waited locks over the last 10 seconds
47 + to: dba
48 +
49 +template: mysql_10s_waited_locks_ratio
50 + on: mysql.table_locks
51 + calc: $mysql_10s_table_locks_waited * 100 / ( $mysql_10s_table_locks_waited + $mysql_10s_table_locks_immediate)
52 + units: %
53 + every: 10s
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
58 + to: dba
59 +