diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 09060ad859..c40127060e 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,8 +1,13 @@ -2010-04-05 Junichi Satoh +2010-04-05 Sancho Lerena - * lib/PandoraFMS/Core.pm: Fallback to previous version, this fix + * lib/PandoraFMS/ReconServer.pm: Trying to fix the problem detected + with recon and new modules from a network template. + + * lib/PandoraFMS/Core.pm: Fallback to previous version, this fix makes Pandora server to generate events constantly. +2010-04-05 Junichi Satoh + * lib/PandoraFMS/Core.pm: Fixed the problem that agent status(estado) is never updated to $new_status if initial state of new agent is "estado != last_status" with "$new_status == last_status". diff --git a/pandora_server/lib/PandoraFMS/ReconServer.pm b/pandora_server/lib/PandoraFMS/ReconServer.pm index 7e8ea9c94b..2d2d3dc6ca 100644 --- a/pandora_server/lib/PandoraFMS/ReconServer.pm +++ b/pandora_server/lib/PandoraFMS/ReconServer.pm @@ -356,9 +356,8 @@ sub create_network_profile_modules { $component->{'snmp_oid'}, $addr, $component->{'id_module_group'}, $component->{'plugin_user'}, $component->{'plugin_pass'}, $component->{'plugin_parameter'}, $component->{'max_timeout'}, $component->{'id_modulo'}); # An entry in tagente_estado is necessary for the module to work - db_insert ($dbh, 'INSERT INTO tagente_estado (id_agente_modulo, datos, timestamp, estado, id_agente, last_try, utimestamp, current_interval, running_by) - VALUES (?, \'\', \'0000-00-00 00:00:00\', 1, ?, \'0000-00-00 00:00:00\', 0, ?, 0)', - $module_id, $agent_id, $component->{'module_interval'}); + db_do ($dbh, 'INSERT INTO tagente_estado (`id_agente_modulo`, `id_agente`, `last_try`, current_interval) VALUES (?, ?, \'0000-00-00 00:00:00\', ?)', $module_id, $agent_id, $component->{'module_interval'}); + logger($pa_config, 'Creating module ' . $component->{'name'} . " for agent $addr from network component '" . $component->{'name'} . "'.", 10); } }