From dfb96c6ae3cc9ecbf3e670a9e8a59f94b38927fe Mon Sep 17 00:00:00 2001 From: slerena Date: Mon, 12 Jan 2009 03:53:33 +0000 Subject: [PATCH] 2009-01-12 Sancho Lerena * pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered some indexes) on tagente_datos, tagente_datos_string and tagente_datos_inc. tagente_estado table: removed cambio, added status_changes, last_status. tagente_modulo: added five new fields (warning,critical mgmt., flipflop detection, history module and delete_pending bit. * agent_manager.php: Group ALL not shown anymore. * configurar_agente.php: Support for new options. Delete a module now mark for deletion the module, not delete data (It's VERY slow!). * modificar_agente.php: Delete agent now uses the global function, minor fixes. * module_manager_editor.php: New fields initializacion. * module_manager_editor_network.php: At this time, the first module editor who implements the new fields and improve old ones (tcp data). * setup.php: Added support for new token: event_view_hr (Filter of max old (in hr) for the event viewer. Removed old tokens show_unknown and show_lastalert. * functions.php: format_for_graph() has an important BUG that makes all units rendered without the "K" !!!!. Fixed. * delete_agent.php: Delete remote config (if present). Also mark for deletion modules instead delete them (and let the data without being deleted, because it's a HUGE consuming time, and it's left for the daily db maintance process). * estado_agente.php: Updated code for view new status. * estado_generalagente.php: Total packets are removed from this view, this was a huge time consuming SQL operation that don't give important infomation. Groupname is now visualized. * estado_ultimopaquete.php, * estado_monitores.php, * estado_grupo.php: Rewritten much code to view new status and other minor changes. * ver_agente.php: Data view now works under the tabs and other minor changes. * events.php: Support for the new events and status. Added filter for username and for a max. hours old events. Some boxes are now hidden by default. * fgraph.php: Some graphs are now fixed and uses tagente_datos and tagent_access with utimestamp and without id_agent index. Works faster * images/*: Updated icons (module types) and two new bulb colors. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 57 ++++++ .../godmode/agentes/agent_manager.php | 4 +- .../godmode/agentes/configurar_agente.php | 66 +++---- .../godmode/agentes/modificar_agente.php | 175 +++++------------- .../godmode/agentes/module_manager.php | 2 +- .../godmode/agentes/module_manager_editor.php | 6 + .../agentes/module_manager_editor_network.php | 37 +++- pandora_console/godmode/setup/setup.php | 16 +- pandora_console/images/b_magenta.png | Bin 0 -> 477 bytes pandora_console/images/dot_magenta.png | Bin 0 -> 381 bytes pandora_console/images/mod_icmp_data.png | Bin 872 -> 1132 bytes pandora_console/images/mod_icmp_proc.png | Bin 891 -> 1160 bytes pandora_console/images/mod_snmp_data.png | Bin 807 -> 1126 bytes pandora_console/images/mod_snmp_inc.png | Bin 805 -> 1079 bytes pandora_console/images/mod_snmp_proc.png | Bin 817 -> 1183 bytes pandora_console/images/mod_snmp_string.png | Bin 785 -> 1107 bytes pandora_console/images/mod_tcp_data.png | Bin 834 -> 1068 bytes pandora_console/images/mod_tcp_inc.png | Bin 844 -> 1008 bytes pandora_console/images/mod_tcp_proc.png | Bin 846 -> 1098 bytes pandora_console/include/config_process.php | 5 + pandora_console/include/functions.php | 4 +- pandora_console/include/functions_db.php | 61 ++++-- .../include/functions_reporting.php | 2 +- pandora_console/include/styles/pandora.css | 4 + .../include/styles/pandora_red.css | 3 + .../include/styles/pandora_width.css | 3 + pandora_console/include/styles/tip.css | 4 +- .../operation/agentes/datos_agente.php | 4 +- .../operation/agentes/estado_agente.php | 88 ++++----- .../agentes/estado_generalagente.php | 14 +- .../operation/agentes/estado_grupo.php | 97 +++++----- .../operation/agentes/estado_monitores.php | 36 +--- .../agentes/estado_ultimopaquete.php | 23 ++- .../operation/agentes/ver_agente.php | 15 +- pandora_console/operation/events/events.php | 88 ++++++--- pandora_console/pandoradb.sql | 40 ++-- pandora_console/reporting/fgraph.php | 39 ++-- 37 files changed, 493 insertions(+), 400 deletions(-) create mode 100644 pandora_console/images/b_magenta.png create mode 100644 pandora_console/images/dot_magenta.png diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 0212dc60c3..e60199a249 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,60 @@ +2009-01-12 Sancho Lerena + + * pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered + some indexes) on tagente_datos, tagente_datos_string and + tagente_datos_inc. + + tagente_estado table: removed cambio, added status_changes, last_status. + tagente_modulo: added five new fields (warning,critical mgmt., flipflop + detection, history module and delete_pending bit. + + * agent_manager.php: Group ALL not shown anymore. + + * configurar_agente.php: Support for new options. Delete a module now + mark for deletion the module, not delete data (It's VERY slow!). + + * modificar_agente.php: Delete agent now uses the global function, + minor fixes. + + * module_manager_editor.php: New fields initializacion. + + * module_manager_editor_network.php: At this time, the first module + editor who implements the new fields and improve old ones (tcp data). + + * setup.php: Added support for new token: event_view_hr (Filter of max + old (in hr) for the event viewer. Removed old tokens show_unknown and + show_lastalert. + + * functions.php: format_for_graph() has an important BUG that makes + all units rendered without the "K" !!!!. Fixed. + + * delete_agent.php: Delete remote config (if present). Also mark + for deletion modules instead delete them (and let the data without + being deleted, because it's a HUGE consuming time, and it's left + for the daily db maintance process). + + * estado_agente.php: Updated code for view new status. + + * estado_generalagente.php: Total packets are removed from this view, + this was a huge time consuming SQL operation that don't give important + infomation. Groupname is now visualized. + + * estado_ultimopaquete.php, + * estado_monitores.php, + * estado_grupo.php: Rewritten much code to view new status and other + minor changes. + + * ver_agente.php: Data view now works under the tabs and other minor + changes. + + * events.php: Support for the new events and status. Added filter for + username and for a max. hours old events. Some boxes are now hidden + by default. + + * fgraph.php: Some graphs are now fixed and uses tagente_datos and + tagent_access with utimestamp and without id_agent index. Works faster + + 2009-01-09 Evi Vanoost * general/footer.php, operation/agentes/sla_view.php, diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 13d7cb8e16..b9978945c6 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -95,10 +95,10 @@ $groups = get_user_groups ($config["id_user"]); $agents = get_group_agents (array_keys ($groups)); $table->data[2][0] = ''.__('Parent').''; -$table->data[2][1] = print_select ($agents, 'id_parent', $id_parent, '', get_agent_name ($id_parent, "lower"), $id_parent, true, false, false); //I use get_agent_name because the user might not have rights to the current parent +$table->data[2][1] = print_select ($agents, 'id_parent', $id_parent, '', __('None'), 0, true, false, false); //I use get_agent_name because the user might not have rights to the current parent $table->data[3][0] = ''.__('Group').''; -$table->data[3][1] = print_select ($groups, 'grupo', $grupo, '', '', 0, true, false, false); +$table->data[3][1] = print_select_from_sql ('SELECT id_grupo, nombre FROM tgrupo WHERE id_grupo > 1 ORDER BY nombre', 'grupo', $grupo, '', '', 0, true); $table->data[4][0] = ''.__('Interval').''; $table->data[4][1] = print_input_text ('intervalo', $intervalo, '', 16, 100, true); diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 8187fc6e43..1b0cc0508b 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -16,6 +16,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + // Load global vars require_once ("include/config.php"); enterprise_include ('godmode/agentes/configurar_agente.php'); @@ -34,6 +35,7 @@ if (! give_acl($config["id_user"], $group, "AW")) { exit; } + // Get passed variables $tab = get_parameter_get ("tab", "main"); $form_moduletype = get_parameter_post ("form_moduletype"); @@ -148,17 +150,17 @@ if (isset ($_POST["create_agent"])) { // Create a new and shiny agent // Create special module agent_keepalive $sql = "INSERT INTO tagente_modulo - (nombre, id_agente, id_tipo_modulo, descripcion, id_modulo, custom_id) + (nombre, id_agente, id_tipo_modulo, descripcion, id_modulo,min_warning, max_warning ) VALUES - ('agent_keepalive',".$id_agente.",100,'Agent Keepalive monitor',1,'".$custom_id."')"; + ('agent_keepalive',".$id_agente.",100,'Agent Keepalive monitor',1 ,0,1)"; $id_agent_module = process_sql ($sql, "insert_id"); if ($id_agent_module !== false) { // Create agent_keepalive in tagente_estado table $sql = "INSERT INTO tagente_estado - (id_agente_modulo, datos, timestamp, cambio, estado, id_agente, last_try, utimestamp, current_interval, running_by, last_execution_try) + (id_agente_modulo, datos, timestamp, estado, id_agente, last_try, utimestamp, current_interval, running_by, last_execution_try) VALUES - (".$id_agent_module.",1,'',0,0,".$id_agente.",0,0,0,0,0)"; + (".$id_agent_module.",'',0,0,".$id_agente.",0,0,0,0,0)"; $result = process_sql ($sql); if ($result === false) { $agent_created_ok = 0; @@ -697,6 +699,7 @@ if ((isset ($_POST["update_module"])) || (isset ($_POST["insert_module"]))) { $form_minvalue = (int) get_parameter_post ("form_minvalue",0); $form_maxvalue = (int) get_parameter ("form_maxvalue",0); $form_interval = (int) get_parameter ("form_interval",300); + $form_id_prediction_module = (int) get_parameter ("form_id_prediction_module",0); $form_id_plugin = (int) get_parameter ("form_id_plugin",0); $form_id_export = (int) get_parameter ("form_id_export",0); $form_disabled = (bool) get_parameter ("form_disabled",0); @@ -711,6 +714,12 @@ if ((isset ($_POST["update_module"])) || (isset ($_POST["insert_module"]))) { $form_plugin_parameter = (string) get_parameter ("form_plugin_parameter",""); $form_id_modulo = (int) get_parameter ("form_id_modulo",0); $form_custom_id = (string) get_parameter ("form_custom_id",""); + $form_history_data = (int) get_parameter('form_history_data',0); + $form_min_warning = (float) get_parameter ('form_min_warning', 0); + $form_max_warning = (float) get_parameter ('form_max_warning', 0); + $form_min_critical = (float) get_parameter ('form_min_critical', 0); + $form_max_critical = (float) get_parameter ('form_max_critical', 0); + $form_ff_event = (int) get_parameter ('form_ff_event', 0); } // MODULE UPDATE @@ -747,10 +756,16 @@ if ((isset ($_POST["update_module"])) && (!isset ($_POST["oid"]))) { // if modif post_process = %f, prediction_module = %d, max_timeout = %d, - custom_id = '%s' + custom_id = '%s', + history_data = %d, + min_warning = %f, + max_warning = %f, + min_critical = %f, + max_critical = %f, + min_ff_event = %d WHERE id_agente_modulo = %d", $form_description, $form_id_module_group, $form_name, $form_maxvalue, $form_minvalue, $form_interval, $form_tcp_port, $form_tcp_send, $form_tcp_rcv, $form_snmp_community, $form_snmp_oid, $form_ip_target, $form_flag, $form_id_modulo, $form_disabled, $form_id_export, $form_plugin_user, $form_plugin_pass, - $form_plugin_parameter, $form_id_plugin, $form_post_process, $form_prediction_module, $form_max_timeout, $form_custom_id, $id_agente_modulo); + $form_plugin_parameter, $form_id_plugin, $form_post_process, $form_prediction_module, $form_max_timeout, $form_custom_id, $form_history_data, $form_min_warning, $form_max_warning, $form_min_critical, $form_max_critical, $form_ff_event, $id_agente_modulo); $result = process_sql ($sql); if ($result === false) { @@ -795,32 +810,20 @@ if (((!isset ($_POST["nc"]) OR ($_POST["nc"] == -1))) && (!isset ($_POST["oid"]) (id_agente, id_tipo_modulo, nombre, descripcion, max, min, snmp_oid, snmp_community, id_module_group, module_interval, ip_target, tcp_port, tcp_rcv, tcp_send, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, - max_timeout, disabled, id_modulo, custom_id) - VALUES (%d,%d,'%s','%s',%d,%d,'%s','%s',%d,%d,'%s',%d,'%s','%s',%d,'%s','%s','%s',%d,%d,%d,%d,%d,%d,'%s')", + max_timeout, disabled, id_modulo, custom_id, history_data, min_warning, max_warning, min_critical, max_critical, min_ff_event) + VALUES (%d,%d,'%s','%s',%d,%d,'%s','%s',%d,%d,'%s',%d,'%s','%s',%d,'%s','%s','%s',%d,%d,%d,%d,%d,%d,'%s', %d, %f, %f, %f, %f, %d)", $id_agente, $form_id_tipo_modulo, $form_name, $form_description, $form_maxvalue, $form_minvalue, $form_snmp_oid, $form_snmp_community, $form_id_module_group, $form_interval, $form_ip_target, $form_tcp_port, $form_tcp_rcv, $form_tcp_send, $form_id_export, $form_plugin_user, $form_plugin_pass, - $form_plugin_parameter, $form_id_plugin, $form_post_process, $form_prediction_module, $form_max_timeout, $form_disabled, $form_id_modulo, $form_custom_id); + $form_plugin_parameter, $form_id_plugin, $form_post_process, $form_id_prediction_module, $form_max_timeout, $form_disabled, $form_id_modulo, $form_custom_id, $form_history_data, $form_min_warning, $form_max_warning, $form_min_critical, $form_max_critical, $form_ff_event); $id_agente_modulo = process_sql ($sql, 'insert_id'); if ($id_agente_modulo === false){ echo '

'.__('There was a problem adding module').'

'; } else { - // Create with different estado if proc type or data type - if (($form_id_tipo_modulo == 2) || // data_proc - ($form_id_tipo_modulo == 6) || // icmp_proc - ($form_id_tipo_modulo == 9) || // tcp_proc - ($form_id_tipo_modulo == 18) || //snmp proc - ($form_id_tipo_modulo == 21) || // async proc - ($form_id_tipo_modulo == 100) // Keepalive - ) { - $sql = sprintf ("INSERT INTO tagente_estado - (id_agente_modulo,datos,timestamp,cambio,estado,id_agente, utimestamp) - VALUES (%d, 0,'0000-00-00 00:00:00',0,0,%d,0)",$id_agente_modulo,$id_agente); - } else { - $sql = sprintf ("INSERT INTO tagente_estado - (id_agente_modulo,datos,timestamp,cambio,estado,id_agente, utimestamp) - VALUES (%d, 0,'0000-00-00 00:00:00',0,100,%d,0)",$id_agente_modulo,$id_agente); - } + $sql = sprintf ("INSERT INTO tagente_estado + (id_agente_modulo,datos,timestamp,estado,id_agente, utimestamp, status_changes, last_status) + VALUES (%d, 0,'0000-00-00 00:00:00',0,%d,0,0,0)",$id_agente_modulo,$id_agente); + $result = process_sql ($sql); if ($result !== false) { echo '

'.__('Module added successfully').'

'; @@ -857,21 +860,12 @@ if (isset ($_GET["delete_module"])){ // DELETE agent module ! // First delete from tagente_modulo -> if not successful, increment // error - if (process_sql ("DELETE FROM tagente_modulo WHERE id_agente_modulo = ".$id_borrar_modulo) === false) + if (process_sql ("UPDATE tagente_modulo SET disabled = 1, delete_pending = 1 WHERE id_agente_modulo = ".$id_borrar_modulo) === false) $error++; if (process_sql ("DELETE FROM tagente_estado WHERE id_agente_modulo = ".$id_borrar_modulo) === false) $error++; - - if (process_sql ("DELETE FROM tagente_datos WHERE id_agente_modulo = ".$id_borrar_modulo) === false) - $error++; - - if (process_sql ("DELETE FROM tagente_datos_string WHERE id_agente_modulo = ".$id_borrar_modulo) === false) - $error++; - - if (process_sql ("DELETE FROM tagente_datos_inc WHERE id_agente_modulo = ".$id_borrar_modulo) === false) - $error++; - + //Check for errors if ($error != 0) { echo '

'.__('There was a problem deleting the module').'

'; diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 7ae88f3e51..1e3d74ed3d 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -16,8 +16,10 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + // Load global vars require_once ("include/config.php"); + check_login (); @@ -25,11 +27,9 @@ check_login (); $offset = get_parameter ("offset", 0); $group_id = get_parameter ("group_id", 0); $ag_group = get_parameter ("ag_group", -1); - if (($ag_group == -1) && ($group_id != 0)) { $ag_group = $group_id; } - if (isset ($_GET["ag_group_refresh"])){ $ag_group = get_parameter_get ("ag_group_refresh", -1); } @@ -39,86 +39,10 @@ if (isset ($_GET["borrar_agente"])) { // if delete agent $id_agente = get_parameter_get ("borrar_agente"); $agent_name = get_agent_name ($id_agente); $id_grupo = dame_id_grupo ($id_agente); - $modules = array_keys (get_agent_modules ($id_agente)); if (give_acl ($config["id_user"], $id_grupo, "AW")==1) { - //Start transaction - this improves consistency - process_sql ("SET AUTOCOMMIT=0;"); - process_sql ("START TRANSACTION;"); - $del_error = 0; //Delete error count. At the end it will be used to rollback or commit - - // Firts delete from agents table - $sql_delete = "DELETE FROM tagente WHERE id_agente = ".$id_agente; - if (process_sql ($sql_delete) === false) - $del_error++; //in case process_sql returns false, increase error count - - // Delete agent access table - $sql_delete = "DELETE FROM tagent_access WHERE id_agent = ".$id_agente; - if (process_sql ($sql_delete) === false) - $del_error++; - - if (!empty ($modules) { - // Delete tagente_datos data - $sql_delete = "DELETE FROM tagente_datos WHERE id_agente_modulo IN (".implode (",",$modules).")"; - if (process_sql ($sql_delete) === false) - $del_error++; - - // Delete tagente_datos_string data - $sql_delete = "DELETE FROM tagente_datos_string WHERE id_agente_modulo IN (".implode (",",$modules).")"; - if (process_sql ($sql_delete) === false) - $del_error++; - - // Delete from tagente_datos - relies on id_agente_modulo - $sql_delete = "DELETE FROM tagente_datos_inc WHERE id_agente_modulo IN (".implode (",",$modules).")"; - if (process_sql ($sql_delete) === false) - $del_error++; - - // Delete alerts from talerta_agente_modulo - relies on - // id_agente_modulo - $sql_delete = "DELETE FROM talerta_agente_modulo WHERE id_agente_modulo IN (".implode (",",$modules).")"; - if (process_sql ($sql_delete) === false) - $del_error++; - } - // Delete from tagente_modulo - $sql_delete ="DELETE FROM tagente_modulo WHERE id_agente = ".$id_agente; - if (process_sql ($sql_delete) === false) - $del_error++; - - // Delete from tagente_estado - $sql_delete ="DELETE FROM tagente_estado WHERE id_agente = ".$id_agente; - if (process_sql ($sql_delete) === false) - $del_error++; - - // Delete IP's from taddress table using taddress_agent - $sql_delete = "DELETE FROM taddress WHERE - id_a = ANY(SELECT id_a FROM taddress_agent WHERE id_agent = ".$id_agente.")"; - if (process_sql ($sql_delete) === false) - $del_error++; - - // Delete IPs from taddress_agent table - $sql_delete = "DELETE FROM taddress_agent WHERE id_agent = ".$id_agente; - if (process_sql ($sql_delete) === false) - $del_error++; - - if ($del_error > 0) { - process_sql ("ROLLBACK;"); - echo "

".__('There was a problem deleting agent')."

"; - } else { - process_sql ("COMMIT;"); - echo "

".__('Agent deleted successfully')."

"; - } - unset ($sql_delete, $del_error); //Clean up - process_sql ("SET AUTOCOMMIT=1;"); - audit_db($config["id_user"],$REMOTE_ADDR, "Agent \'$agent_name\' deleted", "Agent Management"); - - // Delete remote configuration - $agent_md5 = md5($agent_name, FALSE); - if (file_exists($config["remote_config"] . "/" . $agent_md5 . ".md5")) { - // Agent remote configuration editor - $file_name = $config["remote_config"] . "/" . $agent_md5 . ".conf"; - unlink ($file_name); - $file_name = $config["remote_config"] . "/" . $agent_md5 . ".md5"; - unlink ($file_name); - } + $id_agentes[0] = $id_agente; + if (delete_agent ($id_agentes)) + audit_db($config["id_user"],$REMOTE_ADDR, "Agent \'$agent_name\' deleted", "Agent Management"); } else { // NO permissions. audit_db ($config["id_user"],$REMOTE_ADDR, "ACL Violation", "Trying to delete agent \'$agent_name\'"); @@ -230,49 +154,46 @@ if (mysql_num_rows($result)){ $tdcolor = "datos2"; $color = 1; } - if (! give_acl($config["id_user"], $id_grupo, "AW")) - continue; - - // Agent name - echo ""; - echo ""; - if ($row["disabled"] == 1){ - echo ""; - } - echo "".substr(strtoupper($row["nombre"]),0,20).""; - if ($row["disabled"] == 1){ - echo ""; - } - echo ""; + if (give_acl($config["id_user"], $id_grupo, "AW")==1){ + // Agent name + echo ""; + if ($row["disabled"] == 1){ + echo ""; + } + echo "".substr(strtoupper($row["nombre"]),0,20).""; + if ($row["disabled"] == 1){ + echo ""; + } + echo ""; - echo ""; - // Has remote configuration ? - $agent_md5 = md5 ($row["nombre"], false); - if (file_exists ($config["remote_config"]."/".$agent_md5.".md5")) { + echo ""; + // Has remote configuration ? + $agent_md5 = md5($row["nombre"], FALSE); + if (file_exists($config["remote_config"] . "/" . $agent_md5 . ".md5")){ - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + } + echo ""; + + + // Operating System icon + echo ""; + print_os_icon ($row["id_os"], false); + echo ""; + // Group icon and name + echo "".print_group_icon ($id_grupo, true).""; + // Description + echo "".$row["comentarios"].""; + // Action + echo "'; + echo ""; } - echo ""; - - // Operating System icon - echo ""; - print_os_icon ($row["id_os"], false); - echo ""; - // Group icon and name - echo ""; - print_group_icon ($id_grupo); - echo "  ".get_group_name ($id_grupo).""; - // Description - echo "".$row["comentarios"].""; - // Action - echo "'; - echo ""; } echo ""; echo "
"; @@ -281,10 +202,10 @@ if (mysql_num_rows($result)){ echo " 
"; } -// Create agent button -echo "
"; -echo ""; -echo "
"; + // Create agent button + echo "
"; + echo ""; + echo "
"; ?> diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index e57d87e875..fc2159451f 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -68,7 +68,7 @@ echo ""; // ========================== echo "

".__('Assigned modules')."

"; -$sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'" +$sql1='SELECT * FROM tagente_modulo WHERE delete_pending = 0 AND id_agente = "'.$id_agente.'" ORDER BY id_module_group, nombre '; $result=mysql_query($sql1); if ($row=mysql_num_rows($result)){ diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 6c7eed47bc..d8eba54c33 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -115,6 +115,12 @@ if (($form_moduletype == "networkserver" || $form_moduletype == "wmiserver") && $form_plugin_pass = ""; $form_plugin_parameter = ""; $form_custom_id = ""; + $form_history_data = 1; + $form_min_warning = 0; + $form_max_warning = 0; + $form_min_critical = 0; + $form_max_critical = 0; + $form_ff_event = 0; } switch ($form_moduletype) { diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php index 7573e971cb..6c942050dc 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_network.php +++ b/pandora_console/godmode/agentes/module_manager_editor_network.php @@ -70,7 +70,12 @@ if ($update_module_id != NULL){ $form_prediction_module = $row['prediction_module']; $form_max_timeout = $row['max_timeout']; $form_custom_id = $row['custom_id']; - + $form_history_data = $row['history_data']; + $form_min_warning = $row['min_warning']; + $form_max_warning = $row['max_warning']; + $form_min_critical = $row['min_critical']; + $form_max_critical = $row['max_critical']; + $form_ff_event = $row['min_ff_event']; if ($tbl_disabled == 1){ $disabled_status = 'checked="ckecked"'; } else { @@ -241,6 +246,28 @@ echo ''.__('Max. Value').""; echo ''; echo ''; +// Warning value threshold +echo ''; +echo ''.__('Warning status').""; +echo ''.__("Min").' '; +echo ' '.__("Max").' '; + +// Critical value threshold +echo ''.__('Critical status').""; +echo ''.__("Min").' '; +echo ' '.__("Max").' '; +echo ''; + +echo ""; +echo ''.__('Historical data').""; +echo ''; +print_checkbox ("form_history_data", 1, $form_history_data, false); + +echo ''.__('FF Threshold'); +pandora_help ("ff_threshold"); +echo ''; +echo ''; + // Post process / Export server echo ''; echo ''.__('Post process'); @@ -268,14 +295,14 @@ echo ''.__('TCP send'); pandora_help ("tcp_send"); echo ""; -// SNMP module, tcp_send contains the SNMP version if ($form_id_tipo_modulo >= 15 && $form_id_tipo_modulo <= 18) { - echo ''; + echo ''; } else { - echo ''; + echo ''; } +echo ''; echo ''.__('TCP receive').""; -echo ''; +echo ''; echo ''; // Description diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index bd6b0e9258..98653694ba 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -41,8 +41,6 @@ if ($update_settings) { $config["days_purge"] = (int) get_parameter ('days_purge', $config["days_purge"]); $config["graph_res"] = (int) get_parameter ('graph_res', $config["graph_res"]); $config["step_compact"] = (int) get_parameter ('step_compact', $config["step_compact"]); - $config["show_unknown"] = (int) get_parameter ('show_unknown', $config["show_unknown"]); - $config["show_lastalerts"] = (int) get_parameter ('show_lastalerts', $config["show_lastalerts"]); $config["style"] = (string) get_parameter ('style', $config["style"]); $config["remote_config"] = (string) get_parameter ('remote_config', $config["remote_config"]); $config["graph_color1"] = (string) get_parameter ('graph_color1', $config["graph_color1"]); @@ -54,7 +52,7 @@ if ($update_settings) { $config["autoupdate"] = (string) get_parameter ('autoupdate', $config["autoupdate"]); $config["prominent_time"] = (string) get_parameter ('prominent_time', $config["prominent_time"]); $config["timesource"] = (string) get_parameter ('timesource', $config["timesource"]); - + $config["event_view_hr"] = (int) get_parameter ('event_view_hr', $config["event_view_hr"]); $config["style"] = substr ($config["style"], 0, strlen ($config["style"]) - 4); process_sql ("UPDATE tconfig SET VALUE='".$config["remote_config"]."' WHERE token = 'remote_config'"); @@ -64,8 +62,6 @@ if ($update_settings) { process_sql ("UPDATE tconfig SET VALUE='".$config["days_compact"]." ' WHERE token = 'days_compact'"); process_sql ("UPDATE tconfig SET VALUE='".$config["graph_res"]."' WHERE token = 'graph_res'"); process_sql ("UPDATE tconfig SET VALUE='".$config["step_compact"]."' WHERE token = 'step_compact'"); - process_sql ("UPDATE tconfig SET VALUE='".$config["show_unknown"]."' WHERE token = 'show_unknown'"); - process_sql ("UPDATE tconfig SET VALUE='".$config["show_lastalerts"]."' WHERE token = 'show_lastalerts'"); process_sql ("UPDATE tconfig SET VALUE='".$config["style"]."' WHERE token = 'style'"); process_sql ("UPDATE tconfig SET VALUE='".$config["graph_color1"]."' WHERE token = 'graph_color1'"); process_sql ("UPDATE tconfig SET VALUE='".$config["graph_color2"]."' WHERE token = 'graph_color2'"); @@ -76,6 +72,7 @@ if ($update_settings) { process_sql ("UPDATE tconfig SET VALUE='".$config["autoupdate"]."' WHERE token = 'autoupdate'"); process_sql ("UPDATE tconfig SET VALUE='".$config["prominent_time"]."' WHERE token = 'prominent_time'"); process_sql ("UPDATE tconfig SET VALUE='".$config["timesource"]."' WHERE token = 'timesource'"); + process_sql ("UPDATE tconfig SET VALUE='".$config["event_view_hr"]."' WHERE token = 'event_view_hr'"); } echo "

".__('Pandora Setup')." > "; @@ -118,18 +115,15 @@ $table->data[9][1] = print_input_text ('graph_res', $config["graph_res"], '', 5, $table->data[10][0] = __('Compact interpolation in hours (1 Fine-20 bad)'); $table->data[10][1] = print_input_text ('step_compact', $config["step_compact"], '', 5, 5, true); -$table->data[11][0] = __('Show unknown modules in global view'); -$table->data[11][1] = print_checkbox ('show_unknown', 1, $config["show_unknown"], true); - -$table->data[12][0] = __('Show last fired alerts in global view'); -$table->data[12][1] = print_checkbox ('show_lastalerts', 1, $config["show_lastalerts"], true); - $table->data[13][0] = __('Style template'); $table->data[13][1] = print_select ($file_styles, 'style', $config["style"], '', '', '', true); $table->data[14][0] = __('Block size for pagination'); $table->data[14][1] = print_input_text ('block_size', $config["block_size"], '', 5, 5, true); +$table->data[14][0] = __('Default hours for event view'); +$table->data[14][1] = print_input_text ('event_view_hr', $config["event_view_hr"], '', 5, 5, true); + $table->data[15][0] = __('Timestamp or time comparation'); $table->data[15][1] = __('Comparation in rollover').' '; $table->data[15][1] .= print_radio_button ('prominent_time', "timestamp", '', $config["prominent_time"], true); diff --git a/pandora_console/images/b_magenta.png b/pandora_console/images/b_magenta.png new file mode 100644 index 0000000000000000000000000000000000000000..dfd3a9e332429343a155696dfe50fa7c3c041dee GIT binary patch literal 477 zcmV<30V4j1P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXA( z038OHT)1Wc00CV|L_t(I%cYaON&`_4g};p?MzP366jO+Wtr45u2e<+85$tSy0()P; zLJ(UkEi5gqf`Z*P{@^b*Vxhr5+#pfbxW{6XCcDWBUKma>XU;uyXRafOv{S8C6Ny@_ z<|K%c5@D^?fsvk#^fD?v80o-B)>?IQQ;Q#r6qKdU$ryvNSnMuEB=zQ?EPYN(UzHex za&ITO?v`eNuW@LUV80HHBAnzPC_x@5b@3AdP7aDsa9xMF2{^37P!p~j@C}S)34{^Q zg1HDL-eI8tAy8;DKe7aFfUpJMA%x8s2S#AH73a^h#%Qh8orxdpxs7L2(yfvFtSNL) zmGE%bzMbAc||LzxrkiXRT|GpTV>Dlw6{Lb>*)pnk8crA?-83v6@1@! zGFQ3d;L%^x_DWH!i-rF?xV-;i_jESl!0GiHJf4F%}28J29*~C-V}>VN3FMcVYMs zf(!O8p9~b?EbxddW?nABK`6Re*o0y7X#nTOVnf!v!05M;4l^xQ;m$V>{D;H zNm$IMZ6&e2KzT;@1m6$BvEOR;NnCChE|U&)HTvtY&TRAl!|$OjtBq% literal 0 HcmV?d00001 diff --git a/pandora_console/images/mod_icmp_data.png b/pandora_console/images/mod_icmp_data.png index 840466a2a47185dd005d1b83e3eb6f06383866e7..b38e6ee93438156183ce34053c51ffc4e8b0936e 100644 GIT binary patch del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HLkV1kkW{NVrq delta 807 zcmV+?1K9lR2$Nd1AOSaeDewnCd+;9sia2rUHMdC4l_Qr{QEI87NRiq? zLO+7-tey4l&b%C8E!*`Mp;CX+YQA$#^H$N)Mm9?vAf2{!!k)AS&B7EPc zR;y8|R1`y`loAn9-R-2_-#@H9Y)-cvfW_qn?tFEJhmRf*gaOtX`1gHRyDTl_X`VLO z+S+1LC5v~%3j!AKQ4d~2o=v?{?3lSgXejaN+l5yTCEnlySx7j zWKfg`WoaOEHj~AOA+|A*3HkGv*WCT`Yi4I>3BwQ(K}4|Db{^mNDV0jHy}f-d@WdK} zEHW-D4nQ2o7-KjKThyC>k=AJng=N0`_8$JzDgaAM9>>RLf4B?p6XA0E_UFvc&yS7d zIDeko9$ITMIzz^vCVD2=K&UqwOoy-e=F<<+ZW`^R$t1S&7=17kx5geE5 zb3=z=$mRF0aO?VK1VKP0T|q>MtU-xEDTR##oRmj!@|3*$E5_K78*db7(%)ZB`f(0` z<2dZ??J+kue+NJ+l|rllF=4C0lnGE)5eGg|(8L(i@%gBY)ekW4n48o>PEwhfndw|E z09J&>)Jx1+jyP~p7>@ULu+3M9jRr#ZpRt23jbT0?G(HmgCxYPCwae_T#dNEn739v-r>vBBo%Cf3?c zWE1dOtwy8K;9bZ8I5;@yNyqy7x>T!GR#sNfT6aK|QXM~^o}QwVdMlU7q~mXRx?8zi zj$*M$v-!`aOT2E3p4n`d*k{swBB_^RatU`GG|002ovPDHLkV1iE;h1mcA diff --git a/pandora_console/images/mod_icmp_proc.png b/pandora_console/images/mod_icmp_proc.png index 8ad70c9f42f2cde466ddb6622e9abb785ef5e36f..9091c999f6a1e9db77f11a672d786f5703573195 100644 GIT binary patch delta 1095 zcmV-N1i1VA28aoeBnkm@Qb$4nuFf3kks&aD*#Qg#7dtqeqND%-1PDn)K~zY`#g6Mi$}luERBE0M6(0ik1O0#wd=3l)`+)<%AvL}V_zZXexD|L7@Kl@t zzS@v<#IpExewKH~j-gkU;Rz274bw1xiI&A^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D>}L$le$^E}Gsa$gO+N<$gu=cDHO)@2pb>guX& zZf+6;FaaXc$EentLZLvn+vV`^urEu)8px=>x@p|wA9ti8+0x<^TWy diff --git a/pandora_console/images/mod_snmp_data.png b/pandora_console/images/mod_snmp_data.png index c1df3ff61957a73f40bc6cf5f9236663a1437b86..8cdfec2f6b0ae77b64e066a4434aac85d762131c 100644 GIT binary patch delta 1089 zcmV-H1it&H2IdHmBnkm@Qb$4nuFf3kks%a+010qNS#tmY3ljhU3ljkVnw%H_000Mc zNliru*#Qg#8z%QIfpGu;1LjFYK~zY`#nxSjRAm?k@ZU7!?$omE2Q9W*VVPtpK^H|C zZW~mFMMOnmAOs~Prj^k}QB*{puPMcj$Qcr=iG0=w}DzQfLtKNII-0E=)4w_`EpU|v|jmav#_aQO_`TNTmcGFt1Ka+I5UYDhrdcCe(iL@7s`upd3=D8Oguj~WG_6`$KS(_#Dxx|L` z_v!8JZ6^IRzQoorz73?|lVE{=C78ZD2ZHzC!Bf-nuLpayF2sC3FU>M>oG6V?C`iWp(8wm-^1JmLG=mj#WO8%tw}>yS68E3#BnUmGW9f8jY`hQ zHqz5uRX;w%4Jd`qF@`mNp-89f@J&-!X~wlCJu)()R;x*pM4?cSWtns4_PPGbd+gt} zzX3i$ve%UtUS-k3^L$mWpK2HX#1~i|igR`F^fsJ@>MYMq#}&e^olJUoc-YX;5S;LD z96NI4h~>+d8yFanrfEajDRoCjN0myY)74CbVkpWb!9EkX37@uqz&GP=ZG|hq!Gi~9 z{7)=hx-=Ue9yWjeeEEF7K{S`kHT*n2J}#F#ln^{TJ~M413dYk}=W100000NkvXX Hu0mjf<|Z3u delta 784 zcmV+r1MmFi2&V>+B!32COGiWi{{a60|De66lK=n$+(|@1RCwB*mceTqM-;|?lbuN0 z2xD2qIErZwHKh%~*N}^iQVNCs10lJFkmBGT5_&E@RrHpVFFxdG2sz{se9AfG6dWUn zDcF}%lR$*D+Ld=lJM(%-C1kNHul!)yotwm$>*&6&;V(gB2GxtlrV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@I*`t``l}G_A;U zCX+$aDxM(|z=yv7+kkHckDuf^-zk^RgA#gxdw^eoA0;>DM1NR#KT(xwzce;B5{t#i zW>=GLjdj;`Nu^R{ghC;r(P&Zc6K@>{os!FBkGwx_6J~RQ&Jd86n{!H%GAjoxk*Y7Y z&dyHN+uMs}StzASJgVzD;cyt+wwa%wuZYqWN!V^<#!4wAs zF@^XN0xd*Ht6h0_v@@@VbcM9+%2M!yWq0Py&i>}j_ui}$5r6J{(UQ+T{T$Ep01%Oh z`*1iU3`4rzE{BJQiV{;w$#`2t)VQy#oxOKnJ2MTieB&zjAKYgU4KT(aB8UjixzW|> zblBV5<2)<-P?7L?Yu*|UU7@0Vmg^r8n~=wkp3v<@g^Z62dS9+*5^ap3v9!p}_g@jmG0&gB!)0g_ z1cy=zlg3moSLpq^m>mi=X{PaBgTuK~2y93LOEw6sJXmq8qo3==LXMQjF~ zB@x!z5r5~i)ahw_&Qjm={W|MdTwEMg3u6pUgwz=Zalj?zAvpdzdBz|Pur4hWJ*&|3 z4wlSc*L#evi2c|X?h`y=20li zi-}0L+iiAtce5y9jN$b3l+Ddewzjr#&W$3QMSr*3?GgmR%(eC+6I277oSaNdvcA49 z?RJ}$l@&bC8wpiPjd~3tJNZk-X&eey0w;GuZQpZG@H#) z|2!BJ9Xdsf=Y10gPf;?huCB_)#s+a5BO((K^*oPStwxe09334^?9#Lo@Vr01d8)^M YloR(!w|O$BtpET307*qoM6N<$f^7+dDgXcg diff --git a/pandora_console/images/mod_snmp_string.png b/pandora_console/images/mod_snmp_string.png index baf0b2c02327d4d68d44086306a2df350a92bf84..cbd08ae1b3c3c43f4721e768efc6c7b64bba0364 100644 GIT binary patch delta 1070 zcmV+}1kwAE2GaD!@?`ClF#Qs2w~E5Vq!wMTsAyB zZ2R`@IsbDMVD{Wu)^AvEtTHA^5+MX31X-3f+R)ID&6_u$ZLM|;;8IlaEUv~ics0JW z9v|X5ti*$Hyc3_{Zrp&!F%jDqe0Lgu==Ne!$QXESlV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(7Z(?4wOT~czngBvy0w;mzmMUkcuT8%VKIXpakD|q|^`&%iYV}uSL00000NkvXXu0mjf!gFx7 diff --git a/pandora_console/images/mod_tcp_data.png b/pandora_console/images/mod_tcp_data.png index 844b0894b7bbeaec7ee5b731ef9331ddbae02f31..81443a80a7e113def5c4852a86067761cd53ce7e 100644 GIT binary patch delta 1030 zcmV+h1o`{I2CN8>Bnkm@Qb$4nuFf3kks%a+010qNS#tmY3ljhU3ljkVnw%H_000Mc zNliru*#Qg#8Vog#dFB8B1FT6zK~zY`y_QdCTtytmKa=-%_ibO6Y(he_S(VtTsTu@5 zR0$-m;6G@onBLOrMT-?n#p=C^2XphHL_PJ;Lk<$GM3NjTLJ{d9m52*XS{g7m)~a!T z|GeFO|K^Q{OqL|wWY>ZY4D%c2J2T(+o9}$*34q))Ppbn14`Ubx07|JXZ4d-FjzghP zV0Ly^(6~GX{KWrIOn{!gZqB@Wh97^vg6q3Pkp#8QEoQ{n+ucj0Tw!8jVz;$62!9OR z4e_K!=|5cuS;}51w*K?cYOoppV2w<3_fblrlp>0vdUYHJ+qTuz)Kn|PErANA5mLe1R!B2aVj32y*+q_$s4Cn($&?~>fO1d_4|YF zzYlz`<4?6b{@q1141=VRB$$1$xq>HD&*x-lj%d`+QP zX;tF@7qq_50}7}B7lBvr+C6;V=b?KJaQunaa9x*~#0*L)Ot%b?LI^?V`ot0m+E;%e zb^8WVM$OjFZHg7}CSU<#lXlPDHEGi{Sy))0v$JzufblpgQiP$zbsPeJ&qatf{Avxa zQbkHx*Lj1oVPhds))sh0j|JK-P60P}u}5PY?oQGG9UUF@#|0o#ipckIOAf+lgGjM> z@e*#yAqsaTz1hYx+LNCHN?IaC;Dpw7BYUI)?oQHcYioF(hm;c2G*L>?ySImfW20QY zdR0TkI?1jS`<^<)gZuA)WhM-po#b!8G%yT&1H1yf4NU62cUoXqoC%Q6=NTU#U#BJn zzVEZVyv*?MFe4))L{U`F>_&DAg#x8gsTB#jTFc$Qqgp;S;0Q3)0N)g60xT^pZSmT{ z!9kVJ=gDTX7=}?NDuk%(xm+$IL{p0vz_Y;XI(w7AE#M2_O& zIz%K65^+HApIv8ny|XU`cy+ec_B!E}R=b*cXZ4$Bo_S}Kh=1_vYc;vG{Q_ER07PW$ zJsb{kU6)R$L$ldbq=ZsRCfh_rP46y% z1|W(ethHQ(1G?Vd6m)?~WsA=~|B{P#8-PNoi0cKcZGUbMXu}5|f5`g!dS*36L{0kp zO7_rNQ`AL@?lQwiLhK9OUJs{t!MnBBG5I{k$+P-Ql~X^*-LJo))AcfWd<6S{0VmL5 z81np6w|MWR_wjw7W}%6QVEjJBf>Mge56Kk@ET8^D`SH(K8)shbX`q*#fB`VZaCCIU z+S(cb`G0&KiG?V#_^!(^@KI`saBxB34Y1ZGKA*LzCZW>G-?WvPH7PUtSXo&~4i|t} zgg6ZGdoD^ZK`gYt{SLq95=ZIKlR%R-Icsgtr1bguIYAI$t;HCFh_HEMgO}fVoBIzQ zjCA@Ja=py6ue`x?H=m{%MRUD8t$iNktULqIYJat8G#aBNBn(4NPEOd}-DPiYk2sDK zWk>3EIvskw-a_>_i<(*T3_!cx9!uKU*^ySOMYUQ*Yn^~9r4m2)`+byBmp({l!OhDv zX@kn;GPPO_&-1X>CSJGJ((QI}9EVD!GPVa6xj@Z33FqadLZ6+T(P%XAeIF4SQ&ekB psU%b)2m+3ek7vRzdKt=^_Yb?W<=v&Uuf+fW002ovPDHLkV1h|0iwOV# diff --git a/pandora_console/images/mod_tcp_inc.png b/pandora_console/images/mod_tcp_inc.png index 2e9dd92c37006e79b41803fab12a915b96bdb4fc..5cae015fc22937d9ffc1f9e2c8da5e8fcb958af7 100644 GIT binary patch delta 970 zcmV;*12z222Ji=vBnkm@Qb$4nuFf3kks%a+010qNS#tmY3ljhU3ljkVnw%H_000Mc zNliru*#Qg#85-($pL75K18_-1K~zY`#g$KJ99100Ka-i=o$Y4HZfIyWs}fr@wFX5G zRRW3YMTLrDj;VO@prTZb-m4Tbo&-^%w;n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3nb60_$An>swHC*55D}KIE%Elp zAMxbr)BdOahg>Z3+B>&-{l;}_QN(5J9H+&fPk-rpz0UUbcA|nYhQq@{Ha9of+S($H z<3!oMy3J;jcDp^{=Aq;~P!mBn8jYbBuCK34y?byYStHVA^C z|1Qxar?sX~C=iAr`}_Mtt2A!+7;U_1caQ%78#L4s&Un3M00000NkvXXu0mjf{Ro{v diff --git a/pandora_console/images/mod_tcp_proc.png b/pandora_console/images/mod_tcp_proc.png index 2e1334431064e1fedc845f85cf42bc89b076ef5a..5536950020f586b29a2e33b97911819b99891958 100644 GIT binary patch delta 1061 zcmV+=1ls$~2FeJKBnkm@Qb$4nuFf3kks%a+010qNS#tmY3ljhU3ljkVnw%H_000Mc zNliru*#Qg#8xq!}F1q%D;PHMl^JeDre((Ff&j85WdynkuyA{(k0T7Y8zEY{+ zI1c%Io~fxRga0`!fX?pi9DMa4-~aF(uJ00t3S^BfVn*1py^GRHiShCAD}C=>;6@-0 ztO9euA>dJ91TcZmfC=D!-~dq3?E~O{>!zV&w#|5V0b}TN3oO z-o`_jN2-&jEPGH+M!^6WOB9zNzrl+Tyk;-Gbih;f!(fwUDV^Vr$nwLj^BA!5r zA_xO2%ICLpfAZ!_uaQcn@O>W$+H)MeL!C4%|i!4 zfKrN8zf7U@7cnzNI^E5o!*8)VKMz1G5yvTcw0CvlnHHl5o~NUuqnUr4()vBCuMY#K zb^gAV$G_i*rfCv4T)UI1*ssL}4RtAe&Hi@CWu+S}XLL>P@Cp%4TL*Kw$LE{4&6f?r<6E0s}7 zRdv2D8rhfyjA~d5I0L+=$3F->t0#5_IHL1L7FiDs(AL&gJzM}n5klX`Ejk!x3xvY_ z%qiTWLl|rd-N?p{09oK8pau9sw|3we4d(-|11|&LG_c5x(96rqc%Fw+3d^z(5xRDC zvS(zNbLY?Np~f0yN0OU=?%v1EJFg=f1Y50Qt&QCP+zDKxC$p@pe^dhlyaRj%q&Kn1 zdgxp($Jp4|8k%9?`#y_{iwq79GBh+q7>3o#U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zL@;DXQLQzFLV+lXI6OQYnx%0YN7^B3+S6WI?H>^<4HM^slVAV<002ovPDHLkV1mZ_ BiX{L5 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index af844da9ef..6de1dd463f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -119,6 +119,11 @@ if (!isset ($config['date_format'])) { process_sql ("INSERT INTO tconfig (token,value) VALUES ('date_format', '".$config['date_format']."')"); } +if (!isset($config["event_view_hr"])){ + $config["event_view_hr"] = 8; + process_sql ("INSERT INTO tconfig (token,value) VALUES ('event_view_hr', ".$config["event_view_hr"].")"); +} + if (isset ($config['homeurl']) && $config['homeurl'][0] != '/') { $config['homeurl'] = '/'.$config['homeurl']; } diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 0df6fd677a..9b98f0afba 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -431,9 +431,7 @@ function format_for_graph ($number , $decimals = 1, $dec_point = ".", $thousands $number = $number/1000; } - $number = $number . $shorts[$pos]; - - return format_numeric ($number, $decimals); //This will actually do the rounding and the decimals + return format_numeric ($number, $decimals). $shorts[$pos]; //This will actually do the rounding and the decimals } /** diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 9a17d1553c..5456c02f7f 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -819,6 +819,7 @@ function dame_id_grupo ($id_agent) { return get_agent_group ($id_agent); } + /** * Get the number of pandora data packets in the database. * @@ -1153,6 +1154,31 @@ function show_server_type ($id){ } } +/** + * Get a module category name + * + * @param id_category Id category + * + * @return Name of the given category + */ +function give_modulecategory_name ($id_category) { + switch ($id_category) { + case 0: + return __('Software agent data'); + break; + case 1: + return __('Software agent monitor'); + break; + case 2: + return __('Network agent data'); + break; + case 3: + return __('Network agent monitor'); + break; + } + return __('Unknown'); +} + /** * Get a network component group name * @@ -2028,7 +2054,7 @@ function delete_agent ($id_agents) { foreach ($id_agents as $id_agent) { $id_agent = (int) $id_agent; //Cast as integer - + $agent_name = get_agent_name ($id_agent); if ($id_agent < 1) continue; //If an agent is not an integer or invalid, don't process it @@ -2040,20 +2066,17 @@ function delete_agent ($id_agents) { $sql = sprintf ("SELECT id_ag FROM taddress_agent, taddress WHERE taddress_agent.id_a = taddress.id_a AND id_agent = %d", $id_agent); $result = get_db_all_rows_sql ($sql); + if ($result) foreach ($result as $row) { temp_sql_delete ("taddress_agent", "id_ag", $row["id_ag"]); } - //Standard data - temp_sql_delete ("tagente_datos", "id_agente_modulo", $tmodbase); - - //Incremental Data - temp_sql_delete ("tagente_datos_inc", "id_agente_modulo", $tmodbase); - - //String data - temp_sql_delete ("tagente_datos_string", "id_agente_modulo", $tmodbase); - - //Alert + // We cannot delete tagente_datos and tagente_datos_string here + // because it's a huge ammount of time. tagente_module has a special + // field to mark for delete each module of agent deleted and in + // daily maintance process, all data for that modules are deleted + + //Alert temp_sql_delete ("tcompound_alert", "id_aam", "ANY(SELECT id_aam FROM talerta_agente_modulo WHERE id_agent = ".$id_agent.")"); temp_sql_delete ("talerta_agente_modulo", "id_agente_modulo", $tmodbase); temp_sql_delete ("talerta_agente_modulo", "id_agent", $id_agent); @@ -2076,11 +2099,23 @@ function delete_agent ($id_agents) { //tagente_modulo after this temp_sql_delete ("tagente_modulo", "id_agente", $id_agent); + process_sql ('UPDATE tagente_modulo SET delete_pending = 1, disabled = 1 WHERE id_agente = '. $id_agent); + //Access entries temp_sql_delete ("tagent_access", "id_agent", $id_agent); //And at long last, the agent temp_sql_delete ("tagente", "id_agente", $id_agent); + + // Delete remote configuration + $agent_md5 = md5($agent_name, FALSE); + if (file_exists($config["remote_config"] . "/" . $agent_md5 . ".md5")) { + // Agent remote configuration editor + $file_name = $config["remote_config"] . "/" . $agent_md5 . ".conf"; + unlink ($file_name); + $file_name = $config["remote_config"] . "/" . $agent_md5 . ".md5"; + unlink ($file_name); + } } if ($errors > 0) { @@ -2187,6 +2222,7 @@ function get_agent_modules_count ($id_agent = 0) { $id_agent = safe_int ($id_agent, 1); //Make sure we're all int's and filter out bad stuff if (empty ($id_agent)) { + //If the array proved empty or the agent is less than 1 (eg. -1) $filter = ''; } else { $filter = sprintf (" WHERE id_agente IN (%s)", implode (",", (array) $id_agent)); @@ -2228,7 +2264,6 @@ function get_agent_group ($id_agent) { function get_group_name ($id_group) { return (string) get_db_value ('nombre', 'tgrupo', 'id_grupo', (int) $id_group); } - /** * Validates an alert id or an array of alert id's * @@ -2306,4 +2341,4 @@ function get_modulegroups () { function get_modulegroup_name ($modulegroup_id) { return (string) get_db_value ('name', 'tmodule_group', 'id_mg', (int) $modulegroup_id); } -?> \ No newline at end of file +?> diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 9ab0714c2b..58d5a53648 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -152,7 +152,7 @@ function get_group_stats ($id_group) { $data["data_alerts_fired"] = 0; $data["data_alerts_fire_count"] = 0; - + $cur_time = get_system_time (); foreach ($result as $row) { diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index a25a1a072a..4c7d3b0fe9 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -353,6 +353,7 @@ td.datos_id { .red, .redb, .redi, .error { color: #f00; } + .sep { margin-left: 30px; border-bottom: 1px solid #708090; @@ -361,6 +362,9 @@ td.datos_id { .green { color: #5a8629; } +.yellow { + color: #F3C500; +} .greenb { color: #00aa00; } diff --git a/pandora_console/include/styles/pandora_red.css b/pandora_console/include/styles/pandora_red.css index d69d21135f..cc3eb675bb 100644 --- a/pandora_console/include/styles/pandora_red.css +++ b/pandora_console/include/styles/pandora_red.css @@ -383,6 +383,9 @@ td.datos_jus, td.datos2_jus { .green { color: #5a8629; } +.yellow { + color: #F3C500; +} .greenb { color: #00aa00; } diff --git a/pandora_console/include/styles/pandora_width.css b/pandora_console/include/styles/pandora_width.css index a56ae19b5c..60ec2a680c 100644 --- a/pandora_console/include/styles/pandora_width.css +++ b/pandora_console/include/styles/pandora_width.css @@ -374,6 +374,9 @@ td.datos_jus, td.datos2_jus { .green { color: #5a8629; } +.yellow { + color: #F3C500; +} .greenb { color: #00aa00; } diff --git a/pandora_console/include/styles/tip.css b/pandora_console/include/styles/tip.css index 3b38fcb604..c6a557777a 100644 --- a/pandora_console/include/styles/tip.css +++ b/pandora_console/include/styles/tip.css @@ -78,7 +78,9 @@ a.info_table:hover span{ a.info:hover span { top: 45px; left: 20px; - width: 100px; + width: 120px; + background-color: #ffffff; + border: 1px solid #aaaaaa; } a.info2:hover span { top: 8px; diff --git a/pandora_console/operation/agentes/datos_agente.php b/pandora_console/operation/agentes/datos_agente.php index f9d961ef6d..be5efcec8c 100644 --- a/pandora_console/operation/agentes/datos_agente.php +++ b/pandora_console/operation/agentes/datos_agente.php @@ -44,10 +44,10 @@ if (isset ($_GET["delete"])) { // Different query for string data type if (preg_match ("/string/", get_moduletype_name (get_agentmodule_type ($module_id)))) { - $sql = sprintf ("SELECT * FROM tagente_datos_string WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY timestamp DESC", $module_id, get_system_time () - $period); + $sql = sprintf ("SELECT * FROM tagente_datos_string WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period); $string_type = 1; } else { - $sql = sprintf ("SELECT * FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY timestamp DESC", $module_id, get_system_time () - $period); + $sql = sprintf ("SELECT * FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period); $string_type = 0; } diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index a5b2c4605c..11c71f8c1e 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -182,25 +182,22 @@ if ($agents !== false) { $modules = get_db_all_rows_sql ($sql); if ($modules === false) $modules = array (); - $estado_general = 0; $numero_modulos = 0; - $numero_monitor = 0; $est_timestamp = ""; - $monitor_bad = 0; - $monitor_ok = 0; + $monitor_normal = 0; + $monitor_warning = 0; + $monitor_critical = 0; $monitor_down = 0; - $numero_datamodules = 0; - $estado_cambio = 0; $agent_down = 0; $now = get_system_time (); // Calculate module/monitor totals for this agent foreach ($modules as $module) { - $est_modulo = $module["estado"]; + $numero_modulos ++; $ultimo_contacto_modulo = $module["timestamp"]; $module_interval = $module["module_interval"]; $module_type = $module["id_tipo_modulo"]; - + if ($module_interval > $biginterval) $biginterval = $module_interval; if ($module_interval != 0) @@ -219,22 +216,16 @@ if ($agents !== false) { // Defines if Agent is down (interval x 2 > time last contact if ($seconds >= ($intervalo_comp * 2)) { // If (intervalx2) secs. ago we don't get anything, show alert $agent_down = 1; - if ($est_modulo != 100) - $numero_monitor++; if ($async == 0) $monitor_down++; - } elseif ($est_modulo != 100) { // estado=100 are data modules - $estado_general = $estado_general + $est_modulo; - $estado_cambio = $estado_cambio + $module["cambio"]; - $numero_monitor ++; - if ($est_modulo != 0) - $monitor_bad++; - else - $monitor_ok++; - } elseif ($est_modulo == 100) { // Data modules - $numero_datamodules++; + } else{ + if ($module["estado"] == 2) + $monitor_warning ++; + elseif ($module["estado"]== 1) + $monitor_critical ++; + else + $monitor_normal ++; } - $numero_modulos++; } // Color change for each line (1.2 beta2) if ($color == 1){ @@ -271,44 +262,41 @@ if ($agents !== false) { // Show GROUP icon echo ''; + echo ""; + echo print_group_icon ($id_grupo); + //echo ' ('; + //echo get_group_name ($id_grupo); + //echo ")"; + echo ""; - echo ""; - print_group_icon ($id_grupo); - echo " ". - $numero_modulos." / ".$numero_monitor; - if ($monitor_bad != 0) { - echo " / ".$monitor_bad.""; - } - if ($monitor_down != 0){ - echo " / ".$monitor_down.""; - } + echo "".$numero_modulos." : "; + if ($monitor_normal > 0) + echo " ".$monitor_normal.""; + if ($monitor_warning > 0) + echo " ".$monitor_warning.""; + if ($monitor_critical > 0) + echo " ".$monitor_critical.""; + if ($monitor_down > 0) + echo " ".$monitor_down.""; echo ""; echo ""; - if ($numero_monitor != 0){ - if ($estado_general != 0){ - if ($estado_cambio == 0){ - echo ''; - } else { - echo ''; - } - } elseif ($monitor_ok > 0) { - echo ''; - } elseif ($monitor_down > 0) { + if ($numero_modulos > 0){ + if ($agent_down > 0) { echo ''; - } elseif ($numero_datamodules == 0) { - echo ''; } - } else { - if ($agent_down && $numero_datamodules == 0) { - echo ''; - } elseif ($numero_datamodules == 0) { - echo ''; + elseif ($monitor_critical > 0){ + echo ''; + } elseif ($monitor_warning > 0) { + echo ''; } else { - echo ''; - } + echo ''; + } + } else { + echo ''; } + // checks if an alert was fired recently echo ""; if (give_disabled_group ($id_grupo)) { diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index a0c186ae93..10eca6d808 100644 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -46,7 +46,7 @@ echo '
 
'; //Floating div echo '
'; echo ''.__('Agent access rate (24h)').'

'; -echo ''; +echo ''; echo '
 
'; echo ''.__('Events generated -by module-').'

'; echo ''; @@ -85,17 +85,15 @@ echo ''.$agent["comentarios"].''; // Group echo ''.__('Group').''; echo ''; -print_group_icon ($agent["id_grupo"]); -echo ''; +echo print_group_icon ($agent["id_grupo"]); +echo ' ('; +echo get_group_name ($agent["id_grupo"]); +echo ')'; // Agent version echo ''.__('Agent Version'). ''; echo ''.$agent["agent_version"].''; -// Total packets -echo ''. __('Total packets'). ''; -echo ''.get_agent_modules_data_count ($id_agente).''; - // Last contact echo ''.__('Last contact')." / ".__('Remote').''; print_timestamp ($agent["ultimo_contacto"]); @@ -129,4 +127,4 @@ echo ' $group_name) { $total_agents += $agents; $group_info = array ('agent' => $agents, - 'ok' => 0, - 'bad' => 0, + 'normal' => 0, + 'critical' => 0, + 'warning' => 0, 'alerts' => 0, 'down' => 0, 'icon' => dame_grupo_icono ($id_group), @@ -73,13 +75,12 @@ foreach ($groups as $id_group => $group_name) { 'name' => $group_name); // SQL Join to get monitor status for agents belong this group - $sql = sprintf ("SELECT tagente_estado.datos, tagente_estado.current_interval, + $sql = sprintf ("SELECT tagente_estado.estado, tagente_estado.current_interval, tagente_estado.utimestamp FROM tagente, tagente_estado, tagente_modulo WHERE tagente.disabled = 0 AND tagente.id_grupo = %d AND tagente.id_agente = tagente_estado.id_agente - AND tagente_estado.estado != 100 AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente_estado.utimestamp != 0", @@ -88,18 +89,15 @@ foreach ($groups as $id_group => $group_name) { if ($modules === false) $modules = array (); foreach ($modules as $module) { - //if ($config["show_unknown"] > 0) { - //this needs to be filled out somehow, but this was a serious bug. If that config var is set, it would short circuit both ok++ and bad++ returning empty for everything - //} $seconds = $now - $module['utimestamp']; - // Down = module/agent down (as in it didn't monitor in time) - // Bad = module bad (as in it did monitor but it returned 0) if ($seconds >= ($module['current_interval'] * 2)) { - $group_info["down"]++; - } elseif ($module['datos'] != 0) { - $group_info["ok"]++; + $group_info['down']++; + } elseif ($module['estado'] == 2) { + $group_info['warning']++; + } elseif ($module['estado'] == 1) { + $group_info['critical']++; } else { - $group_info["bad"]++; + $group_info['normal']++; } } @@ -113,7 +111,7 @@ foreach ($groups as $id_group => $group_name) { AND tagente.id_agente = tagente_modulo.id_agente AND talerta_agente_modulo.id_agente_modulo = tagente_modulo.id_agente_modulo", $id_group); - $group_info["alerts"] = get_db_sql ($sql); + $group_info["alerts"] = 0 + get_db_sql ($sql); } array_push ($groups_info, $group_info); } @@ -160,17 +158,21 @@ for ($table = 0; $table < $ancho; $table++) { $group_name = $group_info["name"]; $icono_grupo = $group_info["icon"]; $icono_type = ""; - if ($group_info["bad"] > 0) { - $icono_type .= ''; + if ($group_info['critical'] > 0) { + $icono_type .= ''; } - if ($group_info["ok"] > 0) { - $icono_type .= ''; + if ($group_info["normal"] > 0) { + $icono_type .= ''; + } + + if ($group_info["warning"] > 0) { + $icono_type .= ''; } // Show yellow light if there are recent alerts fired for this group if ($group_info["alerts"] > 0 ) { - $icono_type .= ''; + $icono_type .= ''; } // Show grey light if there are agent down for this group @@ -187,22 +189,24 @@ for ($table = 0; $table < $ancho; $table++) { $celda = ''; // Grey border if agent down - if ($config["show_unknown"] > 0) { - if ($group_info["down"] > 0) - $celda = ''; - } + if ($group_info["down"] > 0) + $celda = ''; - // Yellow border if agents with alerts + // Yellow border if agents WARNING + if ($group_info["warning"] > 0) + $celda = ''; + + // Red border if agents CRITICAL + if ($group_info["critical"] > 0) + $celda = ''; + + // Magenta border if agents with alerts if ($group_info["alerts"] > 0) - $celda = ''; + $celda = ''; - // Red border if agents bad - if ($group_info["bad"] > 0) - $celda = ''; - - // Orange if alerts and down modules - if (($group_info["bad"] > 0) && ($group_info["alerts"] > 0)) - $celda = ''; + // Black if alerts and down modules + if (($group_info["critical"] > 0) && ($group_info["alerts"] > 0)) + $celda = ''; $celda .= '
'; @@ -210,25 +214,24 @@ for ($table = 0; $table < $ancho; $table++) { $celda .= ''; // Add float info table - $celda .= ' - + $celda .= '
'.__('Agents').':
+
'.__('Agents').':
'.$group_info["agent"].'
- - - - - - '; +
'.__('Monitors').':
'.__('Ok').':'.$group_info["ok"].'
'.__('Fail').':'.$group_info["bad"].'
+ + + + + + + '; - if ($config["show_unknown"] > 0) { - $celda .= ' - '; - } + $celda .= ' + '; - if ($config["show_lastalerts"] == 1) - $celda .= ' - '; + $celda .= ' + '; $celda .= "
'.__('Normal').''.format_for_graph ($group_info["normal"] , 1).'
'.__('Warning').''.format_for_graph ($group_info["warning"] , 1).'
'.__('Critical').''.format_for_graph ($group_info["critical"] , 1).'
'.__('Down').':'.$group_info["down"].'
'.__('Down').''.format_for_graph ($group_info["down"] , 1).'
'.__('Alerts').':'.$group_info["alerts"].'
'.__('Alerts').''.$group_info["alerts"].'
"; diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index 2cf8420d7a..91c9374b5d 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -31,6 +31,7 @@ if (!isset ($id_agente)) { $sql = sprintf ("SELECT * FROM tagente_estado, tagente_modulo WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.id_agente = %d AND tagente_modulo.disabled = 0 + AND tagente_modulo.delete_pending = 0 AND tagente_estado.utimestamp != 0 ORDER BY tagente_modulo.nombre", $id_agente); @@ -53,14 +54,6 @@ $table->head[4] = __('Status'); $table->head[5] = __('Interval'); $table->head[6] = __('Last contact'); -//Since PHP's Zend optimizer references $var2 in case you do $var = $var2, objects get referenced too so we can't do $table = $table_data -$table_data->head = $table->head; //Duplicate table for data modules -$table_data->class = $table->class; -$table_data->data = array (); -$table_data->cellspacing = $table->cellspacing; -$table_data->cellpadding = $table->cellpadding; -$table_data->width = $table->width; - foreach ($modules as $module) { $data = array (); if (($module["id_modulo"] != 1) && ($module["id_tipo_modulo"] != 100)) { @@ -74,15 +67,17 @@ foreach ($modules as $module) { } $data[1] = ''; + if (give_acl ($config['id_user'], $id_grupo, "AW")) + $data[1] .= ''; $data[2] = substr ($module["nombre"], 0, 25); $data[3] = substr ($module["descripcion"], 0, 35); - if ($module["estado"] == 1 && $module["cambio"] == 1) { - $data[4] = ''; + if ($module["estado"] == 2) { + $data[4] = ''; } elseif ($module["estado"] == 1) { - $data[4] = ''; + $data[4] = ''; } else { - $data[4] = ''; + $data[4] = ''; } if ($module["module_interval"] > 0) { @@ -99,14 +94,7 @@ foreach ($modules as $module) { } $data[6] .= print_timestamp ($module["utimestamp"], true); $data[6] .= ''; - - if ($module["estado"] != 100) { - array_push ($table->data, $data); - //Monitor modules go on $table - } else { - array_push ($table_data->data, $data); - //Data modules go on $table_data - } + array_push ($table->data, $data); } if (empty ($table->data)) { @@ -116,12 +104,6 @@ if (empty ($table->data)) { print_table ($table); } -if (empty ($table_data->data)) { - echo '
'.__('This agent doesn\'t have any active data modules').'
'; -} else { - echo "

".__('Full list of Data Modules')."

"; - print_table ($table_data); -} unset ($table); unset ($table_data); -?> \ No newline at end of file +?> diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php index 75fe4e3cc2..4a8645cf11 100644 --- a/pandora_console/operation/agentes/estado_ultimopaquete.php +++ b/pandora_console/operation/agentes/estado_ultimopaquete.php @@ -110,6 +110,10 @@ if (mysql_num_rows ($result3)) { echo salida_limpia(substr($row3["nombre"],0,15)); echo ""; echo ""; + if (give_acl ($config['id_user'], $id_grupo, "AW")) + echo ''; + + echo ""; if ($row3["module_interval"] != 0){ echo $row3["module_interval"]; @@ -130,7 +134,7 @@ if (mysql_num_rows ($result3)) { } echo ""; } - if ($row3["id_tipo_modulo"] == 100) { + if (($row3["id_tipo_modulo"] == 100) OR ($row3['history_data'] == 0)) { echo ""; echo substr(salida_limpia($row3["datos"]),0,12); } else { @@ -180,12 +184,17 @@ if (mysql_num_rows ($result3)) { echo ''; } - // RAW Table data - echo ""; - echo "  "; - echo "  "; - echo ""; - + + if ($row3['history_data'] == 1){ + // RAW Table data + echo ""; + echo "  "; + echo "  "; + echo ""; + } else { + echo ""; + } + echo ""; if ($row3["timestamp"] == "0000-00-00 00:00:00"){ diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index f3068bb6f3..9ab8ffe9e7 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -171,7 +171,7 @@ if ($flag_alert == 1 && give_acl ($config['id_user'], $id_grupo, "AW")) { echo "

"; echo ''.__('Event control filter').' '.''; -if ($config["pure"] == 1) { + echo '