From 2acb3abf92dacaa969d1c2b92cef9e9d4c6c42fe Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 6 Jul 2021 10:06:17 +0200 Subject: [PATCH] Force sync all new agents if node has metaconsole and agent cache is enabled --- pandora_console/include/functions_agents.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 6b6092b0a7..8f9791332f 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -251,6 +251,13 @@ function agents_create_agent( return false; } + if (has_metaconsole() === true + && (bool) $config['metaconsole_agent_cache'] === true + ) { + // Force an update of the agent cache. + $values['update_module_count'] = 1; + } + $id_agent = db_process_sql_insert('tagente', $values); if ($id_agent === false) { return false;