From ba4e926831e0f3f3c8b65710561b57dc776b50b6 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 17 Apr 2008 15:27:25 +0000 Subject: [PATCH] 2008-04-17 Sancho Lerena * include/functions_db.php: Fixed problem in show_alert_row_mini() * operation/agentes/status_monitor.php: Almost all code changed. Added pagination, replaced query for a paginated version and a lot more efficient. Added freetext search on name / description of monitors. * operation/agentes/estado_ultimopaquete.php: Fixed problem with refresh / push buttons on data server modules. * godmode/admin_access_logs.php: Fixed several problems. Added a better pagination. * godmode/agentes/module_manager_editor.php, godmode/agentes/module_manager_editor_network.php: When pushed SNMP walk, lost all fields. Fixed. Also fixed problems with min/max. * godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/module_manager_editor_plugin.php godmode/agentes/module_manager_editor_prediction.php: Fixed problems with inverted max/min. * godmode/agentes/configurar_agente.php: Keepalive modules now are from id_module=1 (data server). before was type 0 and that gives a lot of problems. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@810 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 31 ++ pandora_console/godmode/admin_access_logs.php | 43 ++- .../godmode/agentes/configurar_agente.php | 8 +- .../godmode/agentes/module_manager_editor.php | 2 +- .../agentes/module_manager_editor_data.php | 4 +- .../agentes/module_manager_editor_network.php | 6 +- .../agentes/module_manager_editor_plugin.php | 4 +- .../module_manager_editor_prediction.php | 4 +- .../agentes/module_manager_editor_wmi.php | 4 +- pandora_console/include/config.php | 6 +- pandora_console/include/functions_db.php | 2 +- .../agentes/estado_ultimopaquete.php | 2 +- .../operation/agentes/status_monitor.php | 289 +++++++++--------- 13 files changed, 211 insertions(+), 194 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c7511a2ec9..d71ed62d11 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,34 @@ + + +2008-04-17 Sancho Lerena + + * include/functions_db.php: Fixed problem in show_alert_row_mini() + + * operation/agentes/status_monitor.php: Almost all code changed. + Added pagination, replaced query for a paginated version and a lot + more efficient. Added freetext search on name / description of + monitors. + + * operation/agentes/estado_ultimopaquete.php: Fixed problem with + refresh / push buttons on data server modules. + + * godmode/admin_access_logs.php: Fixed several problems. Added a + better pagination. + + * godmode/agentes/module_manager_editor.php, + godmode/agentes/module_manager_editor_network.php: When pushed + SNMP walk, lost all fields. Fixed. Also fixed problems with min/max. + + * godmode/agentes/module_manager_editor_data.php, + godmode/agentes/module_manager_editor_wmi.php, + godmode/agentes/module_manager_editor_plugin.php + godmode/agentes/module_manager_editor_prediction.php: Fixed problems + with inverted max/min. + + * godmode/agentes/configurar_agente.php: Keepalive modules now are + from id_module=1 (data server). before was type 0 and that gives a lot + of problems. + 2008-04-10 Sancho Lerena * godmode/agentes/configurar_agente.php: Fixe problem with server diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php index 05a983a374..2b57b48e66 100644 --- a/pandora_console/godmode/admin_access_logs.php +++ b/pandora_console/godmode/admin_access_logs.php @@ -97,33 +97,26 @@ else $url = "index.php?sec=godmode&sec2=godmode/admin_access_logs"; - //echo "URLTipolog $tipo_log"; - pagination ($counter, $url, $offset); - echo '
'; - // table header - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + // Prepare query and pagination + $query1 = "SELECT * FROM tsesion " . $tipo_log_select." ORDER BY fecha DESC"; + if ( $counter > $config["block_size"]) { + pagination ($counter, $url, $offset); + $query1 .= " LIMIT $offset , ".$config["block_size"]; + } + $result=mysql_query($query1); - // Skip offset records - $query1="SELECT * FROM tsesion ".$tipo_log_select." ORDER BY fecha DESC"; - $result=mysql_query($query1); - $offset_counter = 0; - while ($offset_counter < $offset){ - if ($row=mysql_fetch_array($result)) - $offset_counter++; - else - $offset_counter = $offset; //exit condition - } + // table header + echo '
'.$lang_label["user"].''.$lang_label["action"].''.$lang_label["date"].''.$lang_label["src_address"].''.$lang_label["comments"].'
'; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; - $offset_counter = 0; $color=1; // Get data - while ($row=mysql_fetch_array($result) and ($offset_counter < $block_size) ){ + while ($row=mysql_fetch_array($result)) { if ($color == 1){ $tdcolor = "datos"; $color = 0; @@ -132,14 +125,12 @@ $tdcolor = "datos2"; $color = 1; } - $usuario=$row["ID_usuario"]; - echo ''; - $offset_counter++; } // end table diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index c455088731..d46eea41f6 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -132,8 +132,8 @@ if ( isset ($_POST["create_agent"])) { // Create a new and shining agent $agent_creation_error = ""; $id_agente = mysql_insert_id (); // Create special MODULE agent_keepalive - $sql_insert = "INSERT INTO tagente_modulo (nombre, id_agente, id_tipo_modulo, descripcion) - VALUES ('agent_keepalive', ".$id_agente.",100,'Agent Keepalive monitor')"; + $sql_insert = "INSERT INTO tagente_modulo (nombre, id_agente, id_tipo_modulo, descripcion, id_modulo) + VALUES ('agent_keepalive', ".$id_agente.",100,'Agent Keepalive monitor',1)"; $result=mysql_query($sql_insert); $id_agent_module = mysql_insert_id(); // And create MODULE agent_keepalive in tagente_estado table @@ -264,8 +264,6 @@ if (isset($_GET["delete_alert_comp"])){ // if modified some parameter // Create alert // ============= if (isset($_POST["insert_alert"])){ // if created alert - - $combined = get_parameter ("combined",0); $id_agente_modulo = get_parameter ("agente_modulo",0); $maximo = get_parameter ("maximo",0); @@ -618,13 +616,11 @@ if ((isset($_POST["update_module"])) || (isset($_POST["insert_module"]))) { require ("general/footer.php"); exit; } - $form_id_tipo_modulo = get_parameter ("form_id_tipo_modulo"); $form_name = get_parameter ("form_name"); $form_description = get_parameter ("form_description"); $form_id_module_group = get_parameter ("form_id_module_group",0); $form_flag = get_parameter ("form_flag",0); - $form_id_tipo_modulo = get_parameter ("form_id_tipo_modulo"); $form_post_process = get_parameter ("form_post_process",0); $form_prediction_module = get_parameter ("form_prediction_module",0); $form_max_timeout = get_parameter ("form_max_timeout",0); diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 8e7defef89..16b44487f7 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -79,7 +79,7 @@ if (($form_moduletype == "networkserver") && ($form_network_component != "") && $form_prediction_module = ""; $form_id_plugin = ""; $form_post_process = ""; -} else { +} elseif (!isset($_POST['oid'])){ // Clean up specific network modules fields $form_name = ""; $form_description = ""; diff --git a/pandora_console/godmode/agentes/module_manager_editor_data.php b/pandora_console/godmode/agentes/module_manager_editor_data.php index b06b8f9bb9..4b584fceb6 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_data.php +++ b/pandora_console/godmode/agentes/module_manager_editor_data.php @@ -46,8 +46,8 @@ if ($update_module_id != NULL){ $form_id_tipo_modulo = $row['id_tipo_modulo']; // It doesn't matter $form_description = $row['descripcion']; $form_name = $row['nombre']; - $form_minvalue = $row['max']; - $form_maxvalue = $row['min']; + $form_minvalue = $row['min']; + $form_maxvalue = $row['max']; $form_interval = $row['module_interval']; $form_tcp_port = $row['tcp_port']; $form_tcp_send = $row['tcp_send']; diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php index add2654ca8..0dae499b78 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_network.php +++ b/pandora_console/godmode/agentes/module_manager_editor_network.php @@ -20,6 +20,7 @@ // General startup for established session global $config; check_login(); +global $form_snmp_community; // get the variable form_moduletype $form_moduletype = get_parameter_post ("form_moduletype"); @@ -35,6 +36,7 @@ if (give_acl($config["id_user"], 0, "AW")!=1) { exit; } + // Check whether we are updataing and get data if so if ($update_module_id != NULL){ $row = get_db_row ("tagente_modulo", 'id_agente_modulo', $update_module_id); @@ -46,8 +48,8 @@ if ($update_module_id != NULL){ $form_id_tipo_modulo = $row['id_tipo_modulo']; // It doesn't matter $form_description = $row['descripcion']; $form_name = $row['nombre']; - $form_minvalue = $row['max']; - $form_maxvalue = $row['min']; + $form_minvalue = $row['min']; + $form_maxvalue = $row['max']; $form_interval = $row['module_interval']; $form_tcp_port = $row['tcp_port']; $form_tcp_send = $row['tcp_send']; diff --git a/pandora_console/godmode/agentes/module_manager_editor_plugin.php b/pandora_console/godmode/agentes/module_manager_editor_plugin.php index 0bc3981139..7ddaa3381e 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_plugin.php +++ b/pandora_console/godmode/agentes/module_manager_editor_plugin.php @@ -46,8 +46,8 @@ if ($update_module_id != NULL){ $form_id_tipo_modulo = $row['id_tipo_modulo']; // It doesn't matter $form_description = $row['descripcion']; $form_name = $row['nombre']; - $form_minvalue = $row['max']; - $form_maxvalue = $row['min']; + $form_minvalue = $row['min']; + $form_maxvalue = $row['max']; $form_interval = $row['module_interval']; $form_tcp_port = $row['tcp_port']; $form_tcp_send = $row['tcp_send']; diff --git a/pandora_console/godmode/agentes/module_manager_editor_prediction.php b/pandora_console/godmode/agentes/module_manager_editor_prediction.php index 710d7a3260..306b2eed24 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_prediction.php +++ b/pandora_console/godmode/agentes/module_manager_editor_prediction.php @@ -46,8 +46,8 @@ if ($update_module_id != NULL){ $form_id_tipo_modulo = $row['id_tipo_modulo']; // It doesn't matter $form_description = $row['descripcion']; $form_name = $row['nombre']; - $form_minvalue = $row['max']; - $form_maxvalue = $row['min']; + $form_minvalue = $row['min']; + $form_maxvalue = $row['max']; $form_interval = $row['module_interval']; $form_tcp_port = $row['tcp_port']; $form_tcp_send = $row['tcp_send']; diff --git a/pandora_console/godmode/agentes/module_manager_editor_wmi.php b/pandora_console/godmode/agentes/module_manager_editor_wmi.php index de23c1dfd0..87c95ad5b3 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_wmi.php +++ b/pandora_console/godmode/agentes/module_manager_editor_wmi.php @@ -46,8 +46,8 @@ if ($update_module_id != NULL){ $form_id_tipo_modulo = $row['id_tipo_modulo']; // It doesn't matter $form_description = $row['descripcion']; $form_name = $row['nombre']; - $form_minvalue = $row['max']; - $form_maxvalue = $row['min']; + $form_minvalue = $row['min']; + $form_maxvalue = $row['max']; $form_interval = $row['module_interval']; $form_tcp_port = $row['tcp_port']; $form_tcp_send = $row['tcp_send']; diff --git a/pandora_console/include/config.php b/pandora_console/include/config.php index 58ecfc80e8..cbb5b8b9f7 100644 --- a/pandora_console/include/config.php +++ b/pandora_console/include/config.php @@ -2,7 +2,7 @@ // Begin of automatic config file $config["dbname"]="pandora"; // MySQL DataBase name $config["dbuser"]="pandora"; // DB User -$config["dbpass"]="pandora"; // DB Password +$config["dbpass"]="pfnfkudt"; // DB Password $config["dbhost"]="localhost"; // DB Host $config["homedir"]="/var/www/pandora_console/"; // Config homedir $config["homeurl"]="http://localhost/pandora_console"; // Base URL @@ -37,10 +37,10 @@ $config["homeurl"]="http://localhost/pandora_console"; // Base URL // $config["homeurl"]="/pandora_console/"; // Do not display any ERROR -// error_reporting(0); // Need to use active console at this moment +//error_reporting(0); // Need to use active console at this moment // Display ALL errors -error_reporting(1); +error_reporting(E_ALL); // This is directory where placed "/attachment" directory, to upload files stores. // This MUST be writtable by http server user, and should be in pandora root. diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 00471fcd62..ebd59b8aa3 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -1414,7 +1414,7 @@ function show_alert_row_mini ($id_combined_alert){ // We have alert text ? if ($row2["alert_text"]!= "") { - echo ""; + echo ""; } else { echo ""; } diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php index f83185367e..abb74fe3ce 100644 --- a/pandora_console/operation/agentes/estado_ultimopaquete.php +++ b/pandora_console/operation/agentes/estado_ultimopaquete.php @@ -78,7 +78,7 @@ if (comprueba_login() == 0) { $id_grupo = $row_t["id_grupo"]; $id_usuario=$_SESSION["id_usuario"]; if (give_acl($id_usuario, $id_grupo, "AW")==1){ - if (($row3["id_modulo"] != 1) AND ($row3["id_tipo_modulo"] < 100)) { + if (($row3["id_modulo"] > 1) AND ($row3["id_tipo_modulo"] < 100)) { if ($row3["flag"] == 0){ echo ""; } else { diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 0d78139e07..7acb72d962 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -3,7 +3,7 @@ // ==================================== // Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.com // Copyright (c) 2005-2006 Artica Soluciones Tecnologicas S.L, info@artica.es -// Copyright (c) 2004-2008 Raul Mateos Martin, raulofpandora@gmail.com + // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 @@ -17,7 +17,9 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Load global vars -require("include/config.php"); +global $config; +$id_user = $config["id_user"]; + if (comprueba_login() != 0) { require ("general/noaccess.php"); @@ -34,23 +36,31 @@ if ((give_acl($id_user, 0, "AR")!=1) AND (give_acl($id_user,0,"AW")!=1)) { echo "

