2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

add mysql slave alerts

This commit is contained in:
Ilia Kondrashov 2015-02-11 16:06:28 +01:00
parent 323b4a7937
commit 11971e9f39

View File

@ -46,6 +46,8 @@ use strict;
my $MYSQLADMIN = $ENV{mysqladmin} || "mysql";
my $MYSQLOPTS = $ENV{mysqlopts} || "";
my $COMMAND = "$MYSQLADMIN $MYSQLOPTS -e 'show slave status\\G' | grep 'Seconds_Behind_Master'";
my $WARNING = $ENV{mysql_slave_warning} || "60";
my $CRITICAL = $ENV{mysql_slave_warning} || "600";
my $arg = shift();
@ -81,6 +83,8 @@ sub print_config {
print "seconds.label Seconds behind master\n";
print "seconds.min 0\n";
print "seconds.draw LINE2\n";
print "seconds.warning $WARNING\n";
print "seconds.critical $CRITICAL\n";
print "graph_info Plugin available at <a href='http://oss.hjksolutions.com/munin/'>http://oss.hjksolutions.com/munin/</a>\n";
}