mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
Merge pull request #583 from caseycs/mysql_slave_alerts
add mysql slave alerts
This commit is contained in:
commit
578652fc1c
2 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,7 @@ install:
|
||||||
- cpanm --notest Graphics::ColorObject
|
- cpanm --notest Graphics::ColorObject
|
||||||
- cpanm --notest IPC::Run3
|
- cpanm --notest IPC::Run3
|
||||||
- cpanm --notest IPC::ShareLite
|
- cpanm --notest IPC::ShareLite
|
||||||
|
- cpanm --notest JSON
|
||||||
- cpanm --notest JSON::Any
|
- cpanm --notest JSON::Any
|
||||||
- cpanm --notest Mail::Sendmail
|
- cpanm --notest Mail::Sendmail
|
||||||
- cpanm --notest Modern::Perl
|
- cpanm --notest Modern::Perl
|
||||||
|
|
|
@ -46,6 +46,8 @@ use strict;
|
||||||
my $MYSQLADMIN = $ENV{mysqladmin} || "mysql";
|
my $MYSQLADMIN = $ENV{mysqladmin} || "mysql";
|
||||||
my $MYSQLOPTS = $ENV{mysqlopts} || "";
|
my $MYSQLOPTS = $ENV{mysqlopts} || "";
|
||||||
my $COMMAND = "$MYSQLADMIN $MYSQLOPTS -e 'show slave status\\G' | grep 'Seconds_Behind_Master'";
|
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();
|
my $arg = shift();
|
||||||
|
|
||||||
|
@ -81,6 +83,8 @@ sub print_config {
|
||||||
print "seconds.label Seconds behind master\n";
|
print "seconds.label Seconds behind master\n";
|
||||||
print "seconds.min 0\n";
|
print "seconds.min 0\n";
|
||||||
print "seconds.draw LINE2\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";
|
print "graph_info Plugin available at <a href='http://oss.hjksolutions.com/munin/'>http://oss.hjksolutions.com/munin/</a>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue