version 1.7, 2007/01/12 21:56:01 |
version 1.8, 2007/01/26 15:45:41 |
|
|
#!/usr/bin/perl -T |
#!/usr/bin/perl -T |
# $RedRiver: check_rrd,v 1.6 2007/01/10 18:41:04 andrew Exp $ |
# $RedRiver: check_rrd,v 1.7 2007/01/12 21:56:01 andrew Exp $ |
######################################################################## |
######################################################################## |
# check_rrd *** A nagios check for changing averages in rrds |
# check_rrd *** A nagios check for changing averages in rrds |
# |
# |
|
|
my $delta = calc_delta(@{ $deltas{$d} }); |
my $delta = calc_delta(@{ $deltas{$d} }); |
if ((not $check_status{$key}{$d . ' change'}) && |
if ((not $check_status{$key}{$d . ' change'}) && |
( $res eq 'OK' || |
( $res eq 'OK' || |
( not range_ok(abs($delta), $min, $max) ) |
( not range_ok($delta, $min, $max) ) |
)) { |
)) { |
$check_status{$key}{$d . ' change'} = { |
$check_status{$key}{$d . ' change'} = { |
status => $res, |
status => $res, |