From 11971e9f393aeb7f8d6751c9a09d6d19aec34279 Mon Sep 17 00:00:00 2001 From: Ilia Kondrashov Date: Wed, 11 Feb 2015 16:06:28 +0100 Subject: [PATCH 1/2] add mysql slave alerts --- plugins/mysql/mysql_slave | 4 ++++ 1 file changed, 4 insertions(+) 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"; } From cbfc03c25eb507fcc4935450684f03ab2057e87b Mon Sep 17 00:00:00 2001 From: Ilia Kondrashov Date: Thu, 12 Feb 2015 17:29:49 +0100 Subject: [PATCH 2/2] add JSON module --- .travis.yml | 1 + 1 file changed, 1 insertion(+) 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