From 3ee831630142cf3c74c6f310c34eaade98d96070 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 12 Mar 2019 12:10:25 +0100 Subject: [PATCH] fix cant get single value ntp snmp standard mode --- centreon-plugins/snmp_standard/mode/ntp.pm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/centreon-plugins/snmp_standard/mode/ntp.pm b/centreon-plugins/snmp_standard/mode/ntp.pm index 7deabd372..03e340e72 100644 --- a/centreon-plugins/snmp_standard/mode/ntp.pm +++ b/centreon-plugins/snmp_standard/mode/ntp.pm @@ -68,13 +68,7 @@ sub run { my ($ref_time, $distant_time); my $oid_hrSystemDate = '.1.3.6.1.2.1.25.1.2.0'; - my $result = $self->{snmp}->get_leef(oids => [ $oid_hrSystemDate ]); - if (scalar(keys %$result) == 0) { - $self->{output}->output_add(severity => 'UNKNOWN', - short_msg => "Cannot get 'hrSystemDate' information."); - $self->{output}->display(); - $self->{output}->exit(); - } + my $result = $self->{snmp}->get_leef(oids => [ $oid_hrSystemDate ], nothing_quit => 1); if (defined($self->{option_results}->{ntp_hostname}) && $self->{option_results}->{ntp_hostname} ne '') { my %ntp;