Merge remote-tracking branch 'origin/master' into Openstack

This commit is contained in:
Shini31 2016-06-09 14:37:19 +02:00
commit 8cf127646e
1 changed files with 7 additions and 8 deletions

View File

@ -55,7 +55,6 @@ sub check_options {
sub run {
my ($self, %options) = @_;
# $options{snmp} = snmp object
$self->{snmp} = $options{snmp};
my $oid_cacheAge = ".1.3.6.1.4.1.789.1.2.2.23.0";
@ -63,13 +62,13 @@ sub run {
my $result = $self->{snmp}->get_leef(oids => [$oid_cacheAge],
nothing_quit => 1);
my $exit = $self->{perfdata}->threshold_check(value => $results->{$oid_cacheAge},
my $exit = $self->{perfdata}->threshold_check(value => $result->{$oid_cacheAge},
threshold => [ { label => 'critical', 'exit_litteral' => 'critical' },
{ label => 'warning', exit_litteral => 'warning' } ]);
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Cache age is '%s' minutes", $results->{$oid_cacheAge}));
short_msg => sprintf("Cache age is '%s' minutes", $result->{$oid_cacheAge}));
$self->{output}->perfdata_add(label => 'cache_age', unit => 'm',
value => $results->{$oid_cacheAge},
value => $result->{$oid_cacheAge},
warning => $self->{option_results}->{warning},
critical => $self->{option_results}->{critical},
min => 0);