".$lang_label["monitor_listing"]." ".$lang_label["help"].""; echo "
".$lang_label["type"]." | ".$lang_label["module_name"]." | ".$lang_label["description"]." | ".$lang_label["status"]." | ".$lang_label["interval"]." | ".$lang_label["last_contact"]; $color=0; while ($row_t=mysql_fetch_array($result_t)){ # For evey module in the status table $est_modulo = $row_t["nombre"]; $est_tipo = dame_nombre_tipo_modulo($row_t["id_tipo_modulo"]); $est_description = $row_t["descripcion"]; $est_timestamp = $row_t["timestamp"]; $est_estado = $row_t["estado"]; $est_datos = $row_t["datos"]; $est_cambio = $row_t["cambio"]; $est_interval = $row_t["module_interval"]; if (($est_interval != $intervalo) && ($est_interval > 0)) { $temp_interval = $est_interval; } else { $temp_interval = $intervalo; } if ($est_estado <>100){ # si no es un modulo de tipo datos # Determinamos si se ha caido el agente (tiempo de intervalo * 2 superado) if ($color == 1){ $tdcolor = "datos"; $color = 0; } else { $tdcolor = "datos2"; $color = 1; } $ahora=date("Y/m/d H:i:s"); $seconds = strtotime($ahora) - strtotime($row_t["timestamp"]); if ($seconds >= ($temp_interval*2)) // If every interval x 2 secs. we get nothing, there's and alert $agent_down = 1; else $agent_down = 0; echo " | ||||
---|---|---|---|---|---|---|---|---|---|
".$est_tipo." | "; echo "".$est_modulo." | "; echo "" .substr($est_description,0,32)." | "; // echo "".$row3["datos"]; if ($agent_down == 1) echo " | "; else if ($est_estado == 1) if ($est_cambio ==1) echo " | "; else echo " | "; else echo " | "; echo " | "; echo $temp_interval." | "; echo ""; if ($agent_down == 1) { // If agent down, it's shown red and bold echo ""; } echo $row_t["timestamp"]." | "; } } echo '