From d1d6b53250c4078fba9b2d0ea04d720757fb1e17 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 28 Feb 2013 17:45:20 +0000 Subject: [PATCH] 2013-02-28 Sancho Lerena * Config.pm: updated version. * NetworkServer.pm, PluginServer.pm: Fixed some more un-init values and removed annoying message and not useful warning about empty return on SNMP call. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7760 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 8 ++++++++ pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/NetworkServer.pm | 3 ++- pandora_server/lib/PandoraFMS/PluginServer.pm | 5 +++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 8cb9edb721..1d5909fe97 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,11 @@ +2013-02-28 Sancho Lerena + + * Config.pm: updated version. + + * NetworkServer.pm, + PluginServer.pm: Fixed some more un-init values and removed annoying + message and not useful warning about empty return on SNMP call. + 2013-02-28 Dario Rodriguez * lib/PandoraFMS/DataServer.pm: Added feature to update custom field diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index a30cdd66c5..c60b3d414c 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -43,7 +43,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "5.0dev"; -my $pandora_build = "121210"; +my $pandora_build = "130228"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/NetworkServer.pm b/pandora_server/lib/PandoraFMS/NetworkServer.pm index c188e07dde..5c929bad98 100644 --- a/pandora_server/lib/PandoraFMS/NetworkServer.pm +++ b/pandora_server/lib/PandoraFMS/NetworkServer.pm @@ -316,7 +316,8 @@ sub pandora_snmp_get_command ($$$$$$$$$$$) { return $output; } } else { - logger ($pa_config,"[ERROR] Undefined value returned SNMP query. Is the server out of memory?" , 0); + logger ($pa_config,"[ERROR] Undefined value returned SNMP query. Is the server out of memory?" , 3); + logger ($pa_config,"[ERROR] Snmp Community: $snmp_community SNMP Target: $snmp_target OID: $snmp_oid", 3); return ""; } } diff --git a/pandora_server/lib/PandoraFMS/PluginServer.pm b/pandora_server/lib/PandoraFMS/PluginServer.pm index 587ea45b03..263e2c62a5 100644 --- a/pandora_server/lib/PandoraFMS/PluginServer.pm +++ b/pandora_server/lib/PandoraFMS/PluginServer.pm @@ -197,6 +197,11 @@ sub data_consumer ($$) { eval { $module_data = `$command`; }; + + # Empty ? + if (!defined($module_data)){ + $module_data = ""; + } # Clean blank spaces and carriage return from start and end of the data $module_data =~ s/^[\s|\n|\r]*//;