diff --git a/.travis.yml b/.travis.yml index 8e87fcf6..64c7c5d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ install: - cpanm --notest Graphics::ColorObject - cpanm --notest IPC::Run3 - cpanm --notest IPC::ShareLite + - cpanm --notest JSON - cpanm --notest JSON::Any - cpanm --notest Mail::Sendmail - cpanm --notest Modern::Perl diff --git a/plugins/mysql/mysql_slave b/plugins/mysql/mysql_slave index 5541a44a..e4cef7e3 100755 --- a/plugins/mysql/mysql_slave +++ b/plugins/mysql/mysql_slave @@ -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 http://oss.hjksolutions.com/munin/\n"; }