2013-03-07 Miguel de Dios <miguel.dedios@artica.es>
* lib/PandoraFMS/WMIServer.pm: fixed when the wmi query have not a password. Fixes: #3563221 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7805 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
de332b7cda
commit
267de90653
|
@ -1,3 +1,10 @@
|
|||
2013-03-07 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* lib/PandoraFMS/WMIServer.pm: fixed when the wmi query have not a
|
||||
password.
|
||||
|
||||
Fixes: #3563221
|
||||
|
||||
2013-03-06 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Core.pm: Fixed alert fired counts when
|
||||
|
|
|
@ -132,13 +132,19 @@ sub data_producer ($) {
|
|||
sub data_consumer ($$) {
|
||||
my ($self, $module_id) = @_;
|
||||
my ($pa_config, $dbh) = ($self->getConfig (), $self->getDBH ());
|
||||
|
||||
|
||||
my $module = get_db_single_row ($dbh, 'SELECT * FROM tagente_modulo WHERE id_agente_modulo = ?', $module_id);
|
||||
return unless defined $module;
|
||||
|
||||
|
||||
# Build command to execute
|
||||
my $wmi_command = $pa_config->{'wmi_client'} . ' -U "' . $module->{'plugin_user'} . '"%"' . $module->{'plugin_pass'} . '"';
|
||||
|
||||
my $wmi_command = '';
|
||||
if ($module->{'plugin_user'}) {
|
||||
$wmi_command = $pa_config->{'wmi_client'} . ' -U "' . $module->{'plugin_user'} . '"%"' . $module->{'plugin_pass'} . '"';
|
||||
}
|
||||
else {
|
||||
$wmi_command = $pa_config->{'wmi_client'} . ' -U "' . $module->{'plugin_user'} . '"';
|
||||
}
|
||||
|
||||
# Use a custom namespace
|
||||
my $namespace = $module->{'tcp_send'};
|
||||
if ($namespace ne '') {
|
||||
|
|
Loading…
Reference in New Issue