2010-04-05 Sancho Lerena <slerena@artica.es>

* lib/PandoraFMS/ReconServer.pm: Trying to fix the problem
        detected with recon and new modules from a network template.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2540 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2010-04-05 16:28:08 +00:00
parent 3cbec8d108
commit b197929d8f
2 changed files with 9 additions and 5 deletions

View File

@ -1,8 +1,13 @@
2010-04-05 Junichi Satoh <junichi@rworks.jp>
2010-04-05 Sancho Lerena <slerena@artica.es>
* 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 <junichi@rworks.jp>
* 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".

View File

@ -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);
}
}