".$lang_label["ag_title"]." > "; echo $lang_label["monitor_listing"]."

"; +$ag_freestring = get_parameter ("ag_freestring", ""); +$ag_modulename = get_parameter ("ag_modulename", ""); +$ag_group = get_parameter ("ag_group", -1); +$offset = get_parameter ("offset", 0); -if (isset($_POST["ag_group"])) - $ag_group = $_POST["ag_group"]; -elseif (isset($_GET["group_id"])) - $ag_group = $_GET["group_id"]; -else - $ag_group = -1; -if (isset($_GET["ag_group_refresh"])){ - $ag_group = $_GET["ag_group_refresh"]; -} +$URL = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60"; +echo ""; -if (isset($_POST["ag_group"])){ - $ag_group = $_POST["ag_group"]; - echo ""; -} else { - echo ""; -} echo "
'.$lang_label["user"].''.$lang_label["action"].''.$lang_label["date"].''.$lang_label["src_address"].''.$lang_label["comments"].'
'.$usuario; + echo '
'.$row["ID_usuario"]; echo ''.$row["accion"]; echo ''.$row["fecha"]; echo ''.$row["IP_origen"]; echo ''.$row["descripcion"]; echo '
".$lang_label["text"]."".$lang_label["text"]."".$mymin."/".$mymax."
"; echo ""; echo ""; -echo ""; echo ""; echo ""; echo ""; @@ -97,122 +90,126 @@ while ($row=mysql_fetch_array($result)){ echo ""; } echo ""; -echo "
".$lang_label["group"].""; @@ -62,23 +72,6 @@ if ( $ag_group > 1 ){ echo ""; list_group ($id_user); echo ""; - -// Module name selector -// This code thanks for an idea from Nikum, nikun_h@hotmail.com -if (isset($_POST["ag_modulename"])){ - $ag_modulename = $_POST["ag_modulename"]; - echo ""; -} else { - echo ""; -} - -echo ""; -echo "
".$lang_label["green_light"]."
"; -echo "
".$lang_label["red_light"]."
- -"; - -// Show only selected names & groups -if ($ag_group > 1) - $sql='SELECT * FROM tagente WHERE id_grupo='.$ag_group.' ORDER BY nombre'; -else - $sql='SELECT * FROM tagente ORDER BY id_grupo, nombre'; +echo ""; +echo lang_string ("Free text"); +echo " "; +echo ""; +echo ""; echo "
"; -echo "
"; -$color =1; -$result=mysql_query($sql); -if (mysql_num_rows($result)){ - while ($row=mysql_fetch_array($result)){ //while there are agents - if ($row["disabled"] == 0) { - if ((isset($ag_modulename)) && ($ag_modulename != $lang_label["all"])){ - $query_gen='SELECT - id_agente, id_tipo_modulo, module_interval, id_agente_modulo, - nombre, descripcion - FROM tagente_modulo - WHERE id_agente = '.$row["id_agente"].' - AND nombre = "'.entrada_limpia($_POST["ag_modulename"]).'" - AND - id_tipo_modulo in (2, 9, 12, 18, 6, 100)'; - // generic_proc, remote_tcp_proc, ??, remote_snmp_proc, remote_icmp_proc - } else { - $query_gen='SELECT - id_agente, id_tipo_modulo, module_interval, id_agente_modulo, - nombre, descripcion - FROM tagente_modulo - WHERE id_agente = '.$row["id_agente"].' - AND - id_tipo_modulo in (2, 9, 12, 18, 6, 100)'; - } - $result_gen=mysql_query($query_gen); - if (mysql_num_rows ($result_gen)) { - while ($data=mysql_fetch_array($result_gen)){ - if ($color == 1){ - $tdcolor="datos"; - $color =0; - } else { - $tdcolor="datos2"; - $color =1; - } - if (!isset($string)) {$string='';} - $string=$string. ""; - $string=$string. ""; - $string=$string.""; - $string=$string. ""; - $string=$string."". - strtoupper(substr(dame_nombre_agente($data["id_agente"]),0,21)).""; - $string=$string.""; - $string=$string." - - "; - $string=$string."". - substr($data["nombre"],0,21).""; - $string=$string."". - substr($data["descripcion"],0,30).""; - - $string=$string.""; - if ($data["module_interval"] == 0){ - $my_interval = give_agentinterval($data["id_agente"]); - } else { - $my_interval = $data["module_interval"]; - } - $string .= $my_interval; - - $query_gen2='SELECT * FROM tagente_estado - WHERE id_agente_modulo = '.$data["id_agente_modulo"]; - $result_gen2=mysql_query($query_gen2); - $data2=mysql_fetch_array($result_gen2); - $string=$string.""; - if ($data2["datos"] > 0){ - $string=$string.""; - } else { - $string=$string.""; - } - - $string=$string.""; - $seconds = time() - $data2["utimestamp"]; - if ($seconds >= ($my_interval*2)) - $string .= ""; - else - $string .= ""; - $string .= human_time_comparation($data2["timestamp"])." - "; - } - } - } - } - if (isset($string)) { - echo " - - - - - - - - - "; - echo $string; //the built table of monitors - echo "
- ".$lang_label["agent"]."".$lang_label["type"]."".$lang_label["name"]."".$lang_label["description"]."".$lang_label["interval"]."".$lang_label["status"]."".$lang_label["timestamp"]."
"; - } else { - echo "
".$lang_label["no_monitors_g"]."
"; - } +// Begin Build SQL sentences + +$SQL_pre = "SELECT tagente_modulo.id_agente_modulo, tagente.nombre, tagente_modulo.nombre, tagente_modulo.descripcion, tagente.id_grupo, tagente.id_agente, tagente_modulo.id_tipo_modulo, tagente_modulo.module_interval "; + +$SQL_pre_count = "SELECT count(tagente_modulo.id_agente_modulo) "; + +$SQL = " FROM tagente, tagente_modulo WHERE tagente.id_agente = tagente_modulo.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_tipo_modulo in (2, 9, 12, 18, 6, 100) "; + +// Agent group selector +if ($ag_group > 1) + $SQL .=" AND tagente.id_grupo = ".$ag_group; + +// Module name selector +// This code thanks for an idea from Nikum, nikun_h@hotmail.com +if ($ag_modulename != "") + $SQL .= " AND tagente_modulo.nombre = '$ag_modulename'"; + +// Freestring selector +if ($ag_freestring != "") + $SQL .= " AND ( tagente_modulo.nombre LIKE '%".$ag_freestring."%' OR tagente_modulo.descripcion LIKE '%".$ag_freestring."%') "; +$SQL .= " ORDER BY tagente.id_grupo, tagente.nombre"; + + +// Build final SQL sentences +$SQL_FINAL = $SQL_pre . $SQL; +$SQL_COUNT = $SQL_pre_count . $SQL; + +$counter = get_db_sql ($SQL_COUNT); + if ( $counter > $config["block_size"]) { + pagination ($counter, $URL, $offset); + $SQL_FINAL .= " LIMIT $offset , ".$config["block_size"]; + } + + +if ($counter > 0){ + echo " + + + + + + + + + "; + $color =1; + $result=mysql_query($SQL_FINAL); + + + while ($data=mysql_fetch_array($result)){ //while there are agents + if ($color == 1){ + $tdcolor="datos"; + $color =0; + } else { + $tdcolor="datos2"; + $color =1; + } + + echo ""; + echo ""; + echo ""; + echo ""; + } + echo "
+ ".$lang_label["agent"]."".$lang_label["type"]."".$lang_label["name"]."".$lang_label["description"]."".$lang_label["interval"]."".$lang_label["status"]."".$lang_label["timestamp"]."
"; + echo ""; + echo ""; + echo ""; + echo "". + strtoupper(substr($data[1],0,21)).""; + echo ""; + echo "". substr($data[2],0,21). "".substr($data[3],0,30).""; + if ($data[7] == 0){ + $my_interval = give_agentinterval($data[5]); + } else { + $my_interval = $data[7]; + } + echo $my_interval; + + $query_gen2='SELECT * FROM tagente_estado + WHERE id_agente_modulo = '.$data[0]; + $result_gen2=mysql_query($query_gen2); + $data2=mysql_fetch_array($result_gen2); + echo ""; + if ($data2["datos"] > 0){ + echo ""; + } else { + echo ""; + } + + echo ""; + $seconds = time() - $data2["utimestamp"]; + if ($seconds >= ($my_interval*2)) + echo ""; + else + echo ""; + + echo human_time_comparation($data2["timestamp"]); + echo "
"; } else { - echo "
".$lang_label["no_agent"]."
"; + echo "
".$lang_label["no_monitors_g"]."
"; } +echo ""; +echo ""; +echo ""; +echo ""; +echo "
"; +echo "  ".$lang_label["green_light"]."  ".$lang_label["red_light"]."
"; + ?>