]> arthur.barton.de Git - netdata.git/commitdiff
mysql replication alarms; #1454
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Thu, 29 Dec 2016 18:11:29 +0000 (20:11 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Thu, 29 Dec 2016 18:11:29 +0000 (20:11 +0200)
conf.d/health.d/mysql.conf

index 6e32f9d3151fc446c3cac4c3d203dc80e8e7288b..e6f309fe8702e7a101f28044462289b06215ca3d 100644 (file)
@@ -12,6 +12,7 @@ template: mysql_last_collected_secs
     info: number of seconds since the last successful data collection
       to: dba
 
+
 # -----------------------------------------------------------------------------
 # slow queries
 
@@ -57,3 +58,27 @@ template: mysql_10s_waited_locks_ratio
     info: the ratio of mysql waited table locks, for the last 10 seconds
       to: dba
 
+# -----------------------------------------------------------------------------
+# replication
+
+template: mysql_replication
+      on: mysql.slave_status
+    calc: ($sql_running == -1 OR $io_running == -1)?0:1
+   units: status
+   every: 10s
+    crit: $this == 0
+   delay: down 5m multiplier 1.5 max 1h
+    info: checks if mysql replication has stopped
+      to: dba
+
+template: mysql_replication_lag
+      on: mysql.slave_behind
+    calc: $seconds
+   units: seconds
+   every: 10s
+    warn: $this > (($status >= $WARNING)  ? (5)  : (10))
+    crit: $this > (($status == $CRITICAL) ? (10) : (30))
+   delay: down 5m multiplier 1.5 max 1h
+    info: the number of seconds mysql replication is behind this master
+      to: dba
+