2009-01-20 Sancho Lerena <slerena@artica.es>
* install.php: Added ldap module dep. * include/functions_reporting.php, operation/agentes/status_monitor.php operation/agentes/tactical.php, general/logon_ok.php: New filter options for warning/critical, removed old data stats and improved filters in module view git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1369 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
310f304ca4
commit
647202d01a
|
@ -1,3 +1,11 @@
|
|||
2009-01-20 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* install.php: Added ldap module dep.
|
||||
|
||||
* include/functions_reporting.php, operation/agentes/status_monitor.php
|
||||
operation/agentes/tactical.php, general/logon_ok.php: New filter options for
|
||||
warning/critical, removed old data stats and improved filters in module view
|
||||
|
||||
2009-01-20 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/functions_visual_map.php: Fixed a notice when the node looks
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
|
||||
require_once ("include/config.php");
|
||||
|
||||
// This solves problems in enterprise load
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
/* Call all extensions login function */
|
||||
|
@ -76,17 +79,11 @@ $table->width = "100%";
|
|||
$table->data[0][0] ='<b>'.__('Monitor health').'</b>';
|
||||
$table->data[1][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=280&mode=0&percent='.$data["monitor_health"].'" title="'.$data["monitor_health"].'% '.__('of monitors up').'" />';
|
||||
|
||||
$table->data[2][0] = '<b>'.__('Data health').'</b>';
|
||||
$table->data[3][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=280&mode=0&percent='.$data["data_health"].'" title="'.$data["data_health"].'% '.__('of data modules up').'" />';
|
||||
$table->data[2][0] = '<b>'.__('Module sanity').'</b>';
|
||||
$table->data[3][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=280&mode=0&percent='.$data["module_sanity"].'" title="'.$data["module_sanity"].'% '.__('of total modules inited').'" />';
|
||||
|
||||
$table->data[4][0] = '<b>'.__('Global health').'</b>';
|
||||
$table->data[5][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=280&mode=0&percent='.$data["global_health"].'" title="'.$data["global_health"].'% '.__('of total modules up').'" />';
|
||||
|
||||
$table->data[6][0] = '<b>'.__('Module sanity').'</b>';
|
||||
$table->data[7][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=280&mode=0&percent='.$data["module_sanity"].'" title="'.$data["module_sanity"].'% '.__('of total modules inited').'" />';
|
||||
|
||||
$table->data[8][0] = '<b>'.__('Alert level').'</b>';
|
||||
$table->data[9][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=280&mode=0&percent='.$data["alert_level"].'" title="'.$data["alert_level"].'% '.__('of defined alerts not fired').'" />';
|
||||
$table->data[4][0] = '<b>'.__('Alert level').'</b>';
|
||||
$table->data[5][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=280&mode=0&percent='.$data["alert_level"].'" title="'.$data["alert_level"].'% '.__('of defined alerts not fired').'" />';
|
||||
|
||||
print_table ($table);
|
||||
unset ($table);
|
||||
|
@ -103,22 +100,37 @@ $cells[0]["href"] = "index.php?sec=estado&sec2=operation/agentes/estado_agente&r
|
|||
$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[1]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=-1";
|
||||
|
||||
$cells[2][0] = __('Modules Down');
|
||||
$cells[2][1] = $data["total_down"];
|
||||
$cells[2][0] = __('Modules critical');
|
||||
$cells[2][1] = $data["monitor_critical"];
|
||||
$cells[2]["color"] = "#f00";
|
||||
$cells[2]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=0";
|
||||
$cells[2]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=2";
|
||||
|
||||
$cells[3][0] = __('Alerts defined');
|
||||
$cells[3][1] = $data["total_alerts"];
|
||||
$cells[3]["color"] = "#000";
|
||||
$cells[3]["href"] = "index.php?sec=estado&sec2=operation/agentes/estado_alertas&refr=60";
|
||||
$cells[3][0] = __('Modules warning');
|
||||
$cells[3][1] = $data["monitor_warning"];
|
||||
$cells[3]["color"] = "#FFB900";
|
||||
$cells[3]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=1";
|
||||
|
||||
$cells[4][0] = __('Users defined');
|
||||
$cells[4][1] = count (get_users ());
|
||||
$cells[4]["color"] = "#000";
|
||||
$cells[4]["href"] = "index.php?sec=usuarios&sec2=operation/users/user";
|
||||
$cells[4][0] = __('Modules normal');
|
||||
$cells[4][1] = $data["monitor_ok"];
|
||||
$cells[4]["color"] = "#00ff00";
|
||||
$cells[4]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=0";
|
||||
|
||||
$cells[5][0] = __('Modules unknown');
|
||||
$cells[5][1] = $data["monitor_unknown"];
|
||||
$cells[5]["color"] = "#aaaaaa";
|
||||
$cells[5]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=3";
|
||||
|
||||
$cells[6][0] = __('Alerts defined');
|
||||
$cells[6][1] = $data["total_alerts"];
|
||||
$cells[6]["color"] = "#000";
|
||||
$cells[6]["href"] = "index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=60";
|
||||
|
||||
$cells[7][0] = __('Users defined');
|
||||
$cells[7][1] = count (get_users ());
|
||||
$cells[7]["color"] = "#000";
|
||||
$cells[7]["href"] = "index.php?sec=usuarios&sec2=operation/users/user";
|
||||
|
||||
foreach ($cells as $key => $row) {
|
||||
//Switch class around
|
||||
|
|
|
@ -123,32 +123,15 @@ function get_group_stats ($id_group) {
|
|||
$data["monitor_not_init"] = 0;
|
||||
$data["monitor_unknown"] = 0;
|
||||
$data["monitor_ok"] = 0;
|
||||
$data["monitor_down"] = 0;
|
||||
$data["monitor_bad"] = 0; // Critical + Unknown + Warning
|
||||
$data["monitor_warning"] = 0;
|
||||
$data["monitor_critical"] = 0;
|
||||
$data["monitor_alerts"] = 0;
|
||||
$data["monitor_alerts_fired"] = 0;
|
||||
$data["monitor_alerts_fire_count"] = 0;
|
||||
$data["data_checks"] = 0;
|
||||
$data["data_not_init"] = 0;
|
||||
$data["data_unknown"] = 0;
|
||||
$data["data_ok"] = 0;
|
||||
$data["data_down"] = 0;
|
||||
$data["data_alerts"] = 0;
|
||||
$data["data_alerts_fired"] = 0;
|
||||
$data["data_alerts_fire_count"] = 0;
|
||||
|
||||
$data["total_agents"] = 0;
|
||||
$data["total_checks"] = 0;
|
||||
$data["total_ok"] = 0;
|
||||
$data["total_alerts"] = 0;
|
||||
$data["total_alerts_fired"] = 0;
|
||||
$data["total_alerts_fire_count"] = 0;
|
||||
$data["monitor_bad"] = 0;
|
||||
$data["data_bad"] = 0;
|
||||
$data["total_bad"] = 0;
|
||||
$data["total_not_init"] = 0;
|
||||
$data["total_down"] = 0;
|
||||
$data["monitor_health"] = 100;
|
||||
$data["data_health"] = 100;
|
||||
$data["global_health"] = 100;
|
||||
$data["alert_level"] = 100;
|
||||
$data["module_sanity"] = 100;
|
||||
$data["server_sanity"] = 100;
|
||||
|
@ -171,83 +154,62 @@ function get_group_stats ($id_group) {
|
|||
return $data;
|
||||
}
|
||||
|
||||
$sql = sprintf ("SELECT tagente_estado.id_agente_modulo, tagente_modulo.id_tipo_modulo, estado, datos, current_interval, utimestamp FROM tagente_estado, tagente_modulo WHERE tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND tagente_modulo.id_agente IN (%s)", implode (",", array_keys ($agents)));
|
||||
$sql = sprintf ("SELECT tagente_estado.id_agente_modulo,
|
||||
tagente_modulo.id_tipo_modulo,
|
||||
estado, datos,
|
||||
current_interval,
|
||||
utimestamp
|
||||
FROM tagente_estado, tagente_modulo
|
||||
WHERE tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
||||
AND tagente_modulo.id_agente IN (%s)", implode (",", array_keys ($agents)));
|
||||
$result = get_db_all_rows_sql ($sql);
|
||||
|
||||
if ($result === false) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
$module_remote = get_moduletypes ("remote");
|
||||
|
||||
foreach ($result as $row) {
|
||||
$last_update = $cur_time - $row["utimestamp"];
|
||||
if (in_array ($row["id_tipo_modulo"], $module_remote)) {
|
||||
//This module is a monitor (remote)
|
||||
$data["monitor_checks"]++;
|
||||
|
||||
$data["monitor_checks"]++;
|
||||
|
||||
//Check whether it's down, not init, unknown or OK
|
||||
if ($last_update == $cur_time) {
|
||||
//The utimestamp is 0 and has never been updated
|
||||
$data["monitor_not_init"]++;
|
||||
} elseif ($last_update >= ($row["current_interval"] * 2)) {
|
||||
//The utimestamp is greater than 2x the interval (it has timed out)
|
||||
$data["monitor_unknown"]++;
|
||||
} elseif ($row["estado"] == 1 || $row["estado"] == 2) {
|
||||
$data["monitor_down"]++;
|
||||
} else {
|
||||
$data["monitor_ok"]++;
|
||||
//Check whether it's down, not init, unknown or OK
|
||||
if ($last_update == $cur_time) {
|
||||
//The utimestamp is 0 and has never been updated
|
||||
$data["monitor_not_init"]++;
|
||||
} elseif ($last_update >= ($row["current_interval"] * 2)) {
|
||||
//The utimestamp is greater than 2x the interval (it has timed out)
|
||||
$data["monitor_unknown"]++;
|
||||
} elseif ($row["estado"] == 1){
|
||||
$data["monitor_critical"]++;
|
||||
} elseif ($row["estado"] == 2){
|
||||
$data["monitor_warning"]++;
|
||||
}
|
||||
else {
|
||||
$data["monitor_ok"]++;
|
||||
}
|
||||
|
||||
$fired = get_db_value ('times_fired', 'talert_template_modules', 'id_agent_module', $row["id_agente_modulo"]);
|
||||
if ($fired !== false) {
|
||||
$data["monitor_alerts"]++;
|
||||
if ($fired > 0) {
|
||||
$data["monitor_alerts_fired"]++;
|
||||
$data["monitor_alerts_fire_count"] += $fired;
|
||||
}
|
||||
|
||||
$fired = get_db_value ('times_fired', 'talert_template_modules',
|
||||
'id_agent_module', $row["id_agente_modulo"]);
|
||||
if ($fired !== false) {
|
||||
$data["monitor_alerts"]++;
|
||||
if ($fired > 0) {
|
||||
$data["monitor_alerts_fired"]++;
|
||||
$data["monitor_alerts_fire_count"] += $fired;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//This module is a data check (agent)
|
||||
$data["data_checks"]++;
|
||||
|
||||
//Check whether it's down, not init, unknown or OK
|
||||
if ($last_update == $cur_time) {
|
||||
//The utimestamp is 0 and has never been updated
|
||||
$data["data_not_init"]++;
|
||||
} elseif ($last_update >= ($row["current_interval"] * 2)) {
|
||||
//The utimestamp is greater than 2x the interval (it has timed out)
|
||||
$data["data_unknown"]++;
|
||||
} elseif ($row["estado"] == 1 || $row["estado"] == 2) {
|
||||
$data["data_down"]++;
|
||||
} else {
|
||||
$data["data_ok"]++;
|
||||
}
|
||||
|
||||
$fired = get_db_value ('times_fired', 'talert_template_modules',
|
||||
'id_agent_module', $row["id_agente_modulo"]);
|
||||
if ($fired !== false) {
|
||||
$data["data_alerts"]++;
|
||||
if ($fired > 0) {
|
||||
$data["data_alerts_fired"]++;
|
||||
$data["data_alerts_fire_count"] += $fired;
|
||||
}
|
||||
}
|
||||
} //End module check
|
||||
}
|
||||
} //End foreach module
|
||||
|
||||
$data["total_agents"] = count ($agents);
|
||||
$data["total_checks"] = $data["data_checks"] + $data["monitor_checks"];
|
||||
$data["total_ok"] = $data["data_ok"] + $data["monitor_ok"];
|
||||
$data["total_alerts"] = $data["data_alerts"] + $data["monitor_alerts"];
|
||||
$data["total_alerts_fired"] = $data["data_alerts_fired"] + $data["monitor_alerts_fired"];
|
||||
$data["total_alerts_fire_count"] = $data["data_alerts_fire_count"] + $data["monitor_alerts_fire_count"];
|
||||
$data["monitor_bad"] = $data["monitor_down"] + $data["monitor_unknown"];
|
||||
$data["data_bad"] = $data["data_down"] + $data["data_unknown"];
|
||||
$data["total_bad"] = $data["data_bad"] + $data["monitor_bad"];
|
||||
$data["total_not_init"] = $data["data_not_init"] + $data["monitor_not_init"];
|
||||
$data["total_down"] = $data["data_down"] + $data["monitor_down"];
|
||||
$data["total_checks"] = $data["monitor_checks"];
|
||||
$data["total_ok"] = $data["monitor_ok"];
|
||||
// Todo, count SNMP Alerts and Inventory alerts here
|
||||
$data["total_alerts"] = $data["monitor_alerts"];
|
||||
$data["total_alerts_fired"] = $data["monitor_alerts_fired"];
|
||||
$data["total_alerts_fire_count"] = $data["monitor_alerts_fire_count"];
|
||||
$data["monitor_bad"] = $data["monitor_critical"] + $data["monitor_unknown"] +$data["monitor_warning"];
|
||||
$data["total_bad"] = $data["monitor_bad"];
|
||||
$data["total_not_init"] = $data["monitor_not_init"];
|
||||
$data["total_down"] = $data["monitor_critical"];
|
||||
|
||||
/*
|
||||
Monitor health (percentage)
|
||||
|
@ -265,12 +227,6 @@ function get_group_stats ($id_group) {
|
|||
$data["monitor_health"] = 100;
|
||||
}
|
||||
|
||||
if ($data["data_bad"] > 0 && $data["data_checks"] > 0) {
|
||||
$data["data_health"] = format_numeric (100 - ($data["data_bad"] / ($data["data_checks"] / 100)), 1);
|
||||
} else {
|
||||
$data["data_health"] = 100;
|
||||
}
|
||||
|
||||
if ($data["total_bad"] > 0 && $data["total_checks"] > 0) {
|
||||
$data["global_health"] = format_numeric (100 - ($data["total_bad"] / ($data["total_checks"] / 100)), 1);
|
||||
} else {
|
||||
|
|
|
@ -237,6 +237,7 @@ function install_step2() {
|
|||
$res += check_variable(phpversion(),"5.2","PHP version >= 5.2",1);
|
||||
$res += check_extension("mysql","PHP MySQL extension");
|
||||
$res += check_extension("gd","PHP GD extension");
|
||||
$res += check_extension("ldap","PHP LDAP extension");
|
||||
$res += check_extension("snmp","PHP SNMP extension");
|
||||
$res += check_extension("session","PHP session extension");
|
||||
$res += check_extension("gettext","PHP gettext extension");
|
||||
|
|
|
@ -64,16 +64,18 @@ echo "</td>";
|
|||
echo "<td>".__('Monitor status')."</td><td>";
|
||||
|
||||
$fields = array ();
|
||||
$fields[0] = __('Monitors down'); //default
|
||||
$fields[1] = __('Monitors up');
|
||||
$fields[2] = __('Monitors unknown');
|
||||
$fields[0] = __('Normal'); //default
|
||||
$fields[1] = __('Warning');
|
||||
$fields[2] = __('Critical');
|
||||
$fields[3] = __('Unknown');
|
||||
$fields[4] = __('Not normal');
|
||||
|
||||
print_select ($fields, "status", $status, 'this.form.submit();', __('All'), -1);
|
||||
|
||||
echo '</td></tr><tr><td valign="middle">'.__('Module name').'</td>';
|
||||
echo '<td valign="middle">';
|
||||
|
||||
$result = get_db_all_rows_sql ("SELECT DISTINCT(nombre) FROM tagente_modulo WHERE id_tipo_modulo IN (2, 6, 9, 18, 21, 100) ORDER BY nombre");
|
||||
$result = get_db_all_rows_sql ("SELECT DISTINCT(nombre) FROM tagente_modulo ORDER BY nombre");
|
||||
if ($result === false) {
|
||||
$result = array ();
|
||||
}
|
||||
|
@ -89,6 +91,7 @@ echo '</td><td valign="middle">'.__('Free text').'</td>';
|
|||
|
||||
echo '<td valign="middle">';
|
||||
print_input_text ("ag_freestring", $ag_freestring, '', 15);
|
||||
|
||||
echo '</td><td valign="middle">';
|
||||
print_submit_button (__('Show'), "uptbutton", false, 'class="sub"');
|
||||
|
||||
|
@ -100,7 +103,6 @@ $sql = " FROM tagente, tagente_modulo, tagente_estado
|
|||
WHERE tagente.id_agente = tagente_modulo.id_agente
|
||||
AND tagente_modulo.disabled = 0
|
||||
AND tagente.disabled = 0
|
||||
AND tagente_modulo.id_tipo_modulo IN (2, 9, 12, 18, 6, 100)
|
||||
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo";
|
||||
|
||||
// Agent group selector
|
||||
|
@ -122,11 +124,15 @@ if ($ag_freestring != "") {
|
|||
}
|
||||
|
||||
// Status selector
|
||||
if ($status == 1) { //Up
|
||||
if ($status == 0) { //Up
|
||||
$sql .= " AND tagente_estado.estado = 0 AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval * 2)";
|
||||
} elseif ($status == 0) { //Down
|
||||
$sql .= " AND tagente_estado.estado = 1";
|
||||
} elseif ($status == 2) { //Unknown
|
||||
} elseif ($status == 2) { //Critical
|
||||
$sql .= " AND tagente_estado.estado = 1 AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval * 2)";
|
||||
} elseif ($status == 1) { //warning
|
||||
$sql .= " AND tagente_estado.estado = 2 AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval * 2)";
|
||||
} elseif ($status == 4) { //not normal
|
||||
$sql .= " AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval * 2) OR tagente_estado.estado = 2 OR tagente_estado.estado = 1) ";
|
||||
} elseif ($status == 3) { //Unknown
|
||||
$sql .= " AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval * 2)";
|
||||
}
|
||||
|
||||
|
@ -144,6 +150,7 @@ $sql = "SELECT tagente_modulo.id_agente_modulo,
|
|||
tagente_modulo.id_tipo_modulo AS module_type,
|
||||
tagente_modulo.module_interval,
|
||||
tagente_estado.datos,
|
||||
tagente_estado.estado,
|
||||
tagente_estado.utimestamp AS utimestamp".$sql." LIMIT ".$offset.",".$config["block_size"];
|
||||
$result = get_db_all_rows_sql ($sql);
|
||||
|
||||
|
@ -205,10 +212,12 @@ foreach ($result as $row) {
|
|||
|
||||
$data[4] = $row["agent_interval"];
|
||||
|
||||
if ($row["datos"] > 0) {
|
||||
$data[5] = '<img src="images/pixel_green.png" width="40" height="18" title="'.__('Monitor up').'">';
|
||||
if ($row["estado"] == 0) {
|
||||
$data[5] = '<img src="images/pixel_green.png" width="40" height="18" title="'.$row["datos"].'">';
|
||||
} elseif ($row["estado"] == 1) {
|
||||
$data[5] = '<img src="images/pixel_red.png" width="40" height="18" title="'.$row["datos"].'">';
|
||||
} else {
|
||||
$data[5] = '<img src="images/pixel_red.png" width="40" height="18" title="'.__('Monitor down').'">';
|
||||
$data[5] = '<img src="images/pixel_yellow.png" width="40" height="18" title="'.$row["datos"].'">';
|
||||
}
|
||||
|
||||
$seconds = get_system_time () - $row["utimestamp"];
|
||||
|
@ -226,7 +235,6 @@ foreach ($result as $row) {
|
|||
}
|
||||
if (!empty ($table->data)) {
|
||||
print_table ($table);
|
||||
echo '<div style="width:700px;"><img src="images/pixel_green.png" width="40" height="18"> '.__('Monitor up').' <img src="images/pixel_red.png" width="40" height="18"> '.__('Monitor down').'</div>';
|
||||
} else {
|
||||
echo '<div class="nf">'.__('This group doesn\'t have any monitor').'</div>';
|
||||
}
|
||||
|
|
|
@ -70,28 +70,16 @@ $table->style[1] = "padding-top:4px; padding-bottom:4px;";
|
|||
$table->data[1][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=260&mode=0&percent='.$data["monitor_health"].'" title="'.$data["monitor_health"].'% '.__('of monitors up').'" />';
|
||||
|
||||
$table->style[2] = "padding-top:4px; padding-bottom:4px;";
|
||||
$table->data[2][0] = '<b>'.__('Data health').'</b>';
|
||||
$table->data[2][0] = '<b>'.__('Module sanity').'</b>';
|
||||
|
||||
$table->style[3] = "padding-top:4px; padding-bottom:4px;";
|
||||
$table->data[3][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=260&mode=0&percent='.$data["data_health"].'" title="'.$data["data_health"].'% '.__('of data modules up').'" />';
|
||||
$table->data[3][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=260&mode=0&percent='.$data["module_sanity"].'" title="'.$data["module_sanity"].'% '.__('of total modules inited').'" />';
|
||||
|
||||
$table->style[4] = "padding-top:4px; padding-bottom:4px;";
|
||||
$table->data[4][0] = '<b>'.__('Global health').'</b>';
|
||||
$table->data[4][0] = '<b>'.__('Alert level').'</b>';
|
||||
|
||||
$table->style[5] = "padding-top:4px; padding-bottom:4px;";
|
||||
$table->data[5][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=260&mode=0&percent='.$data["global_health"].'" title="'.$data["global_health"].'% '.__('of total modules up').'" />';
|
||||
|
||||
$table->style[6] = "padding-top:4px; padding-bottom:4px;";
|
||||
$table->data[6][0] = '<b>'.__('Module sanity').'</b>';
|
||||
|
||||
$table->style[7] = "padding-top:4px; padding-bottom:4px;";
|
||||
$table->data[7][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=260&mode=0&percent='.$data["module_sanity"].'" title="'.$data["module_sanity"].'% '.__('of total modules inited').'" />';
|
||||
|
||||
$table->style[8] = "padding-top:4px; padding-bottom:4px;";
|
||||
$table->data[8][0] = '<b>'.__('Alert level').'</b>';
|
||||
|
||||
$table->style[9] = "padding-top:4px; padding-bottom:4px;";
|
||||
$table->data[9][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=260&mode=0&percent='.$data["alert_level"].'" title="'.$data["alert_level"].'% '.__('of defined alerts not fired').'" />';
|
||||
$table->data[5][0] = '<img src="reporting/fgraph.php?tipo=progress&height=20&width=260&mode=0&percent='.$data["alert_level"].'" title="'.$data["alert_level"].'% '.__('of defined alerts not fired').'" />';
|
||||
|
||||
print_table ($table);
|
||||
unset ($table);
|
||||
|
@ -105,75 +93,40 @@ $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][0] = __('Monitors normal');
|
||||
$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]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=0"; //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][0] = __('Monitors warning');
|
||||
$cells[2][1] = $data["monitor_warning"];
|
||||
$cells[2]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=1"; //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[3][0] = __('Monitors critical');
|
||||
$cells[3][1] = $data["monitor_critical"];
|
||||
$cells[3]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=2"; //Down
|
||||
$cells[3]["color"] = "#f00";
|
||||
|
||||
$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[4][0] = __('Monitors unknown');
|
||||
$cells[4][1] = $data["monitor_unknown"];
|
||||
$cells[4]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=3"; //Unknown
|
||||
$cells[4]["color"] = "#C0C0C0";
|
||||
|
||||
$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[5][0] = __('Monitors not init');
|
||||
$cells[5][1] = $data["monitor_not_init"];
|
||||
$cells[5]["color"] = "#f00";
|
||||
$cells[5]["href"] = "#";
|
||||
|
||||
$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";
|
||||
$cells[6][0] = __('Alerts defined');
|
||||
$cells[6][1] = $data["monitor_alerts"];
|
||||
$cells[6]["href"] = "index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=60"; //All alerts defined
|
||||
$cells[6]["color"] = "#000";
|
||||
|
||||
print_cells_temp ($cells);
|
||||
|
||||
echo '<tr><th colspan="2">'.__('Data checks').'</th></tr>';
|
||||
|
||||
$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";
|
||||
$cells[7][0] = __('Alerts fired');
|
||||
$cells[7][1] = $data["monitor_alerts_fired"];
|
||||
$cells[7]["href"] = "index.php?sec=eventos&sec2=operation/events/events&search=&event_type=alert_fired"; //Fired alert events
|
||||
$cells[7]["color"] = "#f00";
|
||||
|
||||
print_cells_temp ($cells);
|
||||
|
||||
|
@ -262,4 +215,4 @@ if ($serverinfo) {
|
|||
print_events_table ("", 10, 450);
|
||||
|
||||
echo '</div>';
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue