mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-24 06:05:17 +02:00
Fix #5232
This commit is contained in:
parent
de2b24cf65
commit
89ddfbb1fa
@ -109,6 +109,10 @@ sub connect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$self->{session} = new SNMP::Session(%{$self->{snmp_params}});
|
$self->{session} = new SNMP::Session(%{$self->{snmp_params}});
|
||||||
|
if (!defined($self->{session})) {
|
||||||
|
$self->{output}->add_option_msg(short_msg => 'SNMP Session : unable to create');
|
||||||
|
$self->{output}->option_exit(exit_litteral => $self->{snmp_errors_exit});
|
||||||
|
}
|
||||||
if ($self->{session}->{ErrorNum}) {
|
if ($self->{session}->{ErrorNum}) {
|
||||||
$self->{output}->add_option_msg(short_msg => 'SNMP Session : ' . $self->{session}->{ErrorStr});
|
$self->{output}->add_option_msg(short_msg => 'SNMP Session : ' . $self->{session}->{ErrorStr});
|
||||||
$self->{output}->option_exit(exit_litteral => $self->{snmp_errors_exit});
|
$self->{output}->option_exit(exit_litteral => $self->{snmp_errors_exit});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user