diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index c40127060e..f24b78bde7 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2010-04-14 Ramon Novoa + + * lib/PandoraFMS/PredictionServer.pm: Added support for service + modules (Enterprise). + 2010-04-05 Sancho Lerena * lib/PandoraFMS/ReconServer.pm: Trying to fix the problem detected diff --git a/pandora_server/lib/PandoraFMS/PredictionServer.pm b/pandora_server/lib/PandoraFMS/PredictionServer.pm index 096a47e957..0772bec18f 100644 --- a/pandora_server/lib/PandoraFMS/PredictionServer.pm +++ b/pandora_server/lib/PandoraFMS/PredictionServer.pm @@ -136,6 +136,13 @@ sub exec_prediction_module ($$$$) { my $agent_module = get_db_single_row ($dbh, 'SELECT * FROM tagente_modulo WHERE id_agente_modulo = ?', $id_am); return unless defined $agent_module; + # Service modules + if ($agent_module->{'custom_integer_1'} != 0) { + logger ($pa_config, "Executing service module " . $agent_module->{'nombre'}, 10); + enterprise_hook ('exec_service_module', [$pa_config, $agent_module, $server_id, $dbh]); + return; + } + # Get a full hash for target agent_module record reference ($target_module) my $target_module = get_db_single_row ($dbh, 'SELECT * FROM tagente_modulo WHERE id_agente_modulo = ?', $agent_module->{'prediction_module'}); return unless defined $target_module;