version 1.9, 2007/04/02 20:11:07 |
version 1.10, 2008/05/24 02:03:23 |
|
|
#!/usr/bin/perl -T |
#!/usr/bin/perl -T |
# $RedRiver: check_rrd,v 1.8 2007/01/26 15:45:41 andrew Exp $ |
# $RedRiver: check_rrd,v 1.9 2007/04/02 19:11:07 andrew Exp $ |
######################################################################## |
######################################################################## |
# check_rrd *** A nagios check for changing averages in rrds |
# check_rrd *** A nagios check for changing averages in rrds |
# |
# |
|
|
|
|
my $info = RRDs::info($filename) or die "Problem with info from '$filename': $!"; |
my $info = RRDs::info($filename) or die "Problem with info from '$filename': $!"; |
|
|
my $resolution = $info->{'step'}; |
my $resolution = $info->{'step'} - 5; |
my $last = $info->{'last_update'}; |
my $last = $info->{'last_update'}; |
|
|
my $age = time - $last; |
my $age = time - $last; |
|
|
} |
} |
$start += $step; |
$start += $step; |
} |
} |
|
|
|
|
foreach my $key (keys %totals) { |
foreach my $key (keys %totals) { |
foreach my $length (keys %{ $totals{$key} }) { |
foreach my $length (keys %{ $totals{$key} }) { |