From e0e098a7a649eaca71bce55b6a377be2b603fb71 Mon Sep 17 00:00:00 2001 From: "tatiana.llorente@artica.es" Date: Wed, 19 Sep 2018 16:51:31 +0200 Subject: [PATCH] Added module name and agent name in actions enable and disable module - #2783 --- .../godmode/agentes/configurar_agente.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index b0999eb638..4fee505d10 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1760,13 +1760,15 @@ if (!empty($duplicate_module)) { // DUPLICATE agent module ! // ===================== if ($enable_module) { $result = modules_change_disabled($enable_module, 0); - + $modulo_nombre = db_get_row_sql("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = ".$enable_module.""); + $modulo_nombre = $modulo_nombre['nombre']; + if ($result === NOERR) { enterprise_hook('config_agents_enable_module_conf', array($id_agente, $enable_module)); - db_pandora_audit("Module management", 'Enable ' . $enable_module); + db_pandora_audit("Module management", 'Enable #' . $enable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]); } else { - db_pandora_audit("Module management", 'Fail to enable ' . $enable_module); + db_pandora_audit("Module management", 'Fail to enable #' . $enable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]); } ui_print_result_message ($result, @@ -1775,13 +1777,15 @@ if ($enable_module) { if ($disable_module) { $result = modules_change_disabled($disable_module, 1); - + $modulo_nombre = db_get_row_sql("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = ".$disable_module.""); + $modulo_nombre = $modulo_nombre['nombre']; + if ($result === NOERR) { enterprise_hook('config_agents_disable_module_conf', array($id_agente, $disable_module)); - db_pandora_audit("Module management", 'Disable ' . $disable_module); + db_pandora_audit("Module management", 'Disable #' . $disable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]); } else { - db_pandora_audit("Module management", 'Fail to disable ' . $disable_module); + db_pandora_audit("Module management", 'Fail to disable #' . $disable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]); } ui_print_result_message ($result,