diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 4a703b7c66..41e365a188 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2012-05-31 Ramon Novoa + + * lib/PandoraFMS/WMIServer.pm: Merged from 4.0 branch. Hide wmic error + messages and improved error checking. + 2012-05-30 Sancho Lerena * lib/PandoraFMS/Core.pm: Updated batch statistic queries to get diff --git a/pandora_server/lib/PandoraFMS/WMIServer.pm b/pandora_server/lib/PandoraFMS/WMIServer.pm index 95f9008c2c..dfedc19afa 100644 --- a/pandora_server/lib/PandoraFMS/WMIServer.pm +++ b/pandora_server/lib/PandoraFMS/WMIServer.pm @@ -154,8 +154,8 @@ sub data_consumer ($$) { logger ($pa_config, "Executing AM # $module_id WMI command '$wmi_command'", 9); # Execute command - my $module_data = `$wmi_command`; - if (! defined ($module_data)) { + my $module_data = `$wmi_command 2>/dev/null`; + if ($? ne 0 || ! defined ($module_data)) { pandora_update_module_on_error ($pa_config, $module, $dbh); return; }