2007-06-08 17:55:53 +02:00
|
|
|
<?php
|
2021-04-29 13:28:03 +02:00
|
|
|
/**
|
|
|
|
* Tactical View.
|
|
|
|
*
|
|
|
|
* @category View
|
|
|
|
* @package Pandora FMS
|
|
|
|
* @subpackage Monitoring.
|
|
|
|
* @version 1.0.0
|
|
|
|
* @license See below
|
|
|
|
*
|
|
|
|
* ______ ___ _______ _______ ________
|
|
|
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
|
|
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
|
|
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
|
|
|
*
|
|
|
|
* ============================================================================
|
|
|
|
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
|
|
|
* Please see http://pandorafms.org for full contribution list
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation for version 2.
|
|
|
|
* 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.
|
|
|
|
* ============================================================================
|
|
|
|
*/
|
2007-06-08 17:55:53 +02:00
|
|
|
|
2021-04-29 13:28:03 +02:00
|
|
|
// Begin.
|
2010-03-03 18:10:37 +01:00
|
|
|
global $config;
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once 'include/functions_events.php';
|
|
|
|
require_once 'include/functions_servers.php';
|
|
|
|
require_once 'include/functions_reporting.php';
|
|
|
|
require_once 'include/functions_tactical.php';
|
|
|
|
require_once $config['homedir'].'/include/functions_graph.php';
|
|
|
|
|
|
|
|
check_login();
|
|
|
|
|
|
|
|
if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'], 0, 'AW')) {
|
|
|
|
db_pandora_audit(
|
2022-01-20 10:55:23 +01:00
|
|
|
AUDIT_LOG_ACL_VIOLATION,
|
2019-01-30 16:18:44 +01:00
|
|
|
'Trying to access Agent view (Grouped)'
|
|
|
|
);
|
|
|
|
include 'general/noaccess.php';
|
|
|
|
return;
|
2008-07-03 13:47:53 +02:00
|
|
|
}
|
2015-07-06 18:18:20 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$is_admin = check_acl($config['id_user'], 0, 'PM');
|
2015-02-19 19:09:36 +01:00
|
|
|
$user_strict = (bool) db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']);
|
2010-09-29 16:42:42 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$force_refresh = get_parameter('force_refresh', '');
|
|
|
|
$refresh = get_parameter('refr', 0);
|
2012-09-27 17:17:50 +02:00
|
|
|
if ($force_refresh == 1) {
|
2019-01-30 16:18:44 +01:00
|
|
|
db_process_sql('UPDATE tgroup_stat SET utimestamp = 0');
|
2010-03-02 20:25:51 +01:00
|
|
|
}
|
2008-11-11 15:24:34 +01:00
|
|
|
|
2022-12-16 14:28:04 +01:00
|
|
|
$updated_time = '';
|
2019-01-30 16:18:44 +01:00
|
|
|
if ($config['realtimestats'] == 0) {
|
|
|
|
$updated_time = "<a href='index.php?sec=estado&sec2=operation/agentes/tactical&force_refresh=1'>";
|
|
|
|
$updated_time .= __('Last update').' : '.ui_print_timestamp(db_get_sql('SELECT min(utimestamp) FROM tgroup_stat'), true);
|
|
|
|
$updated_time .= '</a>';
|
|
|
|
} else {
|
|
|
|
// $updated_info = __("Updated at realtime");
|
2021-04-29 13:28:03 +02:00
|
|
|
$updated_info = '';
|
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
|
|
|
}
|
|
|
|
|
2019-04-24 13:53:18 +02:00
|
|
|
// Header.
|
2021-04-29 13:28:03 +02:00
|
|
|
ui_print_standard_header(
|
2019-04-24 13:53:18 +02:00
|
|
|
__('Tactical view'),
|
|
|
|
'',
|
|
|
|
false,
|
2020-05-29 11:37:06 +02:00
|
|
|
'',
|
2019-04-24 13:53:18 +02:00
|
|
|
false,
|
2021-04-29 13:28:03 +02:00
|
|
|
(array) $updated_time,
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'link' => '',
|
|
|
|
'label' => __('Monitoring'),
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'link' => '',
|
|
|
|
'label' => __('Views'),
|
|
|
|
],
|
|
|
|
]
|
2019-04-24 13:53:18 +02:00
|
|
|
);
|
2015-11-18 16:31:44 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// Currently this function makes loading this page is impossible. Change
|
|
|
|
// and create new function.
|
2022-06-06 11:14:09 +02:00
|
|
|
$all_data = tactical_status_modules_agents($config['id_user'], false, 'AR');
|
2015-01-15 18:08:58 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$data = [];
|
2015-11-18 16:31:44 +01:00
|
|
|
|
|
|
|
$data['monitor_not_init'] = (int) $all_data['_monitors_not_init_'];
|
|
|
|
$data['monitor_unknown'] = (int) $all_data['_monitors_unknown_'];
|
|
|
|
$data['monitor_ok'] = (int) $all_data['_monitors_ok_'];
|
|
|
|
$data['monitor_warning'] = (int) $all_data['_monitors_warning_'];
|
|
|
|
$data['monitor_critical'] = (int) $all_data['_monitors_critical_'];
|
|
|
|
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
|
|
|
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
|
|
|
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
2021-07-19 13:20:00 +02:00
|
|
|
$data['monitor_total'] = (int) $all_data['_monitor_total_'];
|
2015-11-18 16:31:44 +01:00
|
|
|
|
|
|
|
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$data['monitor_checks'] = (int) $all_data['_monitor_checks_'];
|
2015-11-18 16:31:44 +01:00
|
|
|
|
2015-02-19 19:09:36 +01:00
|
|
|
|
|
|
|
// Percentages
|
|
|
|
if (!empty($all_data)) {
|
2019-01-30 16:18:44 +01:00
|
|
|
if ($data['monitor_not_normal'] > 0 && $data['monitor_checks'] > 0) {
|
|
|
|
$data['monitor_health'] = format_numeric((100 - ($data['monitor_not_normal'] / ($data['monitor_checks'] / 100))), 1);
|
|
|
|
} else {
|
|
|
|
$data['monitor_health'] = 100;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($data['monitor_not_init'] > 0 && $data['monitor_checks'] > 0) {
|
|
|
|
$data['module_sanity'] = format_numeric((100 - ($data['monitor_not_init'] / ($data['monitor_checks'] / 100))), 1);
|
|
|
|
} else {
|
|
|
|
$data['module_sanity'] = 100;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($data['alerts'])) {
|
|
|
|
if ($data['monitor_alerts_fired'] > 0 && $data['alerts'] > 0) {
|
|
|
|
$data['alert_level'] = format_numeric((100 - ($data['monitor_alerts_fired'] / ($data['alerts'] / 100))), 1);
|
|
|
|
} else {
|
|
|
|
$data['alert_level'] = 100;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$data['alert_level'] = 100;
|
|
|
|
$data['alerts'] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$data['monitor_bad'] = ($data['monitor_critical'] + $data['monitor_warning']);
|
|
|
|
|
|
|
|
if ($data['monitor_bad'] > 0 && $data['monitor_checks'] > 0) {
|
|
|
|
$data['global_health'] = format_numeric((100 - ($data['monitor_bad'] / ($data['monitor_checks'] / 100))), 1);
|
|
|
|
} else {
|
|
|
|
$data['global_health'] = 100;
|
|
|
|
}
|
|
|
|
|
|
|
|
$data['server_sanity'] = format_numeric((100 - $data['module_sanity']), 1);
|
2013-01-10 17:00:30 +01:00
|
|
|
}
|
|
|
|
|
2021-03-11 15:40:23 +01:00
|
|
|
echo '<table border=0 class="w100p"><tr>';
|
|
|
|
echo '<td class="tactical_left_column" id="leftcolumn">';
|
2012-09-27 17:17:50 +02:00
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
// The status horizontal bars (Global health, Monitor sanity...
|
|
|
|
// ---------------------------------------------------------------------
|
2021-03-26 10:32:30 +01:00
|
|
|
$bg_color = 'background-color: #222';
|
2022-01-17 10:22:30 +01:00
|
|
|
if ($config['style'] !== 'pandora_black' && !is_metaconsole()) {
|
2021-03-26 10:32:30 +01:00
|
|
|
$bg_color = 'background-color: #fff';
|
|
|
|
}
|
|
|
|
|
2015-05-21 12:18:40 +02:00
|
|
|
$table = new stdClass();
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->width = '100%';
|
2021-03-26 10:32:30 +01:00
|
|
|
$table->class = 'info_table no-td-borders';
|
2013-04-10 09:57:54 +02:00
|
|
|
$table->cellpadding = 2;
|
|
|
|
$table->cellspacing = 2;
|
2008-11-11 15:24:34 +01:00
|
|
|
$table->border = 0;
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->head = [];
|
|
|
|
$table->data = [];
|
2021-03-26 10:32:30 +01:00
|
|
|
$table->style = [$bg_color];
|
2008-11-11 15:24:34 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$stats = reporting_get_stats_indicators($data, 120, 10, false);
|
2021-03-26 10:32:30 +01:00
|
|
|
$status = '<table class="status_tactical bg_white">';
|
2019-01-30 16:18:44 +01:00
|
|
|
foreach ($stats as $stat) {
|
|
|
|
$status .= '<tr><td><b>'.$stat['title'].'</b>'.'</td><td>'.$stat['graph'].'</td></tr>';
|
2015-03-31 09:28:06 +02:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2015-03-31 09:28:06 +02:00
|
|
|
$status .= '</table>';
|
|
|
|
$table->data[0][0] = $status;
|
2013-04-10 09:57:54 +02:00
|
|
|
$table->rowclass[] = '';
|
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
|
|
|
|
2012-09-27 17:17:50 +02:00
|
|
|
// ---------------------------------------------------------------------
|
|
|
|
// Monitor checks
|
|
|
|
// ---------------------------------------------------------------------
|
2019-01-30 16:18:44 +01:00
|
|
|
$data_agents = [
|
|
|
|
__('Critical') => $data['monitor_critical'],
|
|
|
|
__('Warning') => $data['monitor_warning'],
|
|
|
|
__('Normal') => $data['monitor_ok'],
|
|
|
|
__('Unknown') => $data['monitor_unknown'],
|
|
|
|
__('Not init') => $data['monitor_not_init'],
|
|
|
|
];
|
2015-02-19 19:09:36 +01:00
|
|
|
|
2015-03-31 09:28:06 +02:00
|
|
|
$table->data[1][0] = reporting_get_stats_alerts($data);
|
2015-05-21 12:18:40 +02:00
|
|
|
$table->data[2][0] = reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
|
|
|
|
$table->data[3][0] = reporting_get_stats_agents_monitors($data);
|
2013-05-01 00:20:22 +02:00
|
|
|
|
2017-03-06 12:54:48 +01:00
|
|
|
$table->rowclass[] = '';
|
2013-05-01 00:20:22 +02:00
|
|
|
|
2012-09-27 17:17:50 +02:00
|
|
|
// ---------------------------------------------------------------------
|
2019-01-30 16:18:44 +01:00
|
|
|
// Server performance
|
2012-09-27 17:17:50 +02:00
|
|
|
// ---------------------------------------------------------------------
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($is_admin) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data[4][0] = reporting_get_stats_servers();
|
|
|
|
$table->rowclass[] = '';
|
2013-02-27 18:11:42 +01:00
|
|
|
}
|
2008-07-03 13:47:53 +02:00
|
|
|
|
2019-05-31 09:50:59 +02:00
|
|
|
ui_toggle(
|
|
|
|
html_print_table($table, true),
|
|
|
|
__('Report of State'),
|
2019-06-04 13:57:55 +02:00
|
|
|
'',
|
|
|
|
'',
|
2019-05-31 09:50:59 +02:00
|
|
|
false
|
|
|
|
);
|
2015-03-31 09:28:06 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
echo '</td>';
|
|
|
|
// Left column
|
2021-03-26 10:32:30 +01:00
|
|
|
echo '<td class="w75p pdd_t_0px" id="rightcolumn">';
|
2008-07-03 13:47:53 +02:00
|
|
|
|
2012-09-27 17:17:50 +02:00
|
|
|
// ---------------------------------------------------------------------
|
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
|
|
|
// Last events information
|
2012-09-27 17:17:50 +02:00
|
|
|
// ---------------------------------------------------------------------
|
2019-01-30 16:18:44 +01:00
|
|
|
if (check_acl($config['id_user'], 0, 'ER')) {
|
|
|
|
$tags_condition = tags_get_acl_tags(false, 0, 'ER', 'event_condition');
|
|
|
|
$event_filter = 'estado<>1';
|
|
|
|
if (!empty($tags_condition)) {
|
|
|
|
$event_filter .= " AND ($tags_condition)";
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($config['event_view_hr']) {
|
|
|
|
$event_filter .= ' AND utimestamp > (UNIX_TIMESTAMP(NOW()) - '.($config['event_view_hr'] * SECONDS_1HOUR).')';
|
|
|
|
}
|
|
|
|
|
|
|
|
$events = events_print_event_table($event_filter, 10, '100%', true, false, true);
|
2019-05-29 17:49:09 +02:00
|
|
|
ui_toggle(
|
|
|
|
$events,
|
|
|
|
__('Latest events'),
|
2019-06-04 13:57:55 +02:00
|
|
|
'',
|
|
|
|
'',
|
2019-05-29 17:49:09 +02:00
|
|
|
false
|
|
|
|
);
|
2015-02-19 19:09:36 +01:00
|
|
|
}
|
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
|
|
|
|
2012-09-27 17:17:50 +02:00
|
|
|
// ---------------------------------------------------------------------
|
2008-07-03 13:47:53 +02:00
|
|
|
// Server information
|
2012-09-27 17:17:50 +02:00
|
|
|
// ---------------------------------------------------------------------
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($is_admin) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$tiny = true;
|
|
|
|
include $config['homedir'].'/godmode/servers/servers.build_table.php';
|
2008-11-11 15:24:34 +01:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-12-13 09:10:13 +01:00
|
|
|
$out = '<table cellpadding=0 cellspacing=0 class="databox pies mrgn_top_15px" width=100%><tr><td style="width:50%;">';
|
|
|
|
$out .= '<fieldset class="padding-0 databox tactical_set" id="total_event_graph">';
|
|
|
|
$out .= '<legend>'.__('Event graph').'</legend>';
|
|
|
|
$out .= html_print_image('images/spinner.gif', true, ['id' => 'spinner_total_event_graph']);
|
|
|
|
$out .= '</fieldset>';
|
|
|
|
$out .= '</td><td style="width:50%;">';
|
|
|
|
$out .= '<fieldset class="padding-0 databox tactical_set" id="graphic_event_group">
|
|
|
|
<legend>'.__('Event graph by agent').'</legend>'.html_print_image('images/spinner.gif', true, ['id' => 'spinner_graphic_event_group']).'</fieldset>';
|
|
|
|
$out .= '</td></tr></table>';
|
2019-05-31 09:50:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
ui_toggle(
|
|
|
|
$out,
|
|
|
|
__('Event graphs'),
|
2019-06-04 13:57:55 +02:00
|
|
|
'',
|
|
|
|
'',
|
2019-05-31 09:50:59 +02:00
|
|
|
false
|
|
|
|
);
|
2007-06-08 17:55:53 +02:00
|
|
|
|
2013-03-01 14:22:29 +01:00
|
|
|
echo '</td>';
|
|
|
|
echo '</tr></table>';
|
2018-10-24 16:36:44 +02:00
|
|
|
?>
|
|
|
|
<script type="text/javascript">
|
2019-01-30 16:18:44 +01:00
|
|
|
$(document).ready(function () {
|
|
|
|
var parameters = {};
|
|
|
|
parameters["page"] = "include/ajax/events";
|
|
|
|
parameters["total_event_graph"] = 1;
|
|
|
|
|
2020-02-28 11:38:41 +01:00
|
|
|
$.ajax({type: "GET",url: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",data: parameters,
|
2019-01-30 16:18:44 +01:00
|
|
|
success: function(data) {
|
|
|
|
$("#spinner_total_event_graph").hide();
|
|
|
|
$("#total_event_graph").append(data);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
delete parameters["total_event_graph"];
|
|
|
|
parameters["graphic_event_group"] = 1;
|
|
|
|
|
2020-02-28 11:38:41 +01:00
|
|
|
$.ajax({type: "GET",url: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",data: parameters,
|
2019-01-30 16:18:44 +01:00
|
|
|
success: function(data) {
|
|
|
|
$("#spinner_graphic_event_group").hide();
|
|
|
|
$("#graphic_event_group").append(data);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2019-04-24 13:53:18 +02:00
|
|
|
</script>
|