From 957d8c679ed1793f4ea3bf69086fc8b3682c628f Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Wed, 9 May 2012 16:05:16 +0000 Subject: [PATCH] 2012-05-09 Sergio Martin * include/help/en/help_alert_macros.php include/help/es/help_alert_macros.php include/functions.php include/functions_agents.php: Fixing some missing or wrong macros into help and added Minor and Major severities to alerts and clean some code git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6276 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++++++++ pandora_console/include/functions.php | 8 ++++++++ pandora_console/include/functions_agents.php | 6 ------ pandora_console/include/help/en/help_alert_macros.php | 2 +- pandora_console/include/help/es/help_alert_macros.php | 7 ++++++- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 991b574c80..06e6cfb19e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2012-05-09 Sergio Martin + + * include/help/en/help_alert_macros.php + include/help/es/help_alert_macros.php + include/functions.php + include/functions_agents.php: Fixing some missing or wrong macros + into help and added Minor and Major severities to alerts + and clean some code + 2012-05-08 Sancho Lerena * operation/agentes/datos_agente.php: Fixed search, was diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index b7668b3e72..939475821c 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -661,6 +661,12 @@ function get_alert_priority ($priority = 0) { case 4: return __('Critical'); break; + case 5: + return __('Minor'); + break; + case 6: + return __('Major'); + break; } return ''; } @@ -835,7 +841,9 @@ function get_priorities () { $priorities[0] = __('Maintenance'); $priorities[1] = __('Informational'); $priorities[2] = __('Normal'); + $priorities[5] = __('Minor'); $priorities[3] = __('Warning'); + $priorities[6] = __('Major'); $priorities[4] = __('Critical'); if (isset($config['text_char_long'])) { diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 278618585a..11b28480b3 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -192,12 +192,6 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f $selectText = 'COUNT(talert_template_modules.id) AS count'; } - if(is_array($id_agent)) { - $extra_sql = enterprise_hook('policies_get_modules_sql_condition', array(reset($id_agent), 't3.', false)); - } - else { - $extra_sql = ''; - } $extra_sql = enterprise_hook('policies_get_modules_sql_condition', array(reset($id_agent), 't3.', false)); if ($extra_sql === ENTERPRISE_NOT_HOOK) { diff --git a/pandora_console/include/help/en/help_alert_macros.php b/pandora_console/include/help/en/help_alert_macros.php index 35c5e59326..a540400629 100644 --- a/pandora_console/include/help/en/help_alert_macros.php +++ b/pandora_console/include/help/en/help_alert_macros.php @@ -24,7 +24,7 @@ The following macros are available:
  • _modulegroup_ : Module group name.
  • _moduledescription_ : Description of the module who fired the alert
  • _alert_name_ : Alert name
  • -
  • _alert_priority_ : Numerical alert priorityu
  • +
  • _alert_priority_ : Numerical alert priority
  • _id_agent_ : Id of agent, useful to build direct URL to redirect to a Pandora FMS console webpage.
  • _id_alert_ : Numerical ID of the alert (unique), used to correlate on third party software
  • _policy_ : Name of the policy the module belongs to (if applies).
  • diff --git a/pandora_console/include/help/es/help_alert_macros.php b/pandora_console/include/help/es/help_alert_macros.php index 9a82a621ee..4943aab143 100644 --- a/pandora_console/include/help/es/help_alert_macros.php +++ b/pandora_console/include/help/es/help_alert_macros.php @@ -20,12 +20,17 @@ Las siguientes macros están disponibles:
  • _alert_threshold_: Umbral de la alerta.
  • _alert_times_fired_: Número de veces que se ha disparado la alerta.
  • _module_: Nombre del módulo
  • +
  • _modulegroup_ : Nombre del grupo del módulo.
  • _moduledescription_: Descripcion del modulo.
  • _alert_name_: Nombre de la alerta.
  • -
  • _alert_priority_: Prioridad de la alerta.
  • +
  • _alert_priority_: Prioridad numérica de la alerta.
  • _id_agent_: ID del agente, util para construir URL de acceso a la consola de Pandora.
  • _id_alert_: ID de la alerta, util para correlar la alerta en herramientas de terceros.
  • _policy_: Nombre de la política a la que pertenece el módulo (si aplica).
  • +
  • _interval_ : Intervalo de la ejecución del módulo.
  • +
  • _target_ip_ : Dirección IP del objetivo del módulo.
  • +
  • _target_port_ : Puerto del objetivo del módulo.
  • +
  • _plugin_parameters_ : Parámetros del Plug-in del módulo.