version 1.5, 2007/01/10 01:17:44 |
version 1.6, 2007/01/10 18:41:04 |
|
|
#!/usr/bin/perl -T |
#!/usr/bin/perl -T |
# $RedRiver: check_rrd,v 1.4 2007/01/10 00:47:53 andrew Exp $ |
# $RedRiver: check_rrd,v 1.5 2007/01/10 01:17:44 andrew Exp $ |
######################################################################## |
######################################################################## |
# check_rrd *** A nagios check for changing averages in rrds |
# check_rrd *** A nagios check for changing averages in rrds |
# |
# |
|
|
use warnings; |
use warnings; |
use RRDs; |
use RRDs; |
|
|
use Data::Dumper; |
#use Data::Dumper; |
|
|
%ENV = (); |
%ENV = (); |
|
|
|
|
} |
} |
|
|
my $have_results = 0; |
my $have_results = 0; |
foreach my $DS (sort keys %check_status) { |
foreach my $s (sort { $ERRORS{$a} <=> $ERRORS{$b} } keys %ERRORS) { |
foreach my $s (sort { $ERRORS{$a} <=> $ERRORS{$b} } keys %ERRORS) { |
foreach my $DS (sort keys %check_status) { |
foreach my $key (sort keys %{ $check_status{$DS} }) { |
foreach my $key (sort keys %{ $check_status{$DS} }) { |
next unless $check_status{$DS}{$key}{'status'} eq $s;; |
next unless $check_status{$DS}{$key}{'status'} eq $s;; |
$have_results++; |
$have_results++; |