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
< ? php
// Pandora FMS - http://pandorafms.com
// ==================================================
2020-11-27 13:52:35 +01:00
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
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
// 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.
// Load global vars
2019-01-30 16:18:44 +01:00
require_once 'include/config.php' ;
require_once 'include/functions_reporting.php' ;
require_once $config [ 'homedir' ] . '/include/functions_agents.php' ;
require_once $config [ 'homedir' ] . '/include/functions_users.php' ;
require_once 'include/functions_groupview.php' ;
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-01-30 16:18:44 +01:00
check_login ();
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
// ACL Check
2019-01-30 16:18:44 +01:00
$agent_a = check_acl ( $config [ 'id_user' ], 0 , 'AR' );
$agent_w = check_acl ( $config [ 'id_user' ], 0 , 'AW' );
2016-09-08 16:06:12 +02:00
if ( ! $agent_a && ! $agent_w ) {
2019-01-30 16:18:44 +01:00
db_pandora_audit (
'ACL Violation' ,
'Trying to access Agent view (Grouped)'
);
include 'general/noaccess.php' ;
exit ;
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-01-30 16:18:44 +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
// Update network modules for this group
// Check for Network FLAG change request
// Made it a subquery, much faster on both the database and server side
2019-01-30 16:18:44 +01:00
if ( isset ( $_GET [ 'update_netgroup' ])) {
$group = get_parameter_get ( 'update_netgroup' , 0 );
if ( check_acl ( $config [ 'id_user' ], $group , 'AW' )) {
if ( $group == 0 ) {
db_process_sql_update ( 'tagente_modulo' , [ 'flag' => 1 ]);
} else {
db_process_sql (
' UPDATE `tagente_modulo`
2014-09-22 14:05:04 +02:00
SET `flag` = 1
WHERE `id_agente` = ANY ( SELECT id_agente
FROM tagente
2019-01-30 16:18:44 +01:00
WHERE id_grupo = '.$group.' ) '
);
}
} else {
db_pandora_audit ( 'ACL Violation' , 'Trying to set flag for groups' );
include 'general/noaccess.php' ;
exit ;
}
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-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");
$updated_info = '' ;
2015-01-16 17:14:49 +01:00
}
2019-04-24 13:53:18 +02:00
// Header.
ui_print_page_header (
__ ( 'Group view' ),
'images/group.png' ,
false ,
2020-05-29 11:37:06 +02:00
'' ,
2019-04-24 13:53:18 +02:00
false ,
$updated_time
);
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
2016-02-01 11:52:03 +01:00
$total_agentes = 0 ;
$monitor_ok = 0 ;
$monitor_warning = 0 ;
$monitor_critical = 0 ;
$monitor_unknown = 0 ;
$monitor_not_init = 0 ;
$agents_unknown = 0 ;
2016-09-23 13:46:44 +02:00
$agents_critical = 0 ;
2016-02-01 11:52:03 +01:00
$agents_notinit = 0 ;
2018-09-21 15:10:30 +02:00
$agents_ok = 0 ;
$agents_warning = 0 ;
2016-02-01 11:52:03 +01:00
$all_alerts_fired = 0 ;
2019-01-30 16:18:44 +01:00
// Groups and tags
2018-09-07 14:19:01 +02:00
$result_groups_info = groupview_get_groups_list (
2019-01-30 16:18:44 +01:00
$config [ 'id_user' ],
( $agent_a == true ) ? 'AR' : (( $agent_w == true ) ? 'AW' : 'AR' )
2018-09-06 15:28:22 +02:00
);
2018-09-07 14:19:01 +02:00
$result_groups = $result_groups_info [ 'groups' ];
$count = $result_groups_info [ 'counter' ];
2018-04-06 12:04:08 +02:00
2019-01-30 16:18:44 +01:00
if ( $result_groups [ 0 ][ '_id_' ] == 0 ) {
$total_agentes = $result_groups [ 0 ][ '_total_agents_' ];
$monitor_ok = $result_groups [ 0 ][ '_monitors_ok_' ];
$monitor_warning = $result_groups [ 0 ][ '_monitors_warning_' ];
$monitor_critical = $result_groups [ 0 ][ '_monitors_critical_' ];
$monitor_unknown = $result_groups [ 0 ][ '_monitors_unknown_' ];
$monitor_not_init = $result_groups [ 0 ][ '_monitors_not_init_' ];
$agents_unknown = $result_groups [ 0 ][ '_agents_unknown_' ];
$agents_notinit = $result_groups [ 0 ][ '_agents_not_init_' ];
$agents_critical = $result_groups [ 0 ][ '_agents_critical_' ];
$agents_warning = $result_groups [ 0 ][ '_agents_warning_' ];
$agents_ok = $result_groups [ 0 ][ '_agents_ok_' ];
$all_alerts_fired = $result_groups [ 0 ][ '_monitors_alerts_fired_' ];
2016-01-15 12:54:28 +01:00
}
2015-12-23 09:31:50 +01:00
2019-01-30 16:18:44 +01:00
$total = ( $monitor_ok + $monitor_warning + $monitor_critical + $monitor_unknown + $monitor_not_init );
2015-03-31 09:28:06 +02:00
2019-01-30 16:18:44 +01:00
// Modules
$total_ok = 0 ;
$total_warning = 0 ;
$total_critical = 0 ;
$total_unknown = 0 ;
$total_monitor_not_init = 0 ;
// Agents
2018-04-06 12:04:08 +02:00
$total_agent_unknown = 0 ;
$total_agent_critical = 0 ;
$total_not_init = 0 ;
2018-09-21 15:10:30 +02:00
$total_agent_warning = 0 ;
$total_agent_ok = 0 ;
2018-04-06 12:04:08 +02:00
if ( $total > 0 ) {
2019-01-30 16:18:44 +01:00
// Modules
$total_ok = format_numeric ((( $monitor_ok * 100 ) / $total ), 2 );
$total_warning = format_numeric ((( $monitor_warning * 100 ) / $total ), 2 );
$total_critical = format_numeric ((( $monitor_critical * 100 ) / $total ), 2 );
$total_unknown = format_numeric ((( $monitor_unknown * 100 ) / $total ), 2 );
$total_monitor_not_init = format_numeric ((( $monitor_not_init * 100 ) / $total ), 2 );
2018-04-06 12:04:08 +02:00
}
2019-01-30 16:18:44 +01:00
2018-04-06 12:04:08 +02:00
if ( $total_agentes > 0 ) {
2019-01-30 16:18:44 +01:00
// Agents
$total_agent_unknown = format_numeric ((( $agents_unknown * 100 ) / $total_agentes ), 2 );
$total_agent_critical = format_numeric ((( $agents_critical * 100 ) / $total_agentes ), 2 );
$total_agent_warning = format_numeric ((( $agents_warning * 100 ) / $total_agentes ), 2 );
$total_agent_ok = format_numeric ((( $agents_ok * 100 ) / $total_agentes ), 2 );
$total_not_init = format_numeric ((( $agents_notinit * 100 ) / $total_agentes ), 2 );
2018-04-06 12:04:08 +02:00
}
2016-01-15 12:54:28 +01:00
2015-03-31 09:28:06 +02:00
echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="databox">' ;
2019-01-30 16:18:44 +01:00
echo '<tr>' ;
2021-03-11 15:40:23 +01:00
echo " <th colspan=2 class='center'> " . __ ( 'Summary of the status groups' ) . '</th>' ;
2019-01-30 16:18:44 +01:00
echo '</tr>' ;
echo '<tr>' ;
2021-03-11 15:40:23 +01:00
echo " <th width=50% class='center'> " . __ ( 'Agents' ) . '</th>' ;
echo " <th width=50% class='center'> " . __ ( 'Modules' ) . '</th>' ;
2019-01-30 16:18:44 +01:00
echo '</tr>' ;
echo " <tr height=70px'> " ;
echo " <td align='center'> " ;
2021-03-11 15:40:23 +01:00
echo " <span id='sumary' class='red_background'> " . $total_agent_critical . '%</span>' ;
echo " <span id='sumary' class='yellow_background'> " . $total_agent_warning . '%</span>' ;
echo " <span id='sumary' class='green_background'> " . $total_agent_ok . '%</span>' ;
echo " <span id='sumary' class='bg_B2B2B2'> " . $total_agent_unknown . '%</span>' ;
echo " <span id='sumary' class='bg_5bb6e5'> " . $total_not_init . '%</span>' ;
2019-01-30 16:18:44 +01:00
echo '</td>' ;
echo " <td align='center'> " ;
2021-03-11 15:40:23 +01:00
echo " <span id='sumary' class='red_background'> " . $total_critical . '%</span>' ;
echo " <span id='sumary' class='yellow_background'> " . $total_warning . '%</span>' ;
echo " <span id='sumary' class='green_background'> " . $total_ok . '%</span>' ;
echo " <span id='sumary' class='bg_B2B2B2'> " . $total_unknown . '%</span>' ;
echo " <span id='sumary' class='bg_5bb6e5'> " . $total_monitor_not_init . '%</span>' ;
2019-01-30 16:18:44 +01:00
echo '</td>' ;
echo '</tr>' ;
echo '</table>' ;
2015-03-31 09:28:06 +02:00
2015-12-23 09:31:50 +01:00
if ( $count == 1 ) {
2019-01-30 16:18:44 +01:00
if ( $result_groups [ 0 ][ '_id_' ] == 0 ) {
unset ( $result_groups [ 0 ]);
}
2015-12-23 09:31:50 +01:00
}
2015-01-15 18:08:58 +01:00
ui_pagination ( $count );
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
2015-01-15 18:08:58 +01:00
if ( ! empty ( $result_groups )) {
2021-03-11 15:40:23 +01:00
echo '<table cellpadding="0" cellspacing="0" class="databox data mrgn_top_10px" border="0" width="100%">' ;
2019-01-30 16:18:44 +01:00
echo '<tr>' ;
echo '<th colspan=2 ></th>' ;
2021-03-11 15:40:23 +01:00
echo " <th colspan=6 class='difference center'> " . __ ( 'Agents' ) . '</th>' ;
echo " <th colspan=6 class='center'> " . __ ( 'Modules' ) . '</th>' ;
2019-01-30 16:18:44 +01:00
echo '</tr>' ;
echo '<tr>' ;
2021-03-11 15:40:23 +01:00
echo " <th class='w26px'> " . __ ( 'Force' ) . '</th>' ;
2021-03-12 12:10:56 +01:00
echo " <th width='30%' class='mw60px' style='text-align: justify'> " . __ ( 'Group' ) . '/' . __ ( 'Tags' ) . '</th>' ;
2021-03-11 15:40:23 +01:00
echo " <th width='10%' class='mw60px center'> " . __ ( 'Total' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Unknown' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Not init' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Normal' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Warning' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Critical' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Unknown' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Not init' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Normal' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Warning' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Critical' ) . '</th>' ;
echo " <th width='10%' class='mw60px center'> " . __ ( 'Alert fired' ) . '</th>' ;
2019-01-30 16:18:44 +01:00
echo '</tr>' ;
foreach ( $result_groups as $data ) {
$groups_id = $data [ '_id_' ];
// Calculate entire row color
if ( $groups_id != 0 ) {
if ( $data [ '_monitors_alerts_fired_' ] > 0 ) {
$color_class = 'group_view_alrm' ;
$status_image = ui_print_status_image ( 'agent_alertsfired_ball.png' , '' , true );
} else if ( $data [ '_monitors_critical_' ] > 0 ) {
$color_class = 'group_view_crit' ;
$status_image = ui_print_status_image ( 'agent_critical_ball.png' , '' , true );
} else if ( $data [ '_monitors_warning_' ] > 0 ) {
$color_class = 'group_view_warn' ;
$status_image = ui_print_status_image ( 'agent_warning_ball.png' , '' , true );
} else if (( $data [ '_monitors_unknown_' ] > 0 ) || ( $data [ '_agents_unknown_' ] > 0 )) {
$color_class = 'group_view_unk' ;
$status_image = ui_print_status_image ( 'agent_no_monitors_ball.png' , '' , true );
} else if ( $data [ '_monitors_ok_' ] > 0 ) {
$color_class = 'group_view_ok' ;
$status_image = ui_print_status_image ( 'agent_ok_ball.png' , '' , true );
} else {
$color_class = '' ;
$status_image = ui_print_status_image ( 'agent_no_data_ball.png' , '' , true );
}
} else {
$color_class = '' ;
$status_image = ui_print_status_image ( 'agent_no_data_ball.png' , '' , true );
}
2021-03-11 15:40:23 +01:00
echo " <tr class='height_35px'> " ;
2019-01-30 16:18:44 +01:00
// Force
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data center vertical_middle'> " ;
2019-01-30 16:18:44 +01:00
if ( ! isset ( $data [ '_is_tag_' ]) && check_acl ( $config [ 'id_user' ], $data [ '_id_' ], 'AW' )) {
2021-03-11 15:40:23 +01:00
echo '<a href="index.php?sec=estado&sec2=operation/agentes/group_view&update_netgroup=' . $data [ '_id_' ] . '">' . html_print_image (
'images/target.png' ,
true ,
[
'border' => '0' ,
'title' => __ ( 'Force' ),
'class' => 'invert_filter' ,
]
) . '</a>' ;
2019-01-30 16:18:44 +01:00
}
echo '</td>' ;
$prefix = '' ;
if ( ! isset ( $data [ '_is_tag_' ])) {
if ( $data [ '_id_' ] != 0 ) {
$prefix = ' ' ;
}
}
// Groupname and Tags
echo '<td>' ;
if ( isset ( $data [ '_is_tag_' ])) {
$deep = '' ;
$link = " <a href='index.php?sec=monitoring&sec2=operation/tree&tag_id= " . $data [ '_id_' ] . " '> " ;
} else {
$deep = groups_get_group_deep ( $data [ '_id_' ]);
$link = " <a href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id= " . $data [ '_id_' ] . " '> " ;
}
2021-03-11 15:40:23 +01:00
$group_name = '<b><span>' . ui_print_truncate_text ( $data [ '_name_' ], 50 ) . '</span></b>' ;
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-01-30 16:18:44 +01:00
$item_icon = '' ;
if ( isset ( $data [ '_iconImg_' ]) && ! empty ( $data [ '_iconImg_' ])) {
$item_icon = $data [ '_iconImg_' ];
}
if ( $data [ '_name_' ] != 'All' ) {
echo $deep . $link . $group_name . '</a>' ;
} else {
$hint = '' ;
if ( enterprise_hook ( 'agents_is_using_secondary_groups' )) {
$hint = ui_print_help_tip ( __ ( 'This %s installation are using the secondary groups feature. For this reason, an agent can be counted several times.' , get_product_name ()));
}
echo $link . $group_name . '</a>' . $hint ;
}
if ( isset ( $data [ '_is_tag_' ])) {
echo '<a>' . html_print_image ( 'images/tag.png' , true , [ 'border' => '0' , 'style' => 'width:18px;margin-left:5px' , 'title' => __ ( 'Tag' )]) . '</a>' ;
}
echo '</td>' ;
// Total agents
2021-03-11 15:40:23 +01:00
echo " <td align='center' class=' $color_class bolder font_18pt'> " ;
2019-01-30 16:18:44 +01:00
if ( isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data[' _id_ ']."' > " ;
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder font_18px center'
2018-10-11 13:07:59 +02:00
href = 'index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data[' _id_ ']."' > " ;
2019-01-30 16:18:44 +01:00
}
if ( $data [ '_id_' ] == 0 ) {
echo $link . $total_agentes . '</a>' ;
}
if ( $data [ '_total_agents_' ] > 0 && $data [ '_id_' ] != 0 ) {
echo $link . $data [ '_total_agents_' ] . '</a>' ;
}
echo '</td>' ;
// Agents unknown
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_unk $color_class bolder font_18px center'> " ;
2019-01-30 16:18:44 +01:00
if ( isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder font_18px center'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_UNKNOWN."' > " ;
} else {
2021-03-12 11:55:54 +01:00
$link = " <a class='group_view_data $color_class bolder font_18px center'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_UNKNOWN."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $agents_unknown != 0 )) {
echo $link . $agents_unknown . '</a>' ;
}
if ( $data [ '_agents_unknown_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_agents_unknown_' ] . '</a>' ;
}
echo '</td>' ;
// Agents not init
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_unk $color_class bolder font_18px center'> " ;
2019-01-30 16:18:44 +01:00
if ( isset ( $data [ '_is_tag_' ])) {
2021-03-12 11:55:54 +01:00
$link = " <a class='group_view_data $color_class bolder font_18px center'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_NOT_INIT."' > " ;
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder font_18px center'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_NOT_INIT."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $agents_notinit != 0 )) {
echo $link . $agents_notinit . '</a>' ;
}
if ( $data [ '_agents_not_init_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_agents_not_init_' ] . '</a>' ;
}
echo '</td>' ;
// Agents Normal
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_unk $color_class bolder font_18px center'> " ;
2019-01-30 16:18:44 +01:00
if ( isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder font_18px center'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_NORMAL."' > " ;
} else {
2021-03-12 11:55:54 +01:00
$link = " <a class='group_view_data $color_class bolder font_18px center'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_NORMAL."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $agents_ok != 0 )) {
echo $link . $agents_ok . '</a>' ;
}
if ( $data [ '_agents_ok_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_agents_ok_' ] . '</a>' ;
}
echo '</td>' ;
// Agents warning
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_unk $color_class bolder font_18px center'> " ;
2019-01-30 16:18:44 +01:00
if ( isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_WARNING."' > " ;
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_WARNING."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $agents_warning != 0 )) {
echo $link . $agents_warning . '</a>' ;
}
if ( $data [ '_agents_warning_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_agents_warning_' ] . '</a>' ;
}
echo '</td>' ;
// Agents critical
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_unk $color_class bolder center font_18px'> " ;
2019-01-30 16:18:44 +01:00
if ( isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_CRITICAL."' > " ;
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data[' _id_ '].' & status = '.AGENT_STATUS_CRITICAL."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $agents_critical != 0 )) {
echo $link . $agents_critical . '</a>' ;
}
if ( $data [ '_agents_critical_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_agents_critical_' ] . '</a>' ;
}
echo '</td>' ;
// Monitors unknown
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_unk $color_class bolder font_18px center'> " ;
2019-01-30 16:18:44 +01:00
if ( ! isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_UNKNOWN."' > " ;
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_UNKNOWN."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $monitor_unknown != 0 )) {
echo $link . $monitor_unknown . '</a>' ;
}
if ( $data [ '_monitors_unknown_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_monitors_unknown_' ] . '</a>' ;
}
echo '</td>' ;
// Monitors not init
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_unk $color_class bolder font_18px center'> " ;
2019-01-30 16:18:44 +01:00
if ( ! isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_NOT_INIT."' > " ;
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_NOT_INIT."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $monitor_not_init != 0 )) {
echo $link . $monitor_not_init . '</a>' ;
}
if ( $data [ '_monitors_not_init_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_monitors_not_init_' ] . '</a>' ;
}
echo '</td>' ;
// Monitors OK
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_ok $color_class bolder center font_18px'> " ;
2019-01-30 16:18:44 +01:00
if ( ! isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_NORMAL."' > " ;
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_NORMAL."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $monitor_ok != 0 )) {
echo $link . $monitor_ok . '</a>' ;
}
if ( $data [ '_monitors_ok_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_monitors_ok_' ] . '</a>' ;
}
echo '</td>' ;
// Monitors Warning
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_warn $color_class bolder center font_18px'> " ;
2019-01-30 16:18:44 +01:00
if ( ! isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data group_view_data_warn $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_WARNING."' > " ;
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data group_view_data_warn $color_class bolder center font_18px'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_WARNING."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $monitor_warning != 0 )) {
echo $link . $monitor_warning . '</a>' ;
}
if ( $data [ '_monitors_warning_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_monitors_warning_' ] . '</a>' ;
}
echo '</td>' ;
// Monitors Critical
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_crit $color_class bolder center font_18px'> " ;
2019-01-30 16:18:44 +01:00
if ( ! isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class font_18px bolder center'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_CRITICAL_BAD."' > " ;
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class font_18px bolder center'
2019-01-30 16:18:44 +01:00
href = 'index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data[' _id_ '].' & status = '.AGENT_MODULE_STATUS_CRITICAL_BAD."' > " ;
}
if (( $data [ '_id_' ] == 0 ) && ( $monitor_critical != 0 )) {
echo $link . $monitor_critical . '</a>' ;
}
if ( $data [ '_monitors_critical_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_monitors_critical_' ] . '</a>' ;
}
echo '</td>' ;
// Alerts fired
2021-03-11 15:40:23 +01:00
echo " <td class='group_view_data group_view_data_alrm $color_class bolder center font_18px's> " ;
2019-01-30 16:18:44 +01:00
if ( ! isset ( $data [ '_is_tag_' ])) {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px's
2015-01-15 18:08:58 +01:00
href = 'index.php?sec=estado&sec2=operation/agentes/alerts_status&ag_group=".$data[' _id_ ']."&filter=fired' > " ;
2019-01-30 16:18:44 +01:00
} else {
2021-03-11 15:40:23 +01:00
$link = " <a class='group_view_data $color_class bolder center font_18px'
2015-01-15 18:08:58 +01:00
href = 'index.php?sec=estado&sec2=operation/agentes/alerts_status&tag_filter=".$data[' _id_ ']."&filter=fired' > " ;
2019-01-30 16:18:44 +01:00
}
if (( $data [ '_id_' ] == 0 ) && ( $all_alerts_fired != 0 )) {
echo $link . $all_alerts_fired . '</a>' ;
}
if ( $data [ '_monitors_alerts_fired_' ] > 0 && ( $data [ '_id_' ] != 0 )) {
echo $link . $data [ '_monitors_alerts_fired_' ] . '</a>' ;
}
echo '</td>' ;
echo '</tr>' ;
}
echo '</table>' ;
2015-01-15 18:08:58 +01:00
} else {
2019-01-30 16:18:44 +01:00
ui_print_info_message ( __ ( 'There are no defined agents' ));
2010-05-13 20:29:46 +02:00
}