2010-10-06 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Retrieve agent information before the module type. Fixes bug #3080827. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3357 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a8707e71b8
commit
82c6a9afd6
|
@ -1,3 +1,8 @@
|
||||||
|
2010-10-06 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/Core.pm: Retrieve agent information before the module
|
||||||
|
type. Fixes bug #3080827.
|
||||||
|
|
||||||
2010-09-27 Junichi Satoh <junichi@rworks.jp>
|
2010-09-27 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* FreeBSD/pandora_server, FreeBSD/tentacle_server: Fixed a typo.
|
* FreeBSD/pandora_server, FreeBSD/tentacle_server: Fixed a typo.
|
||||||
|
|
|
@ -691,16 +691,6 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
||||||
|
|
||||||
logger($pa_config, "Processing module '" . $module->{'nombre'} . "' for agent " . (defined ($agent) && $agent ne '' ? "'" . $agent->{'nombre'} . "'" : 'ID ' . $module->{'id_agente'}) . ".", 10);
|
logger($pa_config, "Processing module '" . $module->{'nombre'} . "' for agent " . (defined ($agent) && $agent ne '' ? "'" . $agent->{'nombre'} . "'" : 'ID ' . $module->{'id_agente'}) . ".", 10);
|
||||||
|
|
||||||
# Get module type
|
|
||||||
if (! defined ($module_type) || $module_type eq '') {
|
|
||||||
$module_type = get_db_value ($dbh, 'SELECT nombre FROM ttipo_modulo WHERE id_tipo = ?', $module->{'id_tipo_modulo'});
|
|
||||||
if (! defined ($module_type)) {
|
|
||||||
logger($pa_config, "Invalid module type ID " . $module->{'id_tipo_modulo'} . " module '" . $module->{'nombre'} . "' agent " . (defined ($agent) ? "'" . $agent->{'nombre'} . "'" : 'ID ' . $module->{'id_agente'}) . ".", 10);
|
|
||||||
pandora_update_module_on_error ($pa_config, $module, $dbh);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get agent information
|
# Get agent information
|
||||||
if (! defined ($agent) || $agent eq '') {
|
if (! defined ($agent) || $agent eq '') {
|
||||||
$agent = get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE id_agente = ?', $module->{'id_agente'});
|
$agent = get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE id_agente = ?', $module->{'id_agente'});
|
||||||
|
@ -711,6 +701,16 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Get module type
|
||||||
|
if (! defined ($module_type) || $module_type eq '') {
|
||||||
|
$module_type = get_db_value ($dbh, 'SELECT nombre FROM ttipo_modulo WHERE id_tipo = ?', $module->{'id_tipo_modulo'});
|
||||||
|
if (! defined ($module_type)) {
|
||||||
|
logger($pa_config, "Invalid module type ID " . $module->{'id_tipo_modulo'} . " module '" . $module->{'nombre'} . "' agent " . (defined ($agent) ? "'" . $agent->{'nombre'} . "'" : 'ID ' . $module->{'id_agente'}) . ".", 10);
|
||||||
|
pandora_update_module_on_error ($pa_config, $module, $dbh);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Process data
|
# Process data
|
||||||
my $processed_data = process_data ($data_object, $module, $module_type, $utimestamp, $dbh);
|
my $processed_data = process_data ($data_object, $module, $module_type, $utimestamp, $dbh);
|
||||||
if (! defined ($processed_data)) {
|
if (! defined ($processed_data)) {
|
||||||
|
|
Loading…
Reference in New Issue