@cryptotaxi247 / netdata-1 / commits / 5fc16a73f

mysql replication alarms; #1454

Costa Tsaousis (ktsaou) committed Dec 29, 2016 at 20:11 UTC 5fc16a73fbded0129672132c4ab1c9733e6d7ce8
1 file changed +25
conf.d/health.d/mysql.conf
+25
@@ -12,6 +12,7 @@ template: mysql_last_collected_secs
12 info: number of seconds since the last successful data collection
13 to: dba
14
15 +
16 # -----------------------------------------------------------------------------
17 # slow queries
18
@@ -57,3 +58,27 @@ template: mysql_10s_waited_locks_ratio
58 info: the ratio of mysql waited table locks, for the last 10 seconds
59 to: dba
60
61 +# -----------------------------------------------------------------------------
62 +# replication
63 +
64 +template: mysql_replication
65 + on: mysql.slave_status
66 + calc: ($sql_running == -1 OR $io_running == -1)?0:1
67 + units: status
68 + every: 10s
69 + crit: $this == 0
70 + delay: down 5m multiplier 1.5 max 1h
71 + info: checks if mysql replication has stopped
72 + to: dba
73 +
74 +template: mysql_replication_lag
75 + on: mysql.slave_behind
76 + calc: $seconds
77 + units: seconds
78 + every: 10s
79 + warn: $this > (($status >= $WARNING) ? (5) : (10))
80 + crit: $this > (($status == $CRITICAL) ? (10) : (30))
81 + delay: down 5m multiplier 1.5 max 1h
82 + info: the number of seconds mysql replication is behind this master
83 + to: dba
84 +