".$lang_label["monitor_listing"].""; echo ""; echo ""; echo ""; $color=0; while ($row_t=mysql_fetch_array($result_t)){ # For evey module in the status table $est_modulo = substr($row_t["nombre"],0,25); $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; } $seconds = time() - $row_t["utimestamp"]; 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 ""; echo ""; echo ""; else echo "--"; echo ""; } } echo '
X".$lang_label["type"]." ".$lang_label["module_name"]." ".$lang_label["description"]." ".$lang_label["status"]." ".$lang_label["interval"]." ".$lang_label["last_contact"]."
"; if (($row_t["id_modulo"] != 1) AND ($row_t["id_tipo_modulo"] < 100)) { if ($row_t["flag"] == 0){ echo ""; } else { echo ""; } } echo ""; echo ""; echo "".$est_modulo."" .substr($est_description,0,35).""; if ($est_estado == 1){ if ($est_cambio == 1) echo ""; else echo ""; } else echo ""; echo ""; if ($temp_interval != $intervalo) echo $temp_interval.""; if ($agent_down == 1) { // If agent down, it's shown red and bold echo ""; } else { echo ""; } if ($row_t["timestamp"]=='0000-00-00 00:00:00') { echo $lang_label["never"]; } else { echo human_time_comparation($row_t["timestamp"]); } echo "
'; } else { echo "
".$lang_label["no_monitors"]."
"; } } ?>