Add support for trend modules.

Ref. pandora_enterprise#7456.
This commit is contained in:
Ramon Novoa 2021-12-03 11:47:58 +01:00
parent 5f8c5f215a
commit 642af39395
1 changed files with 7 additions and 0 deletions

View File

@ -224,6 +224,13 @@ sub exec_prediction_module ($$$$) {
return;
}
# Trend module.
if ($agent_module->{'prediction_module'} == 8) {
logger ($pa_config, "Executing trend module " . $agent_module->{'nombre'}, 10);
enterprise_hook ('exec_trend_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->{'custom_integer_1'});
return unless defined $target_module;