2007-06-08 17:55:53 +02:00
|
|
|
<?php
|
|
|
|
|
2008-12-03 13:41:09 +01:00
|
|
|
// Pandora FMS - the Flexible Monitoring System
|
2008-07-25 20:37:32 +02:00
|
|
|
// ============================================
|
2008-12-03 13:41:09 +01:00
|
|
|
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
|
|
|
|
// Please see http://pandora.sourceforge.net for full contribution list
|
|
|
|
|
2008-06-30 14:34:23 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
2008-12-03 13:41:09 +01:00
|
|
|
// modify it under the terms of the GNU Lesser General Public License (LGPL)
|
|
|
|
// as published by the Free Software Foundation for version 2.
|
|
|
|
//
|
2008-06-30 14:34:23 +02:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-01-10 17:40:00 +01:00
|
|
|
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
// Load global vars
|
2008-11-11 15:24:34 +01:00
|
|
|
require_once ("include/config.php");
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
require_once ("include/functions_events.php");
|
2008-01-10 17:40:00 +01:00
|
|
|
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
check_login ();
|
2007-06-08 17:55:53 +02:00
|
|
|
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
if (give_acl ($config['id_user'], 0, "AR") != 1) {
|
|
|
|
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation",
|
2008-07-03 13:47:53 +02:00
|
|
|
"Trying to access Agent view (Grouped)");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2008-11-11 15:24:34 +01:00
|
|
|
require_once ("include/functions_reporting.php");
|
|
|
|
|
|
|
|
//This is an intermediary function to print out a set of cells
|
|
|
|
//Cells is an array with the explanation, value, link and color
|
|
|
|
function print_cells_temp ($cells) {
|
|
|
|
foreach ($cells as $key => $row) {
|
|
|
|
//Switch class around
|
|
|
|
$class = (($key % 2) ? "datos2" : "datos");
|
|
|
|
echo '<tr><td class="'.$class.'"><b>'.$row[0].'</b></td>';
|
|
|
|
if ($row[1] === 0) {
|
|
|
|
$row[1] = "-";
|
|
|
|
}
|
2009-02-13 21:23:44 +01:00
|
|
|
echo '<td class="'.$class.'" style="text-align:right;"><a class="big_data" href="'.safe_input ($row["href"]).'" style="color: '.$row["color"].';">'.$row[1].'</a></td></tr>';
|
2008-11-11 15:24:34 +01:00
|
|
|
}
|
2008-07-03 13:47:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-11-11 15:24:34 +01:00
|
|
|
echo "<h2>".__('Pandora Agents')." > ".__('Tactical view')."</h2>";
|
|
|
|
|
|
|
|
$data = get_group_stats (0);
|
|
|
|
|
|
|
|
echo '<div style="width:265px; float:left; padding-right: 40px;" id="leftcolumn">';
|
2008-07-10 13:58:40 +02:00
|
|
|
// Monitor checks
|
2008-11-11 15:24:34 +01:00
|
|
|
|
|
|
|
$table->width = "100%";
|
|
|
|
$table->class = "databox";
|
|
|
|
$table->cellpadding = 0;
|
|
|
|
$table->cellspacing = 0;
|
|
|
|
$table->border = 0;
|
|
|
|
$table->head = array ();
|
|
|
|
$table->data = array ();
|
|
|
|
$table->style = array ();
|
|
|
|
|
2009-02-13 21:23:44 +01:00
|
|
|
$img = "reporting/fgraph.php?tipo=progress&height=20&width=260&mode=0&percent=";
|
|
|
|
|
2008-11-11 15:24:34 +01:00
|
|
|
$table->style[0] = "padding-top:4px; padding-bottom:4px;";
|
|
|
|
$table->data[0][0] ='<b>'.__('Monitor health').'</b>';
|
|
|
|
|
|
|
|
$table->style[1] = "padding-top:4px; padding-bottom:4px;";
|
2009-02-13 21:23:44 +01:00
|
|
|
$table->data[1][0] = print_image ($img.$data["monitor_health"], true, array ("title" => $data["monitor_health"].'% '.__('of monitors up')));
|
2008-11-11 15:24:34 +01:00
|
|
|
|
|
|
|
$table->style[2] = "padding-top:4px; padding-bottom:4px;";
|
2009-01-20 21:01:25 +01:00
|
|
|
$table->data[2][0] = '<b>'.__('Module sanity').'</b>';
|
2008-11-11 15:24:34 +01:00
|
|
|
|
|
|
|
$table->style[3] = "padding-top:4px; padding-bottom:4px;";
|
2009-02-13 21:23:44 +01:00
|
|
|
$table->data[3][0] = print_image ($img.$data["module_sanity"], true, array ("title" => $data["module_sanity"].'% '.__('of total modules inited')));
|
2008-11-11 15:24:34 +01:00
|
|
|
|
|
|
|
$table->style[4] = "padding-top:4px; padding-bottom:4px;";
|
2009-01-20 21:01:25 +01:00
|
|
|
$table->data[4][0] = '<b>'.__('Alert level').'</b>';
|
2008-11-11 15:24:34 +01:00
|
|
|
|
|
|
|
$table->style[5] = "padding-top:4px; padding-bottom:4px;";
|
2009-02-13 21:23:44 +01:00
|
|
|
$table->data[5][0] = print_image ($img.$data["alert_level"], true, array ("title" => $data["alert_level"].'% '.__('of defined alerts not fired')));
|
2008-11-11 15:24:34 +01:00
|
|
|
|
|
|
|
print_table ($table);
|
|
|
|
unset ($table);
|
|
|
|
|
2009-02-13 21:23:44 +01:00
|
|
|
echo '<table class="databox" cellpadding="4" cellspacing="4" width="100%">';
|
2008-11-11 15:24:34 +01:00
|
|
|
echo '<tr><th colspan="2">'.__('Monitor checks').'</th></tr>';
|
|
|
|
|
|
|
|
$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";
|
|
|
|
|
2009-01-20 21:01:25 +01:00
|
|
|
$cells[1][0] = __('Monitors normal');
|
2008-11-11 15:24:34 +01:00
|
|
|
$cells[1][1] = $data["monitor_ok"];
|
2009-01-20 21:01:25 +01:00
|
|
|
$cells[1]["href"] = "index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=0"; //Up
|
2008-11-11 15:24:34 +01:00
|
|
|
$cells[1]["color"] = "#000";
|
|
|
|
|
2009-01-20 21:01:25 +01:00
|
|
|
$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
|
2008-11-11 15:24:34 +01:00
|
|
|
$cells[2]["color"] = "#f00";
|
|
|
|
|
2009-01-20 21:01:25 +01:00
|
|
|
$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 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] = __('Monitors not init');
|
|
|
|
$cells[5][1] = $data["monitor_not_init"];
|
|
|
|
$cells[5]["color"] = "#f00";
|
|
|
|
$cells[5]["href"] = "#";
|
|
|
|
|
|
|
|
$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";
|
|
|
|
|
|
|
|
$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";
|
2008-11-11 15:24:34 +01:00
|
|
|
|
|
|
|
print_cells_temp ($cells);
|
|
|
|
|
|
|
|
echo '<tr><th colspan="2">'.__('Summary').'</th></tr>';
|
|
|
|
|
|
|
|
$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);
|
2008-07-03 13:47:53 +02:00
|
|
|
|
|
|
|
echo "</table>";
|
2008-11-11 15:24:34 +01:00
|
|
|
echo '</div>'; //Left column
|
2008-07-03 13:47:53 +02:00
|
|
|
|
2008-11-11 15:24:34 +01:00
|
|
|
echo '<div style="width: 450px; float:left;" id="rightcolumn">';
|
2008-07-03 13:47:53 +02:00
|
|
|
|
|
|
|
// Server information
|
2008-11-11 15:24:34 +01:00
|
|
|
|
|
|
|
$serverinfo = get_server_info ();
|
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu>
* pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new
functions and better security and validation
* pandora_console/include/functions_db.php: Renamed some functions and
created agentmodule functions for consistency with documentation and to
avoid searching for and typing certain function names:
get_agentmodules is now get_agent_modules;
dame_grupo is now get_group_name;
dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new;
dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name;
dame_nombre_modulo_agentemodulo is now get_agentmodule_name;
dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type;
dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is
now get_group_name; get_agentmodule_count is get_agent_modules_count;
get_agentmodule_group is new; get_agent_group is new;
* pandora_console/include/functions_reporting.php,
pandora_console/include/functions.php,
pandora_console/operation/incidents/incident.php,
pandora_console/operation/users/user.php,
pandora_console/operation/users/user_edit.php,
pandora_console/operation/events/events.php,
pandora_console/operation/visual_console/index.php,
pandora_console/operation/agentes/estado_grupo.php,
pandora_console/operation/agentes/export_csv.php,
pandora_console/operation/agentes/estado_agente.php,
pandora_console/operation/agentes/estado_ultimopaquete.php,
pandora_console/operation/agentes/estado_generalagente.php,
pandora_console/operation/agentes/sla_view.php,
pandora_console/operation/agentes/exportdata.php,
pandora_console/operation/agentes/ver_agente.php,
pandora_console/operation/agentes/tactical.php,
pandora_console/operation/agentes/networkmap.php,
pandora_console/operation/messages/message.php,
pandora_console/operation/reporting/reporting_xml.php,
pandora_console/operation/reporting/reporting_viewer.php,
pandora_console/reporting/fgraph.php,
pandora_console/godmode/groups/group_list.php,
pandora_console/godmode/users/user_list.php,
pandora_console/godmode/users/configure_user.php,
pandora_console/godmode/db/db_refine.php,
pandora_console/godmode/db/db_info.php,
pandora_console/godmode/db/db_purge.php,
pandora_console/godmode/agentes/manage_config.php,
pandora_console/godmode/agentes/modificar_agente.php,
pandora_console/godmode/agentes/configurar_agente.php,
pandora_console/godmode/agentes/manage_config_remote.php,
pandora_console/godmode/modules/manage_network_components_form_network.php,
pandora_console/godmode/modules/manage_network_components_form_wmi.php,
pandora_console/godmode/reporting/reporting_builder.php,
pandora_console/godmode/reporting/map_builder.php,
pandora_console/godmode/reporting/graph_builder.php: Renamed functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
|
|
|
$total_modules = get_agent_modules_count ();
|
2008-11-11 15:24:34 +01:00
|
|
|
$cells = array ();
|
|
|
|
|
2008-12-03 13:41:09 +01:00
|
|
|
if ($serverinfo) {
|
|
|
|
|
|
|
|
echo '<table class="databox" cellpadding="4" cellspacing="4" style="width:100%;">';
|
|
|
|
echo '<thead>
|
|
|
|
<tr>
|
|
|
|
<th colspan="4" style="background-color:#799E48">'.__('Tactical server information').'</th>
|
|
|
|
</tr>';
|
|
|
|
echo '<tr>
|
|
|
|
<th style="font-weight:none;">'.__('Name').'</th>
|
|
|
|
<th style="font-weight:none;">'.__('Status').'</th>
|
|
|
|
<th style="font-weight:none;">'.__('Load').'</th>
|
|
|
|
<th style="font-weight:none;">'.__('Lag').pandora_help ("serverlag", true).'</th>
|
|
|
|
</tr></thead><tbody>';
|
|
|
|
|
|
|
|
foreach ($serverinfo as $server_id => $server_info) {
|
2008-11-11 15:24:34 +01:00
|
|
|
$data = array ();
|
|
|
|
$data[0] = $server_info["name"];
|
|
|
|
|
|
|
|
if ($server_info["status"] == 0){
|
2009-02-13 21:23:44 +01:00
|
|
|
$data[1] = print_image ("images/pixel_red.png", true, array ("width" => 20, "height" => 20));
|
2008-11-11 15:24:34 +01:00
|
|
|
} else {
|
2009-02-13 21:23:44 +01:00
|
|
|
$data[1] = print_image ("images/pixel_green.png", true, array ("width" => 20, "height" => 20));
|
2008-11-11 15:24:34 +01:00
|
|
|
}
|
2008-12-03 13:41:09 +01:00
|
|
|
|
2008-11-11 15:24:34 +01:00
|
|
|
if ($server_info["modules"] > 0 && $total_modules > 0) {
|
|
|
|
$percent = $server_info["modules"] / ($total_modules / 100);
|
|
|
|
} else {
|
|
|
|
$percent = 0;
|
2007-06-08 17:55:53 +02:00
|
|
|
}
|
2009-02-13 21:23:44 +01:00
|
|
|
$data[2] = print_image ("reporting/fgraph.php?tipo=progress&percent=".$percent."&height=18&width=80", true, array ("title" => $server_info["modules"]." ".__('of')." ".$total_modules));
|
2008-07-03 13:47:53 +02:00
|
|
|
|
2008-11-11 15:24:34 +01:00
|
|
|
$data[3] = $server_info["lag"]." / ".$server_info["module_lag"];
|
|
|
|
|
|
|
|
array_push ($cells, $data);
|
2008-12-03 13:41:09 +01:00
|
|
|
}
|
2007-06-08 17:55:53 +02:00
|
|
|
|
2008-12-03 13:41:09 +01:00
|
|
|
foreach ($cells as $key => $row) {
|
2008-11-11 15:24:34 +01:00
|
|
|
//Switch class around
|
|
|
|
$class = (($key % 2) ? "datos2" : "datos");
|
|
|
|
echo '<tr>
|
|
|
|
<td class="'.$class.'">'.$row[0].'</td>
|
|
|
|
<td class="'.$class.'" style="text-align:center;">'.$row[1].'</td>
|
|
|
|
<td class="'.$class.'" style="text-align:center;">'.$row[2].'</td>
|
|
|
|
<td class="'.$class.'" style="text-align:right;">'.$row[3].'</td>
|
2008-12-03 13:41:09 +01:00
|
|
|
</tr>';
|
|
|
|
}
|
|
|
|
echo '</tbody></table>';
|
2008-12-03 15:11:44 +01:00
|
|
|
} else {
|
2009-02-13 21:23:44 +01:00
|
|
|
echo '<div class="nf">'.__('There are no servers configured into the database').'</div>';
|
2008-11-11 15:24:34 +01:00
|
|
|
}
|
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
|
|
|
print_events_table ("", 10, 450);
|
2007-06-08 17:55:53 +02:00
|
|
|
|
2008-11-11 15:24:34 +01:00
|
|
|
echo '</div>';
|
2009-01-20 21:01:25 +01:00
|
|
|
?>
|