diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index d9e481238c..2e6287d875 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -84,7 +84,7 @@ $query1="SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) -7) AND ID echo $lang_label["there_are"].$row[0]." ".$lang_label["agent_defined"]; echo "

"; - $query1="SELECT COUNT(*) FROM tagente_datos"; + $query1="SELECT COUNT(id_agente_datos) FROM tagente_datos"; $result=mysql_query($query1); $row=mysql_fetch_array($result); echo "  "; diff --git a/pandora_console/operation/agentes/estado_grupo.php b/pandora_console/operation/agentes/estado_grupo.php index e442f0b3d7..76530276c9 100644 --- a/pandora_console/operation/agentes/estado_grupo.php +++ b/pandora_console/operation/agentes/estado_grupo.php @@ -80,14 +80,11 @@ if (comprueba_login() == 0) $grupo[$array_index]["agent"]++; $grupo[$array_index]["group"]=dame_nombre_grupo($migrupo); $contador_agente++; // Estado grupo, agent - if ($down ==0){ - $sql2="SELECT * FROM tagente_modulo WHERE (id_tipo_modulo = 2 OR id_tipo_modulo = 6 OR id_tipo_modulo = 9 OR id_tipo_modulo = 12 OR id_tipo_modulo = 18) AND id_agente =".$row1["id_agente"]; - $result2=mysql_query($sql2); - while ($row2 = mysql_fetch_array($result2)){ - $sql3="SELECT * FROM tagente_estado WHERE id_agente_modulo = ".$row2["id_agente_modulo"]; - $result3=mysql_query($sql3); - $row3 = mysql_fetch_array($result3); - if ($row3["datos"] !=0){ + if ($down == 0){ + $sql3="SELECT * FROM tagente_estado WHERE estado != 100 and id_agente = ".$row1["id_agente"]; + $result3=mysql_query($sql3); + while ($row3 = mysql_fetch_array($result3)){ + if ($row3["datos"] !=0){ $estado_grupo_ok++; $grupo[$array_index]["ok"]++; // Estado grupo, agent ok } @@ -96,7 +93,7 @@ if (comprueba_login() == 0) $grupo[$array_index]["bad"]++; // Estado grupo, agent BAD } } - $sql2="SELECT * FROM tagente_modulo WHERE (id_tipo_modulo != 2 OR id_tipo_modulo != 6 OR id_tipo_modulo != 9 OR id_tipo_modulo != 12 OR id_tipo_modulo != 18) AND id_agente =".$row1["id_agente"]; + $sql2="SELECT * FROM tagente_estado WHERE estado = 100 and id_agente = ".$row1["id_agente"]; $result2=mysql_query($sql2); while ($row2 = mysql_fetch_array($result2)){ $sql3="SELECT * FROM tagente_estado WHERE id_agente_modulo = ".$row2["id_agente_modulo"]; diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index abf3cc3e06..cd59c34756 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -24,12 +24,12 @@ if (comprueba_login() == 0) { if (isset($_GET["id_agente"])){ $id_agente = $_GET["id_agente"]; } - + echo "

".$lang_label["monitor_listing"]." ".$lang_label["help"]."

"; // Get all module from agent - $sql_t='SELECT * FROM tagente_estado, tagente_modulo WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.id_agente='.$id_agente.' order by tagente_modulo.nombre'; + $sql_t='SELECT * FROM tagente_estado, tagente_modulo WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.id_agente='.$id_agente.' and tagente_estado.estado != 100 order by tagente_modulo.nombre'; $result_t=mysql_query($sql_t); if (mysql_num_rows ($result_t)) { - echo "

".$lang_label["monitor_listing"]." ".$lang_label["help"]."

"; + echo ""; echo ""; - echo "
".$lang_label["type"]."".$lang_label["module_name"]."".$lang_label["description"]."".$lang_label["status"]."".$lang_label["interval"]."".$lang_label["last_contact"]; $color=0; @@ -66,31 +66,30 @@ if (comprueba_login() == 0) { else $agent_down = 0; - echo "
".$est_tipo; + echo "
".$est_tipo; echo "".$est_modulo; echo "".substr($est_description,0,32); // echo "".$row3["datos"]; if ($agent_down == 1) - echo ""; + echo ""; else if ($est_estado == 1) if ($est_cambio ==1) echo ""; else - echo ""; + echo ""; else - echo ""; + echo ""; echo ""; - echo $temp_interval; - echo ""; + echo $temp_interval; + echo ""; if ($agent_down == 1) // Si el agente esta down, lo mostramos en negrita y en rojo - echo ""; + echo ""; - echo $row_t["timestamp"]; + echo $row_t["timestamp"]; } } - echo '
'; + echo '
'; } else echo "- ".$lang_label["no_monitors"]."";