From 320bf931f6fe4c3830ecc30ca89195ce2c07edf2 Mon Sep 17 00:00:00 2001 From: slerena <slerena@gmail.com> Date: Mon, 12 Jan 2009 03:53:33 +0000 Subject: [PATCH] 2009-01-12 Sancho Lerena <slerena@artica.es> * 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 <slerena@artica.es> + + * 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 <vanooste@rcbi.rochester.edu> * 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] = '<b>'.__('Parent').'</b>'; -$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] = '<b>'.__('Group').'</b>'; -$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] = '<b>'.__('Interval').'</b>'; $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 '<h3 class="error">'.__('There was a problem adding module').'</h3>'; } 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 '<h3 class="suc">'.__('Module added successfully').'</h3>'; @@ -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 '<h3 class="error">'.__('There was a problem deleting the module').'</h3>'; 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 "<h3 class='error'>".__('There was a problem deleting agent')."</h3>"; - } else { - process_sql ("COMMIT;"); - echo "<h3 class='suc'>".__('Agent deleted successfully')."</h3>"; - } - 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 "<tr class='$tdcolor' >"; - echo "<td>"; - if ($row["disabled"] == 1){ - echo "<i>"; - } - echo "<b><a href='index.php?sec=gagente& - sec2=godmode/agentes/configurar_agente&tab=main& - id_agente=".$row["id_agente"]."'>".substr(strtoupper($row["nombre"]),0,20)."</a></b>"; - if ($row["disabled"] == 1){ - echo "<i>"; - } - echo "</td>"; + if (give_acl($config["id_user"], $id_grupo, "AW")==1){ + // Agent name + echo "<tr><td class='$tdcolor'>"; + if ($row["disabled"] == 1){ + echo "<i>"; + } + echo "<b><a href='index.php?sec=gagente& + sec2=godmode/agentes/configurar_agente&tab=main& + id_agente=".$row["id_agente"]."'>".substr(strtoupper($row["nombre"]),0,20)."</a></b>"; + if ($row["disabled"] == 1){ + echo "<i>"; + } + echo "</td>"; - echo "<td align='center'>"; - // Has remote configuration ? - $agent_md5 = md5 ($row["nombre"], false); - if (file_exists ($config["remote_config"]."/".$agent_md5.".md5")) { + echo "<td align='center' class='$tdcolor'>"; + // Has remote configuration ? + $agent_md5 = md5($row["nombre"], FALSE); + if (file_exists($config["remote_config"] . "/" . $agent_md5 . ".md5")){ - echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente=".$row["id_agente"]."&disk_conf=" . $agent_md5 . "'>"; - echo "<img src='images/application_edit.png' border='0' align='middle' title='".__('Edit remote config')."'>"; - echo "</A>"; + echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente=".$row["id_agente"]."&disk_conf=" . $agent_md5 . "'>"; + echo "<img src='images/application_edit.png' border='0' align='middle' title='".__('Edit remote config')."'>"; + echo "</A>"; + } + echo "</td>"; + + + // Operating System icon + echo "<td class='$tdcolor' align='center'>"; + print_os_icon ($row["id_os"], false); + echo "</td>"; + // Group icon and name + echo "<td class='$tdcolor' align='center'>".print_group_icon ($id_grupo, true)."</td>"; + // Description + echo "<td class='".$tdcolor."f9'>".$row["comentarios"]."</td>"; + // Action + echo "<td class='$tdcolor' align='center'><a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente& + borrar_agente=".$row["id_agente"]."'"; + echo ' onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; + echo "<img border='0' src='images/cross.png'></a></td>"; } - echo "</td>"; - - // Operating System icon - echo "<td align='center'>"; - print_os_icon ($row["id_os"], false); - echo "</td>"; - // Group icon and name - echo "<td>"; - print_group_icon ($id_grupo); - echo " ".get_group_name ($id_grupo)."</td>"; - // Description - echo "<td class='".$tdcolor."f9'>".$row["comentarios"]."</td>"; - // Action - echo "<td align='center'><a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente& - borrar_agente=".$row["id_agente"]."'"; - echo ' onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; - echo "<img src='images/cross.png'></a></td>"; } echo "</table>"; echo "<table width='750'><tr><td align='right'>"; @@ -281,10 +202,10 @@ if (mysql_num_rows($result)){ echo " </td></tr><tr><td>"; } -// Create agent button -echo "<form method='post' action='index.php?sec=gagente& -sec2=godmode/agentes/configurar_agente&create_agent=1'>"; -echo "<input type='submit' class='sub next' name='crt' -value='".__('Create agent')."'>"; -echo "</form></td></tr></table>"; + // Create agent button + echo "<form method='post' action='index.php?sec=gagente& + sec2=godmode/agentes/configurar_agente&create_agent=1'>"; + echo "<input type='submit' class='sub next' name='crt' + value='".__('Create agent')."'>"; + echo "</form></td></tr></table>"; ?> 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 "</table>"; // ========================== echo "<h3>".__('Assigned modules')."</h3>"; -$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 '<td class="datos2">'.__('Max. Value')."</td>"; echo '<td class="datos2"><input type="text" name="form_maxvalue" size="5" value="'.$form_maxvalue.'"></td>'; echo '</tr>'; +// Warning value threshold +echo '<tr>'; +echo '<td class="datos2">'.__('Warning status')."</td>"; +echo '<td class="datos2">'.__("Min").' <input type="text" name="form_min_warning" size="5" value="'.$form_min_warning.'">'; +echo ' '.__("Max").' <input type="text" name="form_max_warning" size="5" value="'.$form_max_warning.'"></td>'; + +// Critical value threshold +echo '<td class="datos2">'.__('Critical status')."</td>"; +echo '<td class="datos2">'.__("Min").' <input type="text" name="form_min_critical" size="5" value="'.$form_min_critical.'">'; +echo ' '.__("Max").' <input type="text" name="form_max_critical" size="5" value="'.$form_max_critical.'"></td>'; +echo '</tr>'; + +echo "<tr>"; +echo '<td class="datos2">'.__('Historical data')."</td>"; +echo '<td class="datos2">'; +print_checkbox ("form_history_data", 1, $form_history_data, false); + +echo '<td class="datos">'.__('FF Threshold'); +pandora_help ("ff_threshold"); +echo '</td>'; +echo '<td class="datos"><input type="text" name="form_ff_event" size="5" value="'.$form_ff_event.'"></td>'; + // Post process / Export server echo '<tr>'; echo '<td class="datos">'.__('Post process'); @@ -268,14 +295,14 @@ echo '<td class="datos2" valign="top">'.__('TCP send'); pandora_help ("tcp_send"); echo "</td>"; -// SNMP module, tcp_send contains the SNMP version if ($form_id_tipo_modulo >= 15 && $form_id_tipo_modulo <= 18) { - echo '<td class="datos2"><textarea cols=20 style="height:55px;" name="form_tcp_send_void"></textarea>'; + echo '<td class="datos2" colspan=3 ><textarea cols=65 style="height:55px;" name="form_tcp_send_void"></textarea>'; } else { - echo '<td class="datos2"><textarea cols=20 style="height:55px;" name="form_tcp_send">'.$form_tcp_send.'</textarea>'; + echo '<td class="datos2" colspan=3 ><textarea cols=65 style="height:55px;" name="form_tcp_send">'.$form_tcp_send.'</textarea>'; } +echo '<tr>'; echo '<td class="datos2" valign="top">'.__('TCP receive')."</td>"; -echo '<td class="datos2"><textarea cols=20 style="height:55px;" name="form_tcp_rcv">'.$form_tcp_rcv.'</textarea>'; +echo '<td class="datos2" colspan=3><textarea cols=65 style="height:55px;" name="form_tcp_rcv">'.$form_tcp_rcv.'</textarea>'; echo '</tr>'; // 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 "<h2>".__('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)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp) z=>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) z<JiQ77e?Co>mGE%bzMbAc||LzxrkiXRT|GpTV>Dlw6{Lb>*)pnk8crA?-83v6@1@! zGFQ3d;L%^x_DWH!i-rF?xV-;i_jESl!0GiHJ<rqD(pBH$zAbdxSYICOX<rh*^rOJ0 TYuw*X00000NkvXXu0mjf3L3{Z literal 0 HcmV?d00001 diff --git a/pandora_console/images/dot_magenta.png b/pandora_console/images/dot_magenta.png new file mode 100644 index 0000000000000000000000000000000000000000..6176514f5bbd85caa3ea251981a23211a9a3bd05 GIT binary patch literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4F%}28J29*~C-V}>VN3FMcVYMs zf(!O8p9~b?EbxddW?<kJ24O~qS#u<Sg6t)pzOL*y8F?6l^^CJ@g@8hTJzX3_BreBJ z*z3jYD8v4|e)rD@lXhoJ;`Z`t6`6Kz<-1TFX1m_G>nABK`6Re*o0y7X<J8-~BiBf6 zkZ()$5n?FR-l<k}!<yk#smeN;b!N;4o=4Vx`Ihs=c1rM!SjYScEQ{3(w$A+Dy2^dy zorY@j9QCTT3j8wh?L8BWuDkq_n<jnY{Q-ZM{X#v=VI?Bp(_@4`w(ng$M=jWf<GPDT zltkHt@(8^X=PEpWw+XKcYTDEx%9gxP@&<d#Q>#nTOVnf!v!05M;4l^xQ;m$V>{D;H zNm$IMZ6&e2KzT;@1m6$BvEOR;NnCChE|U&)HTvtY&TRAl!<O}`k7JI!{*?d2{KdYy Va<zra8-M}9;OXk;vd$@?2>|$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 delta 1067 zcmV+`1l0TJ2J8rsBnkm@Qb$4nuFf3kks&aD*#Qg#94KGcI<Wu%1MEpeK~zY`#g<)Y z990y@e>XF;JKN2Y4-%41T8ND`(FUYG2u71e(DcDjH5S3DP_O~TR%z825&VX{`C>`+ z#VSSW2SFi{<Uy&3NWoMVT&PJQ&{&QAh`XEF&FswFxjy7(-NfA(5%j?2&g}i)Gyijc z?*E*-0$||oy{fzGW(>msKq<9u_I)46amZvcOifJ*{%11*n%kN<{@ihX`0+fh=Mshz z)G9a2uxM#&CBK|!Y;0^ZU$^S<0dPNX5HNtxfYZPbZ~!=@@pZtbzyrXYz%zia$4TI; zO-V;>n~Mu`yfgVWMxq8^`UnJ;X%VY`iPKek3qu3@OPQ}?4Zu#|c1`$EAk>6sfbBp( zunU+2hJkLt0@`!{r*tr9fjyg&Rvr|UOQLfd?OknLnY)Jd%Qlb-Ji*UbFEimxVB0ps z!^27`MWIk&dV0E&R36ls3iSIyJ?{lR1|A091nvONRoGt-to*G!;;}eVNrEtcz?UAs zox9HKN1ms?z8=r>P)ebcA`HXQa2$ttJg&ya$2Ss>0B)7<eGfbWGy_+F#<I1if%|}r ze%_pP5CljmS@8;F^S=`{q9l`Ty!PrFIG54@w6xePF0NoT?Zn68=+VP8Ha1rB`3*1# ze5c=E0lqC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9hb~hmbK{*__+8<C-Rf3 zd%<B*JC7Uy385_kf4S8QtgJ2b;>j!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$t<oCw|##2>1S&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(Hmg<m7~QyNxjh$8iu5@=J?c zyzvG1A3yE}0w8}a&!yFiRN{E7r^ogEm+>CxYPCwae_T#dNEn739v-r>vBBo%Cf3?c zWE1dOtwy8K;9bZ8I5;@yNyqy7x>T!GR#sNfT6aK|QXM~^o}QwVdMlU7q~mXRx?8zi zj$*M$v-!`aOT2E3p<b`!c^-vAp=S?_0vPp!G)a3R=%b?}%H=Xa5FjEw5!G6g&1Px0 l+wAY}9gl>4n`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`#g<!W z990~~f0LQX&UTaLLSwQ?ilL#VwSiC(#b_@2P(|x47Qs}Zc%cs(!KyFfgI9<TJ``J0 zL9j{`6bU{=l2|G!TC`#;0T*i`1R9lC+qk=#-OSF+nd3uFmd$3i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tzD-U$FD`BX_<`5e@Y+I^?IG1ot=aQ!Z76I<b<uQ zEw;C}vDWsOO@KEV4O*?%#2!0Idw!)tJU%||d&tJdhSckIR#sNfTK9k|rFwckKR-t) zHMSTB-Q=~o$6yqTMJkmF?e@P#muTG>L$le$^E}Gsa$gO+N<$gu=cDHO)@2pb>guX& zZf+6;FaaXc$EentLZLvn+vV`^urEu)8px=>x@p|wA9ti8<B|~erT_o{07*qoM6N<$ Ef>+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*{<brS_)g^-1XeNs^5jZxi*poPYUAE89wqRZ~=%<P$e zvvbbr!gq(=aaOyk2VTzMdH?5}|NDRc&-0!f3|@C_w)o;p<nwuuW!a4D<m9AsxomWF z)b{P$bN=TjK;OKxZG3E_YNaZUV_BBTvP_z$jWIGZV$-Hgr+Z&JhHyS2Jc&zj8D0vQ zjd%}N;7;5d@?H2Cx8WLWz+@P2;OiNGq}z){S<2AMuR3)2IOsU5UAYoDXKuHAF7fzd z4>puPMcj$Qcr=iG0=w}DzQfLtKNII-0E=)4w_`EpU|v|jmav#_aQO_<S<G0eWW3sD zaK#!>`TNTmcG<RVn}rJ(TDx{_b_%=f!<$I40}tYUybyL^Mbjcb#9d+jYV2x%Aw)MO zPO?YGnH{n$Q;QR6%5R6aShr@q?(Xhc?NTn6ZQi`O`2#=V7Ocdx_$8=#46ot&Cj4%! zLLZKzciP-K+>Ft1Ka+I5UYDhrdcCe(iL@7s`upd3=D8Oguj~WG_6`$KS(_#Dxx|L` z_v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4DxR|Z_T-mQ<fqw?*m=oi zIXh_@Kn!$)fPY@UMB}Fi07M^Oos!GW&JHUpD{O3RNS<6oL@A|Y@^~lb^BkH+czjL+ zRKBVpA|%G*9Q<?mj7JYPsaC7GatXtb?d|QU$CyVji`>wm$>*&6&;V(gB2GxtlrV}Z z`#$yhRet~DPd-QQ0r1NePU4UfH}I6@*UkIXYPFd)n}0=UR?`5U=ix*!#uD^S(ErQj z;@l_h+-;zBiIVnNtX?BFAupc4q|=QuH9k)0yt*z#+89G^VV=#0KNH6>Z{B>7%fKcG z4y6<(jVWC$(+>Wn*KcF3%az8o?9bEsG|VJk18A+;+uLJdVS!1x^y83ZkZ?gMV$<g& ziLlm=bbns7P8X@aS=!ExG{F4){HR(OV{js*&d`qoE+`Md@$TR?{W!q7G?R4EM9jj@ zA|(ybZnsI21Zyo?Yea-AON;z?^By1Gei+{bsB!a~TYS6nHM?m#bHbff_KM&%K&#cF z*=!Dv5MvBSM@Ou!t+Bqoj&p7l*<o}$oen_|%zxB0ibS&rP6Heq9Gn8JuC7X})na*h z8PD@ZM3qt_J@<M&lv3yJc14>^7EWg^nwy)W(P$7wUy^R9b!#o%ZWrJ8sn_eH_eHzg z<PTGkN|S}lBz=5*OtaY}j$=gRR75?`qf)7mBnkWb`-SRs(PmN<_aBY|Du^TYHYorA O00{s|MNUMnLSTXld5ISQ diff --git a/pandora_console/images/mod_snmp_inc.png b/pandora_console/images/mod_snmp_inc.png index 7c51862564ea298903bb1f859eefde05e039b856..f2ef77c7954195615767fc996accadd38248186d 100644 GIT binary patch delta 1041 zcmV+s1n&E#2Db>1Bnkm@Qb$4nuFf3kks%a+010qNS#tmY3ljhU3ljkVnw%H_000Mc zNliru*#Qg#90eK(X2bvh1Gh;;K~zY`#g=Vo97Pz%f7{*MZ9T%h(2!oDB{USP35p*K z8c94sEL6c4iqiO{pv8ugswsX@6crJp-xMSj0#=C<Ukdg^F(47ONGLQ&Do5KC5(E){ zTHE7ZcJFrQc6a=c$+3623wj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9Z5f>C0ILigwS5 zLC7nnrKKfVU0o%PV?<;mqMqkbsZ>akg#G>fkt`K;k33_a(mmb*C3zvY>StbS00000 MNe4wvM6N<$f_j5`dH?_b diff --git a/pandora_console/images/mod_snmp_proc.png b/pandora_console/images/mod_snmp_proc.png index 7379f486bf52be68990fa0d4a51cedd0e3f4e19d..fe52f28803fb083ec104e4ebc89b8cb28bbd07ed 100644 GIT binary patch delta 1146 zcmV-=1cm#t2A>I#Bnkm@Qb$4nuFf3kks%a+010qNS#tmY3ljhU3ljkVnw%H_000Mc zNliru*#Qg#9Rzd~XA=Mb1RqI6K~zY`#g=Pm990y6zsXE?H!d-o(2#DTH5f{(2^K-C zMiN&ME2*MrQJNwYwWOh>YKlJ;#fpeg@JD=*3PGzxiI0N*2o07>eGw}SlFDM6LV_TF zf~8&dF}s<W-I?o;oGi1iNPl_YvUktDbMLw5eCOP&0mSaUOKsh91G=sQpp+{4&FAx& zrb#lHWOjB|<9`+dptXGiqlZSxWpg-=gHj5m6rSf5TOyHQVq#*wwSvGHunDk$7l9jr zn}9cE&M5FHa4WD2*em)b;49!^;7;IwAdr`K1o*DP=wK*>@?h+(aV{)f1|WP@5HoAB zu`PnGxjcVpf6?<bWEZdmJSWD!0Gt7y1%3eLMBe~h1M~x%feXMRz*e9hXqN*VmBX9@ zZmuv|Igm=H$>ajWcI*Qn`_D`XF4NP~baizxJUpyw;BprD0Puj5z<%Iq;B|?Az>cy* zegQlt<97h3t2iP8tW?D#+z>`7h3&X_9{ja*lmq)lh(sbaaWPGk$;nCoTE7Di00Y2b z;7{@5CEy+4wX(g>0K0)!;3ClC8#@5(1d`IPG`dhIpgcvPP{7Pu1VbUB(RN;W^$jj( z&jJt%hFP&p0(7HmE(b@RqNT-uzYi}1Gr*Lz@5N|<V}d|;+5YE+{f~i{eERnVkJ^c- z>pGrNIF3s?vw|VG)Hhz_@!c^DBS63i(Hhx=<(M4%@*9$=Y&qjoz(>OM2H+FGUum8J z;${1P4tyqgaAnoQaU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M$Os*4EhG-j*_4L_{g2B)`3Rf7ybj2_E-p zfZCNBB0^#;&cW+ffAHhI9qRRZDK23cvcJDSbsNhB7KzIilz%SD4-Jr}DdL1QO$noz zs_)Zm-r$#Cf8%ZR0sy~S<17xTa1&2ie%kqtMx!w|vwuZ`<~0rAc^*y#V=O`c4E;YY zmlyu!>u*|UU7@0Vmg^r8n~=wkp3v<@g^Z62dS9+*5^ap3v9!p}_g@jmG0&gB!)0g_ z1cy=zlg3moSLp<A=npzr>q^m>mi=X{PaBgTuK~2y93LOEw6sJXmq8qo3==LXMQjF~ zB@x!z5r5~i)ahw_&Qjm={W|MdTwEMg3u6pUgwz=Zalj?zAvpdzdBz|Pur4hWJ*&|3 z4wlSc<P#C40Xm%yNs?f#MQe?SaQ)gccW-^m%RgU^e;8<R>*L#evi2c|X?h`y=20li zi-}0L+iiAtce5y9jN$b3l+Ddewzjr#&W$3QMSr*3?GgmR%(eC+6I277oSaNdvcA49 z?RJ}$l@&bC8wpiPjd<?&`zWPmPR5HUbrYiVwy>~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+}1kwAE2Ga<TBnkm@Qb$4nuFf3kks%a+010qNS#tmY3ljhU3ljkVnw%H_000Mc zNliru*#Qg#8Y<_5{2KrO1Jg-FK~zY`#nxMhRaG1Y@Za$qXO2xW7Ze-qVhxg|1U)2a zXcKg!dWew1=ppE)h+UK(ilRcIsh2Pa4TSDtSLz|M2g7<$3?(!s)IbR&NNk!pbI#0v zIeX6Ds|S~dGsn?1i2ktHi?#M%|8ITk`+s}op#P>D!@?`ClF#Qs2w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~x7#F1 rf{08w>UkcuT8%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 z4<vyaumGF|UINAd1NaI!4?GW?1_E7wKLfsPiFCrUxW00Y&u2ctNVO5j0D&N8#z?l= z475MO;oOmW=9`pvbo(9ff{qVr!pDF}6P^e9fG>e_K!=|5cuS;}51w*K?cYOoppV<v z{v@`#2c!aD@arEpnRceJEQ`_6QKgikTCFlSHz!&=(U)}=L){<K?US1@X?-$(t;xeq z+DIh{qmV%Q{C@c_K0Ngv>2w<3_fblrlp>0vdUYHJ+qTuz)Kn|P<AA%v*jvCMprGT{ zNQYsFl#-fXrC9l!gpnYV>ErANA5mLe1R!B2aVj32y*+q_$s4Cn($&?~>fO1d_4|YF zzYlz`<4?6b{@q1141=VRB<Zw&6RapAS5YjLuu3(K<zB>$$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 zQbkH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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;n2Z&|syI1gVHcq=zU07n`&guo~ze<Nld{ z*`1l4H$M+~E*ovSv%UC*$NRmR_kMi&z3=b)41m(3kI2EXdoWEC01??Sw^}V6$DvZG zu(Y&f@IS)>7#i8j>>IQE^z)B+fkzZ6kZo=WGr_*S!?<;q`T6-cIo}8F1kykgSOty) zPXjZ63495h0v-d70WCc~2EK_!I%V5`T)KRbPZmGK%=XbzEes42R)Tb2hOz!bJXw0G zUHL9}UC-YFkL&obCVUi#G~pFs1o#{{2@L2n55yuZ0r=v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;wveLMbJq_e4aE=KA;2<_zY}3I||m<tlf-y35bM{6t^^;@HCJ z{EW_U?dmdq$7g3}XY7jx0n@<7<<knA2s-Dw{QCSE4{Hz5#Tk0GheDBYGUR6ptj)g3 z2bB*K<<A>wkbl#J10V)M2`JvULV0b4m(Tttb94o)fKmMM*PlH09^<+$)oN8lgl@OX z-rnBS0OwJ72)d9jV8s%}5j|^o@#G)weepH(^Ya*E5D`R#IF6IU^E|56s_gFWP6d7u z<sE=1im=vlV!E{af63__rP2!De0!ghMgxFcA&=*WEPpI75o(9ezWkiU#l?x$6cIJ* z@2TvewI;9g<h@yX&xJS;TJ1J&`-D#_@8e{%IBu5tSIZm)86JK2J<XOsk;nV6mj#?a z8)LZn$}R4^^(jFRP|MX25uBg{v7nS93JjTCj@hH%DZcy-YvYNRdmQLR3vd7&$Kl}M zfQ5wx0DrRCED{S*WC=WvUKpU%45oWR=y$Q!CO#jr!6}QV!SQHr@cJSJIQ_xg++6Z= z0f<G2jUi}zC_MwQ(D>m;g0@E-r9+?P=d|Jm?34Q3nb60_$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<VqWE~B+hK$TL7pF5pSf0-v1_EMoo zqgX6bsZ{WNA8T#mb!#oHRtwj4DV0h?J#dBvIPFRq^EXt3{+?**(wb>?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!<b;JMw1IkH6K~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NJ~^~ws@-+hOB z_wV;V^)KXdk(Y10$tzc1q!!2gAJK>EgP+&q4SztrUT1fAx32=$T8@v8+1}n}XJ>~b zNe0UH)onJLwA<~e`|hk;_E=9h8jYbrHa9n=UawOwm(f}eK$TJhKX*DElu|s;qDwoU z%nUsm#bS|4r9uz{IOhglch1pjweUQTQmHhw2Bx(^8hGEUlWIfHr7foQ^>x|W+9C`? 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 '<td class="'.$tdcolor.'" align="center">'; + echo "<a href='index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id=$id_grupo'>"; + echo print_group_icon ($id_grupo); + //echo ' (<b>'; + //echo get_group_name ($id_grupo); + //echo "</b>)"; + echo "</A>"; - echo "<a href='index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id=$id_grupo'>"; - print_group_icon ($id_grupo); - echo "<td class='$tdcolor'> ". - $numero_modulos." <b>/</b> ".$numero_monitor; - if ($monitor_bad != 0) { - echo " <b>/</b> <span class='red'>".$monitor_bad."</span>"; - } - if ($monitor_down != 0){ - echo " <b>/</b> <span class='grey'>".$monitor_down."</span>"; - } + echo "<td class='$tdcolor'><b>".$numero_modulos." : "; + if ($monitor_normal > 0) + echo " <span class='green'>".$monitor_normal."</span>"; + if ($monitor_warning > 0) + echo " <span class='yellow'>".$monitor_warning."</span>"; + if ($monitor_critical > 0) + echo " <span class='red'>".$monitor_critical."</span>"; + if ($monitor_down > 0) + echo " <span class='grey'>".$monitor_down."</span>"; echo "</td>"; echo "<td class='$tdcolor' align='center'>"; - if ($numero_monitor != 0){ - if ($estado_general != 0){ - if ($estado_cambio == 0){ - echo '<img src="images/pixel_red.png" width="40" height="18" title="'.__('At least one monitor fails').'" />'; - } else { - echo '<img src="images/pixel_yellow.png" width="40" height="18" title="'.__('Change between Green/Red state').'" />'; - } - } elseif ($monitor_ok > 0) { - echo '<img src="images/pixel_green.png" width="40" height="18" title="'.__('All Monitors OK').'" />'; - } elseif ($monitor_down > 0) { + if ($numero_modulos > 0){ + if ($agent_down > 0) { echo '<img src="images/pixel_fucsia.png" width="40" height="18" title="'.__('Agent down').'" />'; - } elseif ($numero_datamodules == 0) { - echo '<img src="images/pixel_blue.png" width="40" height="18" title="'.__('Agent without data').'" />'; } - } else { - if ($agent_down && $numero_datamodules == 0) { - echo '<img src="images/pixel_fucsia.png" width="40" height="18" title="'.__('Agent down').'" />'; - } elseif ($numero_datamodules == 0) { - echo '<img src="images/pixel_blue.png" width="40" height="18" title="'.__('Agent without data').'" />'; + elseif ($monitor_critical > 0){ + echo '<img src="images/pixel_red.png" width="40" height="18" title="'.__('At least one module in CRITICAL status').'" />'; + } elseif ($monitor_warning > 0) { + echo '<img src="images/pixel_yellow.png" width="40" height="18" title="'.__('At least one module in WARNING status').'" />'; } else { - echo '<img src="images/pixel_gray.png" width="40" height="18" title="'.__('Agent without monitors').'" />'; - } + echo '<img src="images/pixel_green.png" width="40" height="18" title="'.__('All Monitors OK').'" />'; + } + } else { + echo '<img src="images/pixel_blue.png" width="40" height="18" title="'.__('Agent without data').'" />'; } + // checks if an alert was fired recently echo "<td class='$tdcolor' align='center'>"; 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 '<div style="height: 10px"> </div>'; //Floating div echo '<div style="float:right; width:300px; padding-top:16px;">'; echo '<b>'.__('Agent access rate (24h)').'</b><br /><br />'; -echo '<img border="1" src="reporting/fgraph.php?id='.$id_agente.'&tipo=agentaccess&periodo=86400&height=70&width=280" />'; +echo '<img border="1" src="reporting/fgraph.php?id='.$id_agente.'&tipo=agentaccess&periodo=1440&height=70&width=280" />'; echo '<div style="height:25px"> </div>'; echo '<b>'.__('Events generated -by module-').'</b><br /><br />'; echo '<img border="1" src="reporting/fgraph.php?tipo=event_module&width=250&height=180&id_agent='.$id_agente.'" />'; @@ -85,17 +85,15 @@ echo '<td class="datos2" colspan="2">'.$agent["comentarios"].'</td></tr>'; // Group echo '<tr><td class="datos"><b>'.__('Group').'</b></td>'; echo '<td class="datos" colspan="2">'; -print_group_icon ($agent["id_grupo"]); -echo '</td></tr>'; +echo print_group_icon ($agent["id_grupo"]); +echo ' (<b>'; +echo get_group_name ($agent["id_grupo"]); +echo '</b>)</td></tr>'; // Agent version echo '<tr><td class="datos2"><b>'.__('Agent Version'). '</b></td>'; echo '<td class="datos2" colspan="2">'.$agent["agent_version"].'</td></tr>'; -// Total packets -echo '<tr><td class="datos"><b>'. __('Total packets'). '</b></td>'; -echo '<td class="datos" colspan=2>'.get_agent_modules_data_count ($id_agente).'</td></tr>'; - // Last contact echo '<tr><td class="datos2"><b>'.__('Last contact')." / ".__('Remote').'</b></td><td class="datos2 f9" colspan="2">'; print_timestamp ($agent["ultimo_contacto"]); @@ -129,4 +127,4 @@ echo '<td class="datos f9" colspan="2"><img src="reporting/fgraph.php?tipo=progr //End of table echo '</table></div>'; -?> \ No newline at end of file +?> diff --git a/pandora_console/operation/agentes/estado_grupo.php b/pandora_console/operation/agentes/estado_grupo.php index 05a928e65f..5948973466 100644 --- a/pandora_console/operation/agentes/estado_grupo.php +++ b/pandora_console/operation/agentes/estado_grupo.php @@ -48,6 +48,7 @@ if (isset ($_GET["update_netgroup"])) { // Get group list that user has access $groups = get_user_groups ($config['id_user']); + $groups_info = array (); $total_agents = 0; $now = get_system_time (); @@ -64,8 +65,9 @@ foreach ($groups as $id_group => $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 .= '<img src="images/dot_red.png" title="'.__('Modules bad').'" />'; + if ($group_info['critical'] > 0) { + $icono_type .= '<img src="images/dot_red.png" title="'.__('Modules critical').'" />'; } - if ($group_info["ok"] > 0) { - $icono_type .= '<img src="images/dot_green.png" title="'.__('Modules OK').'" />'; + if ($group_info["normal"] > 0) { + $icono_type .= '<img src="images/dot_green.png" title="'.__('Modules normal').'" />'; + } + + if ($group_info["warning"] > 0) { + $icono_type .= '<img src="images/dot_yellow.png" title="'.__('Modules warning').'" />'; } // Show yellow light if there are recent alerts fired for this group if ($group_info["alerts"] > 0 ) { - $icono_type .= '<img src="images/dot_yellow.png" title="'.__('Alerts fired').'" />'; + $icono_type .= '<img src="images/dot_magenta.png" title="'.__('Alerts fired').'" />'; } // Show grey light if there are agent down for this group @@ -187,22 +189,24 @@ for ($table = 0; $table < $ancho; $table++) { $celda = '<td class="top" style="border: 5px solid #aeff21;" width="100">'; // Grey border if agent down - if ($config["show_unknown"] > 0) { - if ($group_info["down"] > 0) - $celda = '<td class="top" style="border: 5px solid #aabbaa;" width="100">'; - } + if ($group_info["down"] > 0) + $celda = '<td class="top" style="border: 5px solid #aabbaa;" width="100">'; - // Yellow border if agents with alerts + // Yellow border if agents WARNING + if ($group_info["warning"] > 0) + $celda = '<td class="top" style="border: 5px solid #FFD800;" width="100">'; + + // Red border if agents CRITICAL + if ($group_info["critical"] > 0) + $celda = '<td class="top" style="border: 5px solid #FF0000;" width="100">'; + + // Magenta border if agents with alerts if ($group_info["alerts"] > 0) - $celda = '<td class="top" style="border: 5px solid #ffea00;" width="100">'; + $celda = '<td class="top" style="border: 5px solid #F200FF;" width="100">'; - // Red border if agents bad - if ($group_info["bad"] > 0) - $celda = '<td class="top" style="border: 5px solid #ff0000;" width="100">'; - - // Orange if alerts and down modules - if (($group_info["bad"] > 0) && ($group_info["alerts"] > 0)) - $celda = '<td class="top" style="border: 5px solid #ffbb00;" width="100">'; + // Black if alerts and down modules + if (($group_info["critical"] > 0) && ($group_info["alerts"] > 0)) + $celda = '<td class="top" style="border: 5px solid #000000;" width="100">'; $celda .= '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$group_info["id_group"].'" class="info">'; @@ -210,25 +214,24 @@ for ($table = 0; $table < $ancho; $table++) { $celda .= '<img class="top" src="images/groups_small/'.$icono_grupo.'.png" height="32" width="32" alt="" />'; // Add float info table - $celda .= '<span><table cellspacing="2" cellpadding="0" style="margin-left:2px;"> - <tr><th colspan="2" width="91">'.__('Agents').':</th></tr> + $celda .= '<span><table cellspacing="0" cellpadding="0" style="margin-left:2px; background: #ffffff;"> + <tr><th colspan="2" width="140">'.__('Agents').':</th></tr> <tr><td colspan="2" class="datos" align="center"><b>'.$group_info["agent"].'</b></td></tr> </table> - <table cellspacing="2" cellpadding="0" style="margin-left:2px"> - <tr><th colspan="2" width="90">'.__('Monitors').':</th></tr> - <tr><td class="datos"><img src="images/b_green.png" align="top" alt="" />'.__('Ok').':</td> - <td class="datos"><font class="greenb">'.$group_info["ok"].'</font></td></tr> - <tr><td class="datos"><img src="images/b_red.png" align="top" alt="" />'.__('Fail').':</td> - <td class="datos"><font class="redb">'.$group_info["bad"].'</font></td></tr>'; + <table cellspacing="0" cellpadding="2" style="margin-left:2px"> + + <tr><td class="datos"><img src="images/b_green.png" align="top" alt="" />'.__('Normal').'</td> + <td class="datos"><b>'.format_for_graph ($group_info["normal"] , 1).'</b></td></tr> + <tr><td class="datos"><img src="images/b_yellow.png" align="top" alt="" />'.__('Warning').'</td> + <td class="datos"><b>'.format_for_graph ($group_info["warning"] , 1).'</b></td></tr> + <tr><td class="datos"><img src="images/b_red.png" align="top" alt="" />'.__('Critical').'</td> + <td class="datos"><b>'.format_for_graph ($group_info["critical"] , 1).'</b></td></tr>'; - if ($config["show_unknown"] > 0) { - $celda .= '<tr><td class="datos"><img src="images/b_white.png" align="top" alt="" />'.__('Down').':</td> - <td class="datos"><font class="redb">'.$group_info["down"].'</font></td></tr>'; - } + $celda .= '<tr><td class="datos"><img src="images/b_white.png" align="top" alt="" />'.__('Down').'</td> + <td class="datos"><b>'.format_for_graph ($group_info["down"] , 1).'</b></td></tr>'; - if ($config["show_lastalerts"] == 1) - $celda .= '<tr><td class="datos"><img src="images/b_yellow.png" align="top" alt="" />'.__('Alerts').':</td> - <td class="datos"><font class="grey">'.$group_info["alerts"].'</font></td></tr>'; + $celda .= '<tr><td class="datos"><img src="images/b_magenta.png" align="top" alt="" />'.__('Alerts').'</td> + <td class="datos"><b>'.$group_info["alerts"].'</b></td></tr>'; $celda .= "</table></span></a>"; 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] = '<img src="images/'.show_icon_type ($module["id_tipo_modulo"]).'" border="0">'; + if (give_acl ($config['id_user'], $id_grupo, "AW")) + $data[1] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=2505&tab=module&update_module='.$module["id_agente_modulo"].'&moduletype=2#modules"><img src="images/config.png"></a>'; $data[2] = substr ($module["nombre"], 0, 25); $data[3] = substr ($module["descripcion"], 0, 35); - if ($module["estado"] == 1 && $module["cambio"] == 1) { - $data[4] = '<img src="images/pixel_yellow.png" width="40" height="18" title="'.__('Change between Green/Red state').'">'; + if ($module["estado"] == 2) { + $data[4] = '<img src="images/pixel_yellow.png" width="40" height="18" title="'.__('WARNING'). ' : '. $module["datos"].'">'; } elseif ($module["estado"] == 1) { - $data[4] = '<img src="images/pixel_red.png" width="40" height="18" title="'.__('At least one monitor fails').'">'; + $data[4] = '<img src="images/pixel_red.png" width="40" height="18" title="'.__('CRITICAL'). ' : '. $module["datos"].'">'; } else { - $data[4] = '<img src="images/pixel_green.png" width="40" height="18" title="'.__('All Monitors OK').'">'; + $data[4] = '<img src="images/pixel_green.png" width="40" height="18" title="'.__('NORMAL'). ' : '. $module["datos"].'">'; } if ($module["module_interval"] > 0) { @@ -99,14 +94,7 @@ foreach ($modules as $module) { } $data[6] .= print_timestamp ($module["utimestamp"], true); $data[6] .= '</span>'; - - 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 '<div class="nf">'.__('This agent doesn\'t have any active data modules').'</div>'; -} else { - echo "<h3>".__('Full list of Data Modules')."</h3>"; - 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 "</td><td class='".$tdcolor."'>"; echo "<img src='images/".show_icon_type($row3["id_tipo_modulo"])."' border=0>"; + if (give_acl ($config['id_user'], $id_grupo, "AW")) + echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=2505&tab=module&update_module='.$row3["id_agente_modulo"].'&moduletype=2#modules"><img src="images/config.png"></a>'; + + echo "</td><td class='".$tdcolor."'>"; if ($row3["module_interval"] != 0){ echo $row3["module_interval"]; @@ -130,7 +134,7 @@ if (mysql_num_rows ($result3)) { } echo "</td>"; } - if ($row3["id_tipo_modulo"] == 100) { + if (($row3["id_tipo_modulo"] == 100) OR ($row3['history_data'] == 0)) { echo "<td class='".$tdcolor."f9' colspan='2' title='".$row3["datos"]."'>"; echo substr(salida_limpia($row3["datos"]),0,12); } else { @@ -180,12 +184,17 @@ if (mysql_num_rows ($result3)) { echo '<a href="javascript:'.$link.'"><img src="images/grafica_h.png" border=0></a>'; } - // RAW Table data - echo "<td class=".$tdcolor." width=70>"; - echo "<a href='index.php?sec=estado&sec2=operation/agentes/datos_agente&period=2592000&id=".$row3["id_agente_modulo"]."'><img border=0 src='images/data_m.png'></a> "; - echo "<a href='index.php?sec=estado&sec2=operation/agentes/datos_agente&period=604800&id=".$row3["id_agente_modulo"]."'><img border=0 src='images/data_w.png'></a> "; - echo "<a href='index.php?sec=estado&sec2=operation/agentes/datos_agente&period=86400&id=".$row3["id_agente_modulo"]."'><img border=0 src='images/data_d.png'></a>"; - + + if ($row3['history_data'] == 1){ + // RAW Table data + echo "<td class=".$tdcolor." width=70>"; + echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=2592000&id=".$row3["id_agente_modulo"]."'><img border=0 src='images/data_m.png'></a> "; + echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=604800&id=".$row3["id_agente_modulo"]."'><img border=0 src='images/data_w.png'></a> "; + echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=86400&id=".$row3["id_agente_modulo"]."'><img border=0 src='images/data_d.png'></a>"; + } else { + echo "<td class=".$tdcolor."></td>"; + } + echo "<td class='".$tdcolor."f9'>"; 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 "<div id='menu_tab_frame_view'>"; echo "<div id='menu_tab_left'><ul class='mn'><li class='view'> -<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente'><img src='images/bricks.png' class='top' border=0> ".substr(get_agent_name($id_agente),0,15)." - ".__('View mode')."</a>"; +<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente'><img src='images/bricks.png' class='top' border=0> ".substr(get_agent_name($id_agente),0,21)."</a>"; echo "</li>"; echo "</ul></div>"; $tab = get_parameter ("tab", "main"); @@ -197,7 +197,7 @@ echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente= echo "</li>"; // Data -if ($tab == "data") { +if (($tab == "data") OR ($tab == "data_view")){ echo "<li class='nomn_high'>"; } else { echo "<li class='nomn'>"; @@ -223,6 +223,14 @@ if ($tab == "sla") { echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=sla&id_agente=$id_agente'><img src='images/images.png' class='top' border=0> ".__('S.L.A')." </a>"; echo "</li>"; +// Group tab +echo "<li class='nomn'>"; +echo "<a href='index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id=$id_grupo'>"; +echo "<img src='images/god4.png' class='top' border=0> "; +echo __("Group"); +echo "</a></li>"; + + // Inventory enterprise_hook ('inventory_tab'); @@ -244,6 +252,9 @@ case "main": require "estado_alertas.php"; require "status_events.php"; break; +case "data_view": + require "datos_agente.php"; + break; case "data": require "estado_ultimopaquete.php"; break; diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 5c7dba396b..0dce437232 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -60,6 +60,8 @@ $id_agent = (int) get_parameter ("id_agent", -1); //-1 all, 0 system $id_event = (int) get_parameter ("id_event", -1); $pagination = (int) get_parameter ("pagination", $config["block_size"]); $groups = get_user_groups ($config["id_user"], "IR"); +$event_view_hr = (int) get_parameter ("event_view_hr", $config["event_view_hr"]); +$id_user_ack = (int) get_parameter ("id_user_ack", 0); //Group selection if ($ev_group > 1 && in_array ($ev_group, array_keys ($groups))) { @@ -90,6 +92,11 @@ if ($id_agent != -1) $sql_post .= " AND id_agente = ".$id_agent; if ($id_event != -1) $sql_post .= " AND id_evento = ".$id_event; +if ($id_user_ack != 0) + $sql_post .= " AND id_usuario == '$id_user_ack' "; + +$unixtime = date("U") - ($event_view_hr*60*60); +$sql_post .= " AND utimestamp > $unixtime "; $url = "index.php?sec=eventos&sec2=operation/events/events&search=$search&event_type=$event_type&severity=$severity&status=$status&ev_group=$ev_group&refr=60&id_agent=$id_agent&id_event=$id_event&pagination=$pagination"; @@ -104,14 +111,12 @@ if ($config["pure"] == 1) { echo "</h2>"; echo '<a href="#" id="tgl_event_control"><b>'.__('Event control filter').'</b> '.'<img src="images/wand.png" /></a>'; -if ($config["pure"] == 1) { + echo '<div id="event_control" style="display:none">'; -} else { - echo '<div id="event_control" style="display:block">'; //There is no value all to property display -} + // Table for filter controls echo '<form method="post" action="index.php?sec=eventos&sec2=operation/events/events&refr=60&pure='.$config["pure"].'">'; -echo '<table style="width:500px; float:left;" cellpadding="4" cellspacing="4" class="databox"><tr>'; +echo '<table style="width:550px; float:left;" cellpadding="4" cellspacing="4" class="databox"><tr>'; // Group combo echo "<td>".__('Group')."</td><td>"; @@ -183,8 +188,21 @@ echo "<td>"; print_select ($lpagination, "pagination", $pagination, 'javascript:this.form.submit();', __('Default'), $config["block_size"]); echo "</td>"; +echo "<td>".__('Max. hours old')."</td>"; +echo "<td>"; +print_input_text ('event_view_hr', $event_view_hr, '', 5); +echo "</td>"; + + +echo "<tr>"; +echo "<td>".__('User ack.')."</td>"; +echo "<td>"; +print_select_from_sql ("SELECT id_usuario, nombre_real FROM tusuario", "id_user_ack", $id_user_ack,'', __('Any'), '0', false, false, true); +echo "</td>"; + + //The buttons -echo '<td colspan="2">'; +echo '<td colspan=3>'; print_submit_button (__('Update'), '', false, 'class="sub upd"'); // CSV @@ -198,12 +216,12 @@ echo ' <a target="_top" href="operation/events/events_rss.php?ev_group='.$e echo "</td></tr></table></form>"; //This is the internal table -echo '<div style="width:250px; float:left;"><img src="reporting/fgraph.php?tipo=group_events&width=250&height=180&url='.rawurlencode ($sql_post).'" border="0"></div>'; +echo '<div style="width:220px; float:left;"><img src="reporting/fgraph.php?tipo=group_events&width=220&height=180&url='.rawurlencode ($sql_post).'" border="0"></div>'; echo '</div><div style="clear:both"> </div>'; $sql = "SELECT * FROM tevento WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC LIMIT ".$offset.",".$pagination; $result = get_db_all_rows_sql ($sql); -$sql = "SELECT COUNT(id_evento) FROM tevento WHERE 1=1 ".$sql_post; +$sql = "SELECT COUNT(id_evento) FROM tevento WHERE id_evento > 0 ".$sql_post; $total_events = get_db_sql ($sql); if (empty ($result)) { @@ -270,11 +288,10 @@ foreach ($result as $row) { // Colored box if ($row["estado"] == 0) { - $data[0] = '<img src="images/pixel_red.png" width="20" height="35" title="'.get_priority_name ($row["criticity"]).'" />'; + $data[0] = '<img src="images/pixel_red.png" width="20" height="20" title="'.get_priority_name ($row["criticity"]).'" />'; } else { - $data[0] = '<img src="images/pixel_green.png" width="20" height="35" title="'.get_priority_name ($row["criticity"]).'" />'; + $data[0] = '<img src="images/pixel_green.png" width="20" height="20" title="'.get_priority_name ($row["criticity"]).'" />'; } - switch ($row["event_type"]) { case "alert_recovered": @@ -283,12 +300,19 @@ foreach ($result as $row) { case "alert_manual_validation": $data[1] = '<img src="images/eye.png" title="'.__('Manual Alert Validation').'" />'; break; - case "monitor_up": - $data[1] = '<img src="images/lightbulb.png" title="'.__('Monitor Up').'" />'; + case "going_up_warning": + $data[1] = '<img src="images/b_yellow.png" title="'.__('Going up Warning').'" />'; break; - case "monitor_down": - $data[1] = '<img src="images/lightbulb_off.png" title="'.__('Monitor Down').'" />'; + case "going_up_critical": + $data[1] = '<img src="images/b_red.png" title="'.__('Going up Critical').'" />'; break; + case "going_down_normal": + $data[1] = '<img src="images/b_green.png" title="'.__('Going to Normal').'" />'; + break; + case "going_down_warning": + $data[1] = '<img src="images/b_yellow.png" title="'.__('Going down Warning').'" />'; + break; + case "alert_fired": $data[1] = '<img src="images/bell.png" title="'.__('Alert Fired').'" />'; break; @@ -343,7 +367,11 @@ foreach ($result as $row) { $data[5] = print_group_icon ($row["id_grupo"], true); if (!empty ($row["estado"])) { - $data[6] = '<a href="index.php?sec=usuario&sec2=operation/user/user_edit&ver='.$row["id_usuario"].'" title="'.dame_nombre_real ($row["id_usuario"]).'">'.substr ($row["id_usuario"],0,8).'</a>'; + if ($row["id_usuario"] != '0' && $row["id_usuario"] != ''){ + $data[6] = '<a href="index.php?sec=usuario&sec2=operation/user/user_edit&ver='.$row["id_usuario"].'" title="'.dame_nombre_real ($row["id_usuario"]).'">'.substr ($row["id_usuario"],0,8).'</a>'; + } else { + $data[6]=__('System'); + } } else { $data[6] = ''; } @@ -388,20 +416,22 @@ if (!empty ($table->data)) { } unset ($table); -echo '<div style="padding-left:30px; width:150px; float:left; line-height:17px;">'; -echo '<h3>'.__('Status').'</h3>'; -echo '<img src="images/dot_green.png" /> - '.__('Validated event'); -echo '<br />'; -echo '<img src="images/dot_red.png" /> - '.__('Not validated event'); +if ($config["pure"]== 0) { + echo '<div style="padding-left:30px; width:150px; float:left; line-height:17px;">'; + echo '<h3>'.__('Status').'</h3>'; + echo '<img src="images/dot_green.png" /> - '.__('Validated event'); + echo '<br />'; + echo '<img src="images/dot_red.png" /> - '.__('Not validated event'); -echo '</div><div style="padding-left:30px; width:150px; float:left; line-height:17px;">'; -echo '<h3>'.__('Action').'</h3>'; -echo '<img src="images/ok.png" /> - '.__('Validate event'); -echo '<br />'; -echo '<img src="images/cross.png" /> - '.__('Delete event'); -echo '<br />'; -echo '<img src="images/page_lightning.png" /> - '.__('Create incident'); -echo '</div><div style="clear:both;"> </div>'; + echo '</div><div style="padding-left:30px; width:150px; float:left; line-height:17px;">'; + echo '<h3>'.__('Action').'</h3>'; + echo '<img src="images/ok.png" /> - '.__('Validate event'); + echo '<br />'; + echo '<img src="images/cross.png" /> - '.__('Delete event'); + echo '<br />'; + echo '<img src="images/page_lightning.png" /> - '.__('Create incident'); + echo '</div><div style="clear:both;"> </div>'; +} ?> <script type="text/javascript" src="include/javascript/jquery.js"></script> <script language="JavaScript" type="text/javascript"> diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 8fce5275a2..3f2ed2f89c 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1,6 +1,6 @@ -- Pandora FMS - the Flexible Monitoring System -- ============================================ --- Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es +-- Copyright (c) 2005-2009 Artica Soluciones Tecnológicas, http://www.artica.es -- Please see http://pandora.sourceforge.net for full contribution list -- This program is free software; you can redistribute it and/or @@ -69,11 +69,8 @@ CREATE TABLE IF NOT EXISTS `tagente_datos` ( `id_agente_datos` bigint(20) unsigned NOT NULL auto_increment, `id_agente_modulo` int(10) unsigned NOT NULL default '0', `datos` double(18,2) default NULL, - `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', - `id_agente` int(10) unsigned NOT NULL default '0', `utimestamp` bigint(20) default '0', PRIMARY KEY (`id_agente_datos`), - KEY `data_index2` (`id_agente`,`id_agente_modulo`), KEY `data_index1` (`id_agente_modulo`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; @@ -81,7 +78,6 @@ CREATE TABLE IF NOT EXISTS `tagente_datos_inc` ( `id_adi` int(10) unsigned NOT NULL auto_increment, `id_agente_modulo` int(10) unsigned NOT NULL default '0', `datos` double(18,2) default NULL, - `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', `utimestamp` int(20) unsigned default '0', PRIMARY KEY (`id_adi`), KEY `data_inc_index_1` (`id_agente_modulo`) @@ -92,19 +88,17 @@ CREATE TABLE IF NOT EXISTS `tagente_datos_string` ( `id_tagente_datos_string` bigint(20) unsigned NOT NULL auto_increment, `id_agente_modulo` int(10) unsigned NOT NULL default '0', `datos` text NOT NULL, - `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', - `id_agente` int(10) unsigned NOT NULL default '0', `utimestamp` int(20) unsigned NOT NULL default 0, PRIMARY KEY (`id_tagente_datos_string`), - KEY `data_string_index_1` (`id_agente`,`id_agente_modulo`) + KEY `data_string_index_1` (`id_agente_modulo`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- delete "cambio" not used anymore CREATE TABLE `tagente_estado` ( `id_agente_estado` int(10) unsigned NOT NULL auto_increment, `id_agente_modulo` int(10) NOT NULL default '0', `datos` varchar(255) NOT NULL default '', `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', - `cambio` int(4) NOT NULL default '0', `estado` int(4) NOT NULL default '0', `id_agente` int(10) NOT NULL default '0', `last_try` datetime default NULL, @@ -112,6 +106,8 @@ CREATE TABLE `tagente_estado` ( `current_interval` int(8) unsigned NOT NULL default '0', `running_by` smallint(4) unsigned default '0', `last_execution_try` bigint(20) NOT NULL default '0', + `status_changes` tinyint(4) default 0, + `last_status` tinyint(4) default 0, PRIMARY KEY (`id_agente_estado`), KEY `status_index_1` (`id_agente_modulo`), KEY `status_index_2` (`id_agente_modulo`,`estado`), @@ -120,6 +116,7 @@ CREATE TABLE `tagente_estado` ( KEY `last_execution_try` (`last_execution_try`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- Probably last_execution_try index is not useful and loads more than benefits -- id_modulo now uses tmodule -- --------------------------- @@ -158,11 +155,17 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` ( `prediction_module` bigint(14) default '0', `max_timeout` int(4) unsigned default '0', `custom_id` varchar(255) default '', + `history_data` tinyint(1) unsigned default '1', + `min_warning` double(18,2) default 0, + `max_warning` double(18,2) default 0, + `min_critical` double(18,2) default 0, + `max_critical` double(18,2) default 0, + `min_ff_event` int(4) unsigned default '0', + `delete_pending` int(1) unsigned default 0, PRIMARY KEY (`id_agente_modulo`), KEY `main_idx` (`id_agente_modulo`,`id_agente`), KEY `tam_agente` (`id_agente`), KEY `id_tipo_modulo` (`id_tipo_modulo`), - KEY `tam_plugin` (`id_plugin`), KEY `disabled` (`disabled`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -171,7 +174,6 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` ( CREATE TABLE IF NOT EXISTS `tagent_access` ( `id_ac` bigint(20) unsigned NOT NULL auto_increment, `id_agent` int(10) unsigned NOT NULL default '0', - `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', `utimestamp` bigint(20) NOT NULL default '0', PRIMARY KEY (`id_ac`), KEY `agent_index` (`id_agent`) @@ -297,7 +299,7 @@ CREATE TABLE IF NOT EXISTS `tevento` ( `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', `evento` varchar(255) NOT NULL default '', `utimestamp` bigint(20) NOT NULL default '0', - `event_type` enum('unknown','monitor_up','monitor_down','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent') default 'unknown', + `event_type` enum('unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal') default 'unknown', `id_agentmodule` int(10) NOT NULL default '0', `id_alert_am` int(10) NOT NULL default '0', `criticity` int(4) unsigned NOT NULL default '0', @@ -307,10 +309,10 @@ CREATE TABLE IF NOT EXISTS `tevento` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- Criticity: 0 - Maintance (grey) --- Criticity: 1 - Low (green) --- Criticity: 2 - Normal (blue) --- Criticity: 3 - Warning (yellow) --- Criticity: 4 - Critical (red) +-- Criticity: 1 - Informational (blue) +-- Criticity: 2 - Normal (green) (status 0) +-- Criticity: 3 - Warning (yellow) (status 2) +-- Criticity: 4 - Critical (red) (status 1) CREATE TABLE IF NOT EXISTS `tgrupo` ( `id_grupo` mediumint(4) unsigned NOT NULL auto_increment, @@ -397,6 +399,12 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` ( `plugin_pass` varchar(250) default '', `plugin_parameter` text, `max_timeout` tinyint(3) unsigned default '0', + `history_data` tinyint(1) unsigned default '1', + `min_warning` double(18,13) default 0, + `max_warning` double(18,13) default 0, + `min_critical` double(18,13) default 0, + `max_critical` double(18,13) default 0, + `min_ff_event` int(4) unsigned default '0', PRIMARY KEY (`id_nc`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/reporting/fgraph.php b/pandora_console/reporting/fgraph.php index 50547da8bb..c10bd0f16e 100644 --- a/pandora_console/reporting/fgraph.php +++ b/pandora_console/reporting/fgraph.php @@ -47,6 +47,18 @@ function graphic_error () { imagePng($imgPng); } +/** + * Return a MySQL timestamp date, formatted with actual date MINUS X minutes, + * + * @param int Date in unix format (timestamp) + * + * @return string Formatted date string (YY-MM-DD hh:mm:ss) + */ +function dame_fecha ($mh) { + $mh *= 60; + return date ("Y-m-d H:i:00", time() - $mh); +} + /** * Return a short timestamp data, D/M h:m * @@ -458,9 +470,9 @@ function grafico_modulo_sparse ($id_agente_modulo, $periodo, $show_event, $min_value = 0; // Get the first data outsite (to the left---more old) of the interval given - $sql = sprintf ('SELECT datos FROM tagente_datos + $sql = sprintf ('SELECT datos, utimestamp FROM tagente_datos WHERE id_agente_modulo = %d - AND utimestamp < %d ORDER BY utimestamp DESC', $id_agente_modulo, $fechatope); + AND utimestamp < %d ORDER BY utimestamp DESC LIMIT 1', $id_agente, $id_agente_modulo, $fechatope); $previous = (float) get_db_sql ($sql); $sql = sprintf ('SELECT datos,utimestamp FROM tagente_datos @@ -787,9 +799,9 @@ function graphic_agentaccess ($id_agent, $periodo, $width, $height) { }*/ $intervalo = 24; - $fechatope = get_system_time () - $periodo; - - $horasint = $periodo / $intervalo; + $UNIXdate = date('U'); + $fechatope = $UNIXdate - (60*24*60); + $horasint = 86400 / $intervalo; // $intervalo now stores "ideal" interval } // interval is the number of rows that will store data. more rows, more resolution @@ -804,24 +816,25 @@ function graphic_agentaccess ($id_agent, $periodo, $width, $height) { for ($i = 0; $i < $intervalo; $i++) { $valores[$i][0] = 0; // [0] Valor (contador) $valores[$i][1] = 0; // [0] Valor (contador) - $valores[$i][2] = date ("Y-m-d H:i:00", get_system_time () - ($horasint * $i)); // [2] Rango superior de fecha para ese rango - $valores[$i][3] = date ("Y-m-d H:i:00", get_system_time () - ($horasint * ($i+1))); // [3] Rango inferior de fecha para ese rango + $valores[$i][2] = $fechatope + ($horasint * $i); // [2] Rango superior de fecha para ese rango + $valores[$i][3] = $fechatope + ($horasint*($i+1)); // [3] Rango inferior de fecha para ese rango } - $sql1="SELECT timestamp FROM tagent_access WHERE id_agent = ".$id_agent." and timestamp > '".date ("Y-m-d H:i:00", $fechatope)."'"; + $sql1="SELECT utimestamp FROM tagent_access WHERE id_agent = ".$id_agent." and utimestamp > '".$fechatope."'"; $result= get_db_all_rows_sql ($sql1); foreach ($result as $row) { - for ($i = 0; $i < $intervalo; $i++) { - if (($row["timestamp"] < $valores[$i][2]) and ($row["timestamp"] >= $valores[$i][3])) { + for ($i = 0; $i < $intervalo; $i++){ + if (($row["utimestamp"] > $valores[$i][2]) and ($row["utimestamp"] <= $valores[$i][3]) ){ // entra en esta fila $valores[$i][0]++; } - } + + } } $valor_maximo = 0; for ($i = 0; $i < $intervalo; $i++) { // 30 entries in graph, one by day - $grafica[]=$valores[$i][0]; + $grafica[]=$valores[$intervalo-$i][0]; if ($valores[$i][0] > $valor_maximo) $valor_maximo = $valores[$i][0]; } @@ -889,6 +902,7 @@ function graphic_string_data ($id_agent_module, $periodo, $width, $height, $pure $valores[$i][3] = $fechatope + ($horasint * ($i + 1)); // [3] Botom limit } $sql1="SELECT utimestamp FROM tagente_datos_string WHERE id_agente_modulo = ".$id_agent_module." and utimestamp > '".$fechatope."'"; + $result = get_db_all_rows_sql ($sql1); foreach ($result as $row) { @@ -1798,6 +1812,7 @@ function grafico_modulo_boolean ( $id_agente_modulo, $periodo, $show_event, } } + $last = $previous; // Calculate Average value for $valores[][0] for ($i =0; $i <= $resolution; $i++) {