2013-01-09 Dario Rodriguez <dario.rodriguez@artica.es>
* lib/PandoraFMS/NetworkServer.pm: Added log traces to inform about the problem of undefined return of snmpget command. MERGED FROM 4.0.3 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
03893f6723
commit
54b238ab4f
|
@ -1,3 +1,10 @@
|
|||
2013-01-09 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* lib/PandoraFMS/NetworkServer.pm: Added log traces to inform
|
||||
about the problem of undefined return of snmpget command.
|
||||
|
||||
MERGED FROM 4.0.3
|
||||
|
||||
2013-01-09 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* lib/PandoraFMS/NetworkServer.pm: Controlled an error if output of
|
||||
|
|
|
@ -266,9 +266,9 @@ next_pair:
|
|||
# Set commands for SNMP checks depending on OS type
|
||||
###############################################################################
|
||||
|
||||
sub pandora_snmp_get_command ($$$$$$$$$$) {
|
||||
sub pandora_snmp_get_command ($$$$$$$$$$$) {
|
||||
|
||||
my ($snmpget_cmd, $snmp_version, $snmp_retries, $snmp_timeout, $snmp_community, $snmp_target, $snmp_oid, $snmp3_security_level, $snmp3_extra, $snmp_port) = @_;
|
||||
my ($snmpget_cmd, $snmp_version, $snmp_retries, $snmp_timeout, $snmp_community, $snmp_target, $snmp_oid, $snmp3_security_level, $snmp3_extra, $snmp_port, $pa_config) = @_;
|
||||
|
||||
my $output = "";
|
||||
|
||||
|
@ -316,6 +316,7 @@ sub pandora_snmp_get_command ($$$$$$$$$$) {
|
|||
return $output;
|
||||
}
|
||||
} else {
|
||||
logger ($pa_config,"[ERROR] Undefined value returned SNMP query. Is the server out of memory?" , 0);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
@ -373,7 +374,7 @@ sub pandora_query_snmp ($$$) {
|
|||
# SNMP v1, v2 and v2c call
|
||||
if ($snmp_version ne '3'){
|
||||
|
||||
$output = pandora_snmp_get_command ($snmpget_cmd, $snmp_version, $snmp_retries, $snmp_timeout, $snmp_community, $snmp_target, $snmp_oid, "", "", $snmp_port);
|
||||
$output = pandora_snmp_get_command ($snmpget_cmd, $snmp_version, $snmp_retries, $snmp_timeout, $snmp_community, $snmp_target, $snmp_oid, "", "", $snmp_port, $pa_config);
|
||||
if (defined ($output) && $output ne ""){
|
||||
$module_result = 0;
|
||||
$module_data = $output;
|
||||
|
@ -395,7 +396,7 @@ sub pandora_query_snmp ($$$) {
|
|||
$snmp3_extra = " -a $snmp3_auth_method -u $snmp3_auth_user -A $snmp3_auth_pass -x $snmp3_privacy_method -X $snmp3_privacy_pass ";
|
||||
}
|
||||
|
||||
$output = pandora_snmp_get_command ($snmpget_cmd, $snmp_version, $snmp_retries, $snmp_timeout, $snmp_community, $snmp_target, $snmp_oid, $snmp3_security_level, $snmp3_extra, $snmp_port);
|
||||
$output = pandora_snmp_get_command ($snmpget_cmd, $snmp_version, $snmp_retries, $snmp_timeout, $snmp_community, $snmp_target, $snmp_oid, $snmp3_security_level, $snmp3_extra, $snmp_port, $pa_config);
|
||||
if (defined ($output) && $output ne ""){
|
||||
$module_result = 0;
|
||||
$module_data = $output;
|
||||
|
|
Loading…
Reference in New Issue