$row) {
//Switch class around
$class = (($key % 2) ? "datos2" : "datos");
echo '
';
// Monitor checks
$table->width = "100%";
$table->class = "databox";
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->border = 0;
$table->head = array ();
$table->data = array ();
$table->style = array ();
$table->style[0] = "padding-top:4px; padding-bottom:4px;";
$table->data[0][0] ='
'.__('Monitor health').'';
$table->style[1] = "padding-top:4px; padding-bottom:4px;";
$table->data[1][0] = '
';
$table->style[2] = "padding-top:4px; padding-bottom:4px;";
$table->data[2][0] = '
'.__('Data health').'';
$table->style[3] = "padding-top:4px; padding-bottom:4px;";
$table->data[3][0] = '
';
$table->style[4] = "padding-top:4px; padding-bottom:4px;";
$table->data[4][0] = '
'.__('Global health').'';
$table->style[5] = "padding-top:4px; padding-bottom:4px;";
$table->data[5][0] = '
';
$table->style[6] = "padding-top:4px; padding-bottom:4px;";
$table->data[6][0] = '
'.__('Module sanity').'';
$table->style[7] = "padding-top:4px; padding-bottom:4px;";
$table->data[7][0] = '
';
$table->style[8] = "padding-top:4px; padding-bottom:4px;";
$table->data[8][0] = '
'.__('Alert level').'';
$table->style[9] = "padding-top:4px; padding-bottom:4px;";
$table->data[9][0] = '
';
print_table ($table);
unset ($table);
echo '
';
echo ''.__('Monitor checks').' |
';
$cells = array ();
$cells[0][0] = __('Monitor checks');
$cells[0][1] = $data["monitor_checks"];
$cells[0]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=-1"; //All
$cells[0]["color"] = "#000";
$cells[1][0] = __('Monitors good');
$cells[1][1] = $data["monitor_ok"];
$cells[1]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=1"; //Up
$cells[1]["color"] = "#000";
$cells[2][0] = __('Monitors down');
$cells[2][1] = $data["monitor_down"];
$cells[2]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=0"; //Down
$cells[2]["color"] = "#f00";
$cells[3][0] = __('Monitors unknown');
$cells[3][1] = $data["monitor_unknown"];
$cells[3]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=2"; //Unknown
$cells[3]["color"] = "#C0C0C0";
$cells[4][0] = __('Monitors not init');
$cells[4][1] = $data["monitor_not_init"];
$cells[4]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=2"; //Unknown
$cells[4]["color"] = "#f00";
$cells[5][0] = __('Alerts defined');
$cells[5][1] = $data["monitor_alerts"];
$cells[5]["href"] = "index.php?sec=estado&sec2=operation/agentes/estado_alertas&refr=60"; //All alerts defined
$cells[5]["color"] = "#000";
$cells[6][0] = __('Alerts fired');
$cells[6][1] = $data["monitor_alerts_fired"];
$cells[6]["href"] = "index.php?sec=eventos&sec2=operation/events/events&search=&event_type=alert_fired"; //Fired alert events
$cells[6]["color"] = "#f00";
print_cells_temp ($cells);
echo ''.__('Data checks').' |
';
$cells = array ();
$cells[0][0] = __('Data checks');
$cells[0][1] = $data["data_checks"];
$cells[0]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=-1"; //All
$cells[0]["color"] = "#000";
$cells[1][0] = __('Data good');
$cells[1][1] = $data["data_ok"];
$cells[1]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=1"; //Up
$cells[1]["color"] = "#000";
$cells[2][0] = __('Data down');
$cells[2][1] = $data["data_down"];
$cells[2]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=0"; //Down
$cells[2]["color"] = "#f00";
$cells[3][0] = __('Data unknown');
$cells[3][1] = $data["data_unknown"];
$cells[3]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=2"; //Unknown
$cells[3]["color"] = "#C0C0C0";
$cells[4][0] = __('Data not init');
$cells[4][1] = $data["data_not_init"];
$cells[4]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=2"; //Unknown
$cells[4]["color"] = "#f00";
$cells[5][0] = __('Alerts defined');
$cells[5][1] = $data["data_alerts"];
$cells[5]["href"] = "index.php?sec=estado&sec2=operation/agentes/estado_alertas&refr=60"; //All alerts defined
$cells[5]["color"] = "#000";
$cells[6][0] = __('Alerts fired');
$cells[6][1] = $data["data_alerts_fired"];
$cells[6]["href"] = "index.php?sec=eventos&sec2=operation/events/events&search=&event_type=alert_fired"; //Fired alert events
$cells[6]["color"] = "#f00";
print_cells_temp ($cells);
echo ''.__('Summary').' |
';
$cells = array ();
$cells[0][0] = __('Total Agents');
$cells[0][1] = $data["total_agents"];
$cells[0]["color"] = "#000";
$cells[0]["href"] = "index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60";
$cells[1][0] = __('Total Checks');
$cells[1][1] = $data["total_checks"];
$cells[1]["color"] = "#000";
$cells[1]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=-1";
$cells[2][0] = __('Uninitialized modules');
$cells[2][1] = $data["server_sanity"] . "%";
$cells[2]["color"] = "#000";
$cells[2]["href"] = "index.php?sec=estado_server&sec2=operation/servers/view_server&refr=60";
print_cells_temp ($cells);
echo "
";
echo '
'; //Left column
echo '';
// Server information
$serverinfo = get_server_info ();
$total_modules = get_agent_modules_count ();
$cells = array ();
if ($serverinfo) {
echo '
';
echo '
'.__('Tactical server information').' |
';
echo '
'.__('Name').' |
'.__('Status').' |
'.__('Load').' |
'.__('Lag').pandora_help ("serverlag", true).' |
';
foreach ($serverinfo as $server_id => $server_info) {
$data = array ();
$data[0] = $server_info["name"];
if ($server_info["status"] == 0){
$data[1] = '';
} else {
$data[1] = '';
}
if ($server_info["modules"] > 0 && $total_modules > 0) {
$percent = $server_info["modules"] / ($total_modules / 100);
} else {
$percent = 0;
}
$data[2] = '';
$data[3] = $server_info["lag"]." / ".$server_info["module_lag"];
array_push ($cells, $data);
}
foreach ($cells as $key => $row) {
//Switch class around
$class = (($key % 2) ? "datos2" : "datos");
echo '
'.$row[0].' |
'.$row[1].' |
'.$row[2].' |
'.$row[3].' |
';
}
echo '
';
} else {
echo "
".__('There are no servers configured into the database')."
";
}
smal_event_table ("", 10, 450);
echo '
';
?>