diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 283610e06a..e6b1d5ca9e 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -674,6 +674,19 @@ if (enterprise_installed()) { } } + if ($id_os === '1') { + $modules = $agent_plugin->getModules(); + foreach ($modules as $key => $row) { + if (preg_match('/Syslog/', $row['raw']) === 1) { + if ($row['disabled'] === 1) { + $enable_log_collector = 0; + } else { + $enable_log_collector = 1; + } + } + } + } + if ($id_os === '9') { $modules = $agent_plugin->getModules(); foreach ($modules as $key => $row) { diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index c2e3a2f4f6..a10833081c 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1299,8 +1299,11 @@ if ($update_agent) { } $modules = $agent->getModules(); + foreach ($modules as $key => $row) { - if (preg_match('/PandoraAgent_log/', $row['raw']) === 1) { + if (preg_match('/PandoraAgent_log/', $row['raw']) === 1 + || ($id_os === 1 && preg_match('/Syslog/', $row['raw']) === 1) + ) { if ($enable_log_collector === 1) { if ($row['disabled'] === 1) { $agent->enableModule($row['module_name'], $row);