diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index facbd51d1f..a52231ea74 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2008-09-24 Ramon Novoa + + * bin/pandora_wmi: Added WMI namespace support. + 2008-09-18 Ramon Novoa * lib/PandoraFMS/DB.pm: Added Export Server support. diff --git a/pandora_server/bin/pandora_wmi b/pandora_server/bin/pandora_wmi index 35a5c4c15d..31681b5a69 100755 --- a/pandora_server/bin/pandora_wmi +++ b/pandora_server/bin/pandora_wmi @@ -347,6 +347,12 @@ sub exec_wmi_module { $wmi_query =~ s/\"/\'/g; my $wmi_command = "$wmi_client -U \"". $agent_module->{'plugin_user'} ."\"%\"". $agent_module->{'plugin_pass'} . "\""; + + # Custom namespace + if ($agent_module->{'tcp_send'} ne '') { + $agent_module->{'tcp_send'} =~ s/\"/\'/g; + $wmi_command .= " --namespace=\"" . $agent_module->{'tcp_send'} . "\""; + } $wmi_command .= " //". $agent_module->{'ip_target'}; $wmi_command .= " \"". $wmi_query . "\""; logger ($pa_config, "Executing AM # $id_am WMI command '$wmi_command'", 9);