2006-07-19 20:29:12 +02:00
|
|
|
<?php
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2008-07-25 20:37:32 +02:00
|
|
|
// Pandora FMS - the Flexible Monitoring System
|
|
|
|
// ============================================
|
2008-08-22 20:07:32 +02:00
|
|
|
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
|
2008-04-01 15:53:11 +02:00
|
|
|
// Please see http://pandora.sourceforge.net for full contribution list
|
2006-07-19 20:29:12 +02:00
|
|
|
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2008-04-01 15:53:11 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2006-07-19 20:29:12 +02:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2006-07-19 20:29:12 +02:00
|
|
|
// Load global vars
|
2008-11-14 16:37:32 +01:00
|
|
|
require_once ("include/config.php");
|
|
|
|
require_once ("include/functions_events.php"); //Event processing functions
|
2006-07-19 20:29:12 +02:00
|
|
|
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
check_login ();
|
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
if (! give_acl ($config["id_user"], 0, "IR")) {
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
audit_db ($config["id_user"], $REMOTE_ADDR, "ACL Violation",
|
|
|
|
"Trying to access event viewer");
|
|
|
|
require ("general/noaccess.php");
|
2008-11-14 16:37:32 +01:00
|
|
|
exit;
|
2007-02-05 18:45:14 +01:00
|
|
|
}
|
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
$delete = get_parameter ("delete");
|
|
|
|
$validate = get_parameter ("validate");
|
|
|
|
//Process deletion (pass array or single value)
|
|
|
|
if (!empty ($delete)) {
|
|
|
|
$eventid = (array) get_parameter ("eventid", -1);
|
|
|
|
$return = delete_event ($eventid); //This function handles both single values as well arrays and cleans up before deleting
|
|
|
|
print_error_message ($return, __('Events successfully deleted'), __('There was an error deleting events'));
|
2007-02-05 18:45:14 +01:00
|
|
|
}
|
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
//Process validation (pass array or single value)
|
|
|
|
if (!empty ($validate)) {
|
|
|
|
$eventid = (array) get_parameter ("eventid", -1);
|
|
|
|
$return = process_event_validate ($eventid);
|
|
|
|
print_error_message ($return, __('Events successfully validated'), __('There was an error validating events'));
|
2007-02-05 18:45:14 +01:00
|
|
|
}
|
2006-12-03 03:07:36 +01:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
|
2007-02-05 18:45:14 +01:00
|
|
|
// ***********************************************************************
|
|
|
|
// Main code form / page
|
|
|
|
// ***********************************************************************
|
2006-12-03 03:07:36 +01:00
|
|
|
|
2008-09-03 17:47:09 +02:00
|
|
|
$offset = (int) get_parameter ( "offset",0);
|
2008-10-20 19:25:37 +02:00
|
|
|
$ev_group = (int) get_parameter ("ev_group", 1); //1 = all
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$search = get_parameter ("search", ""); // free search
|
2008-06-19 02:24:05 +02:00
|
|
|
$event_type = get_parameter ("event_type", ''); // 0 all
|
2008-09-03 17:47:09 +02:00
|
|
|
$severity = (int) get_parameter ("severity", -1); // -1 all
|
|
|
|
$status = (int) get_parameter ("status", 0); // -1 all, 0 only red, 1 only green
|
2008-10-20 19:25:37 +02:00
|
|
|
$id_agent = (int) get_parameter ("id_agent", -1); //-1 all, 0 system
|
2008-09-03 17:47:09 +02:00
|
|
|
$id_event = (int) get_parameter ("id_event", -1);
|
2008-09-25 15:15:15 +02:00
|
|
|
$pagination = (int) get_parameter ("pagination", $config["block_size"]);
|
2008-11-14 16:37:32 +01:00
|
|
|
$groups = get_user_groups ($config["id_user"], "IR");
|
2008-10-20 19:25:37 +02:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
//Group selection
|
2008-10-20 19:25:37 +02:00
|
|
|
if ($ev_group > 1 && in_array ($ev_group, array_keys ($groups))) {
|
|
|
|
//If a group is selected and it's in the groups allowed
|
|
|
|
$sql_post = " AND id_grupo = $ev_group";
|
|
|
|
} elseif (dame_admin ($config["id_user"])) {
|
|
|
|
//Do nothing if you're admin, you get full access
|
|
|
|
$sql_post = "";
|
|
|
|
$groups[0] = __('System Events');
|
|
|
|
} else {
|
|
|
|
//Otherwise select all groups the user has rights to.
|
|
|
|
$sql_post = " AND id_grupo IN (".implode (",", array_keys ($groups)).")";
|
|
|
|
}
|
2007-02-05 18:45:14 +01:00
|
|
|
|
2008-10-20 19:25:37 +02:00
|
|
|
if ($status == 1) {
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
$sql_post .= " AND estado = 1";
|
2008-10-20 19:25:37 +02:00
|
|
|
} elseif ($status == 0) {
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
$sql_post .= " AND estado = 0";
|
2008-10-20 19:25:37 +02:00
|
|
|
}
|
|
|
|
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
if ($search != "")
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
$sql_post .= " AND evento LIKE '%$search%'";
|
2008-06-19 02:24:05 +02:00
|
|
|
if ($event_type != "")
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
$sql_post .= " AND event_type = '$event_type'";
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
if ($severity != -1)
|
2008-09-03 17:47:09 +02:00
|
|
|
$sql_post .= " AND criticity >= ".$severity;
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
if ($id_agent != -1)
|
2008-09-03 17:47:09 +02:00
|
|
|
$sql_post .= " AND id_agente = ".$id_agent;
|
|
|
|
if ($id_event != -1)
|
|
|
|
$sql_post .= " AND id_evento = ".$id_event;
|
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
$url = "index.php?sec=eventos&sec2=operation/events/events&search=$search&event_type=$event_type&severity=$severity&status=$status&ev_group=$ev_group&refr=60&id_agent=$id_agent&id_event=$id_event&pagination=$pagination";
|
2007-09-27 17:12:49 +02:00
|
|
|
|
2008-08-12 Esteban Sanchez <estebans@artica.es>
* pandoradb_data.sql: Added default languages.
* include/streams.php, include/gettext.php: Added to repository. New
files to add gettext support of mo files.
* include/functions_db.php: Function lang_string() functionallity
changed to use gettext library.
* include/languages/language_es_es.php,
include/languages/language_gl.php, include/languages/language_en.php,
include/languages/language_pt_br.php,
include/languages/language_it.php,
include/languages/language_ast_es.php,
include/languages/language_es_la.php,
include/languages/language_de.php, include/languages/language_fr.php,
include/languages/language_ca.php: Files deleted, they are
deprecated since we have moved to gettext.
* lude/languages/pt_br.mo, include/languages/es.mo,
include/languages/fr.po, include/languages/it.po,
include/languages/ca.po, include/languages/ast.po,
include/languages/de.po, include/languages/gl.mo: Gettext translations
of the previous languages we have in language_*.php files.
* include/languages/Makefile: Added to repository to generate
index.pot and mo files of each translation.
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/config_process.php,
include/functions.php, include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/sla_view.php, operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, general/logoff.php,
general/pandora_help.php, general/footer.php, general/noaccess.php,
general/logon_failed.php, general/links_menu.php,
general/login_page.php, general/logon_ok.php, general/header.php,
general/main_menu.php, godmode/groups/configure_group.php,
godmode/groups/group_list.php, godmode/setup/news.php,
godmode/setup/links.php, godmode/setup/setup.php,
godmode/users/user_list.php, godmode/users/configure_user.php,
godmode/profiles/profile_list.php, godmode/admin_access_logs.php,
godmode/db/db_info_data.php, godmode/db/db_main.php,
godmode/db/db_audit.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced string parameters of __() callings to
plain english. Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
|
|
|
echo "<h2>".__('Events')." > ".__('Main event view'). " ";
|
2007-09-27 17:12:49 +02:00
|
|
|
|
2008-10-20 19:25:37 +02:00
|
|
|
if ($config["pure"] == 1) {
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
echo "<a target='_top' href='$url&pure=0'><img src='images/monitor.png' title='".__('Normal screen')."'></a>";
|
2008-10-20 19:25:37 +02:00
|
|
|
} else {
|
2008-07-25 20:37:32 +02:00
|
|
|
// Fullscreen
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
echo "<a target='_top' href='$url&pure=1'><img src='images/monitor.png' title='".__('Full screen')."'></a>";
|
2008-07-25 20:37:32 +02:00
|
|
|
}
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
echo "</h2>";
|
2008-11-14 16:37:32 +01:00
|
|
|
echo '<a href="#" id="tgl_event_control"><b>'.__('Event control filter').'</b> '.'<img src="images/wand.png" /></a>';
|
2007-02-05 18:45:14 +01:00
|
|
|
|
2008-08-29 18:05:08 +02:00
|
|
|
if ($config["pure"] == 1) {
|
2008-11-14 16:37:32 +01:00
|
|
|
echo '<div id="event_control" style="display:none">';
|
2008-08-29 18:05:08 +02:00
|
|
|
} else {
|
2008-11-14 16:37:32 +01:00
|
|
|
echo '<div id="event_control" style="display:block">'; //There is no value all to property display
|
2008-08-29 18:05:08 +02:00
|
|
|
}
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
// Table for filter controls
|
2008-11-14 16:37:32 +01:00
|
|
|
echo '<form method="post" action="index.php?sec=eventos&sec2=operation/events/events&refr=60&pure='.$config["pure"].'">';
|
|
|
|
echo '<table style="width:500px; float:left;" cellpadding="4" cellspacing="4" class="databox"><tr>';
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
|
|
|
|
// Group combo
|
2008-11-14 16:37:32 +01:00
|
|
|
echo "<td>".__('Group')."</td><td>";
|
2008-10-20 19:25:37 +02:00
|
|
|
print_select ($groups, 'ev_group', $ev_group, 'javascript:this.form.submit();', '', 0, false, false, false, 'w130');
|
|
|
|
echo "</td>";
|
2007-06-07 16:45:33 +02:00
|
|
|
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
// Event type
|
2008-11-14 16:37:32 +01:00
|
|
|
echo "<td>".__('Event type')."</td><td>";
|
2008-10-20 19:25:37 +02:00
|
|
|
print_select (get_event_types (), 'event_type', $event_type, '', __('All'), '');
|
2008-08-29 18:05:08 +02:00
|
|
|
echo "</td></tr><tr>";
|
2007-02-05 18:45:14 +01:00
|
|
|
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
// Severity
|
2008-11-14 16:37:32 +01:00
|
|
|
echo "<td>".__('Severity')."</td><td>";
|
2008-10-20 19:25:37 +02:00
|
|
|
print_select (get_priorities (), "severity", $severity, '', __('All'), '-1');
|
2008-11-14 16:37:32 +01:00
|
|
|
echo '</td>';
|
2007-06-21 20:58:35 +02:00
|
|
|
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
// Status
|
2008-11-14 16:37:32 +01:00
|
|
|
echo "<td>".__('Event status')."</td><td>";
|
2008-10-20 19:25:37 +02:00
|
|
|
$fields = array ();
|
|
|
|
$fields[-1] = __('All event');
|
|
|
|
$fields[1] = __('Only validated');
|
|
|
|
$fields[0] = __('Only pending');
|
|
|
|
|
2008-08-29 18:05:08 +02:00
|
|
|
print_select ($fields, 'status', $status, 'javascript:this.form.submit();', '', '');
|
2008-11-14 16:37:32 +01:00
|
|
|
|
|
|
|
//NEW LINE
|
2008-08-29 18:05:08 +02:00
|
|
|
echo "</td></tr><tr>";
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
|
|
|
|
// Free search
|
2008-08-29 18:05:08 +02:00
|
|
|
echo "<td>".__('Free search')."</td><td>";
|
|
|
|
print_input_text ('search', $search, '', 15);
|
2008-11-14 16:37:32 +01:00
|
|
|
echo '</td>';
|
2008-09-03 17:47:09 +02:00
|
|
|
|
|
|
|
//Agent search
|
2008-11-14 16:37:32 +01:00
|
|
|
echo "<td>".__('Agent search')."</td><td>";
|
2008-09-03 17:47:09 +02:00
|
|
|
$sql = "SELECT DISTINCT(id_agente) FROM tevento WHERE 1=1 ".$sql_post;
|
|
|
|
$result = get_db_all_rows_sql ($sql);
|
|
|
|
if ($result === false)
|
|
|
|
$result = array();
|
2008-10-20 19:25:37 +02:00
|
|
|
$agents = array ();
|
|
|
|
$agents[-1] = __('All');
|
|
|
|
|
|
|
|
if (dame_admin ($config["id_user"])) {
|
|
|
|
$agents[0] = __('System');
|
|
|
|
}
|
2008-09-03 17:47:09 +02:00
|
|
|
|
|
|
|
foreach ($result as $id_row) {
|
2008-10-20 19:25:37 +02:00
|
|
|
$name_for_combo = "";
|
|
|
|
if ($id_row[0] > 0)
|
|
|
|
$name_for_combo = substr (strtolower (dame_nombre_agente ($id_row[0])),0,20);
|
2008-09-25 15:15:15 +02:00
|
|
|
if ($name_for_combo != "")
|
|
|
|
$agents[$id_row[0]] = $name_for_combo;
|
2008-09-03 17:47:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
print_select ($agents, 'id_agent', $id_agent, 'javascript:this.form.submit();', '', '');
|
|
|
|
echo "</td></tr>";
|
|
|
|
|
2008-09-25 15:15:15 +02:00
|
|
|
// User selectable block size
|
|
|
|
echo '<tr><td>';
|
|
|
|
echo __('Block size for pagination');
|
|
|
|
echo '</td>';
|
2008-11-14 16:37:32 +01:00
|
|
|
$lpagination[25] = 25;
|
|
|
|
$lpagination[50] = 50;
|
|
|
|
$lpagination[100] = 100;
|
|
|
|
$lpagination[200] = 200;
|
|
|
|
$lpagination[500] = 500;
|
2008-09-25 15:15:15 +02:00
|
|
|
|
|
|
|
echo "<td>";
|
2008-11-14 16:37:32 +01:00
|
|
|
print_select ($lpagination, "pagination", $pagination, 'javascript:this.form.submit();', __('Default'), $config["block_size"]);
|
2008-09-25 15:15:15 +02:00
|
|
|
echo "</td>";
|
|
|
|
|
2008-09-03 17:47:09 +02:00
|
|
|
//The buttons
|
2008-09-25 15:15:15 +02:00
|
|
|
echo '<td colspan="2">';
|
2008-10-20 19:25:37 +02:00
|
|
|
print_submit_button (__('Update'), '', false, 'class="sub upd"');
|
2008-07-25 20:37:32 +02:00
|
|
|
|
|
|
|
// CSV
|
2008-08-29 18:05:08 +02:00
|
|
|
echo '
|
|
|
|
<a href="operation/events/export_csv.php?ev_group='.$ev_group.'&event_type='.$event_type.'&search='.$search.'&severity='.$severity.'&status='.$status.'&id_agent='.$id_agent.'">
|
2008-11-14 16:37:32 +01:00
|
|
|
<img src="images/disk.png" title="Export to CSV file" /></a>';
|
2008-07-25 20:37:32 +02:00
|
|
|
// Marquee
|
2008-11-14 16:37:32 +01:00
|
|
|
echo ' <a target="_top" href="operation/events/events_marquee.php"><img src="images/heart.png" title="'.__('Marquee display').'" /></a>';
|
2008-07-25 20:37:32 +02:00
|
|
|
// RSS
|
2008-11-14 16:37:32 +01:00
|
|
|
echo ' <a target="_top" href="operation/events/events_rss.php?ev_group='.$ev_group.'&event_type='.$event_type.'&search='.$search.'&severity='.$severity.'&status='.$status.'&id_agent='.$id_agent.'"><img src="images/transmit.png" title="'.__('RSS Events').'" /></a>';
|
2008-07-25 20:37:32 +02:00
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
echo "</td></tr></table></form>"; //This is the internal table
|
|
|
|
echo '<div style="width:250px; float:left;"><img src="reporting/fgraph.php?tipo=group_events&width=250&height=180&url='.rawurlencode ($sql_post).'" border="0"></div>';
|
|
|
|
echo '</div><div style="clear:both"> </div>';
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
$sql = "SELECT * FROM tevento WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC LIMIT ".$offset.",".$pagination;
|
2008-08-29 18:05:08 +02:00
|
|
|
$result = get_db_all_rows_sql ($sql);
|
|
|
|
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE 1=1 ".$sql_post;
|
|
|
|
$total_events = get_db_sql ($sql);
|
2007-02-05 18:45:14 +01:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
if (empty ($result)) {
|
|
|
|
$result = array ();
|
|
|
|
}
|
|
|
|
if (empty ($total_events)) {
|
|
|
|
$total_events = 0;
|
|
|
|
}
|
|
|
|
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
// Show pagination header
|
2008-11-14 16:37:32 +01:00
|
|
|
$offset = get_parameter ("offset", 0);
|
|
|
|
pagination ($total_events, $url."&pure=".$config["pure"], $offset, $pagination);
|
|
|
|
|
|
|
|
// If pure, table width takes more space
|
|
|
|
if ($config["pure"] != 0) {
|
|
|
|
$table->width = 765;
|
|
|
|
} else {
|
|
|
|
$table->width = 750;
|
|
|
|
}
|
|
|
|
|
|
|
|
$table->id = "eventtable";
|
|
|
|
$table->cellpadding = 4;
|
|
|
|
$table->cellspacing = 4;
|
|
|
|
$table->class = "databox";
|
|
|
|
$table->head = array ();
|
|
|
|
$table->data = array ();
|
|
|
|
|
|
|
|
$table->head[0] = '';
|
|
|
|
|
|
|
|
$table->head[1] = __('Type');
|
|
|
|
$table->headclass[1] = 'f9';
|
|
|
|
|
|
|
|
$table->head[2] = __('Event name');
|
|
|
|
//$table->headclass[2] = 'f9';
|
|
|
|
|
|
|
|
$table->head[3] = __('Agent name');
|
|
|
|
//$table->headclass[3] = 'f9';
|
|
|
|
|
|
|
|
$table->head[4] = __('Source');
|
|
|
|
//$table->headclass[4] = 'f9';
|
|
|
|
|
|
|
|
$table->head[5] = __('Group');
|
|
|
|
//$table->headclass[5] = 'f9';
|
|
|
|
|
|
|
|
$table->head[6] = __('User ID');
|
|
|
|
//$table->headclass[6] = 'f9';
|
|
|
|
|
|
|
|
$table->head[7] = __('Timestamp');
|
|
|
|
//$table->headclass[7] = 'f9';
|
|
|
|
|
|
|
|
$table->head[8] = __('Action');
|
|
|
|
//$table->headclass[8] = 'f9';
|
|
|
|
|
|
|
|
$table->head[9] = print_checkbox ("allbox", "1", false, true);
|
|
|
|
//$table->headclass[9] = 'p10';
|
|
|
|
|
|
|
|
//Arrange data. We already did ACL's in the query
|
|
|
|
foreach ($result as $row) {
|
|
|
|
$data = array ();
|
|
|
|
|
|
|
|
//First pass along the class of this row
|
|
|
|
switch ($row["criticity"]) {
|
|
|
|
case 0:
|
|
|
|
$table->rowclass[] = "datos_blue";
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
$table->rowclass[] = "datos_grey";
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
$table->rowclass[] = "datos_green";
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
$table->rowclass[] = "datos_yellow";
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
$table->rowclass[] = "datos_red";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
$table->rowclass[] = "datos_grey";
|
2008-08-29 18:05:08 +02:00
|
|
|
}
|
2007-02-19 08:44:07 +01:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
// Colored box
|
|
|
|
if ($row["estado"] == 0) {
|
|
|
|
$data[0] = '<img src="images/pixel_red.png" width="20" height="35" title="'.get_priority_name ($row["criticity"]).'" />';
|
|
|
|
} else {
|
|
|
|
$data[0] = '<img src="images/pixel_green.png" width="20" height="35" title="'.get_priority_name ($row["criticity"]).'" />';
|
|
|
|
}
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
|
|
|
|
switch ($row["event_type"]) {
|
|
|
|
case "alert_recovered":
|
|
|
|
$data[1] = '<img src="images/error.png" title="'.__('Alert Recovered').'" />';
|
|
|
|
break;
|
|
|
|
case "alert_manual_validation":
|
|
|
|
$data[1] = '<img src="images/eye.png" title="'.__('Manual Alert Validation').'" />';
|
|
|
|
break;
|
|
|
|
case "monitor_up":
|
|
|
|
$data[1] = '<img src="images/lightbulb.png" title="'.__('Monitor Up').'" />';
|
|
|
|
break;
|
|
|
|
case "monitor_down":
|
|
|
|
$data[1] = '<img src="images/lightbulb_off.png" title="'.__('Monitor Down').'" />';
|
|
|
|
break;
|
|
|
|
case "alert_fired":
|
|
|
|
$data[1] = '<img src="images/bell.png" title="'.__('Alert Fired').'" />';
|
|
|
|
break;
|
|
|
|
case "system";
|
|
|
|
$data[1] = '<img src="images/cog.png" title="'.__('System').'" />';
|
|
|
|
break;
|
|
|
|
case "recon_host_detected";
|
|
|
|
$data[1] = '<img src="images/network.png" title="'.__('Host Detected (Recon)').'" />';
|
|
|
|
break;
|
|
|
|
case "new_agent";
|
|
|
|
$data[1] = '<img src="images/wand.png" title="'.__('New Agent').'" />';
|
|
|
|
break;
|
|
|
|
case "unknown":
|
|
|
|
default:
|
|
|
|
$data[1] = '<img src="images/err.png" title="'.__('Unknown type').': '.$row["event_type"].'" />';
|
2008-06-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
break;
|
2008-11-14 16:37:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Event description
|
|
|
|
$data[2] = '<span title="'.$row["evento"].'" class="f9">';
|
|
|
|
if (strlen ($row["evento"]) > 39) {
|
|
|
|
$data[2] .= substr ($row["evento"], 0, 37)."...";
|
|
|
|
} else {
|
|
|
|
$data[2] .= $row["evento"];
|
|
|
|
}
|
|
|
|
$data[2] .= '</span>';
|
|
|
|
|
|
|
|
if ($row["event_type"] == "system") {
|
|
|
|
$data[3] = __('System');
|
|
|
|
} elseif ($row["id_agente"] > 0) {
|
|
|
|
// Agent name
|
|
|
|
$agent_name = dame_nombre_agente ($row["id_agente"]);
|
|
|
|
$data[3] = '<a href='.$url.'&pure='.$config["pure"].'&id_agent='.$row["id_agente"].'" title="'.$agent_name.'" class="f9"><b>';
|
|
|
|
if (strlen ($agent_name) > 16) {
|
|
|
|
$data[3] .= substr ($agent_name, 0, 14)."...";
|
2008-10-20 19:25:37 +02:00
|
|
|
} else {
|
2008-11-14 16:37:32 +01:00
|
|
|
$data[3] .= $agent_name;
|
2008-10-20 19:25:37 +02:00
|
|
|
}
|
2008-11-14 16:37:32 +01:00
|
|
|
$data[3] .= '</b></a>';
|
|
|
|
} else {
|
|
|
|
$data[3] = __('Alert').__('SNMP');
|
|
|
|
}
|
|
|
|
|
|
|
|
$data[4] = '';
|
|
|
|
if ($row["id_agentmodule"] != 0) {
|
|
|
|
$data[4] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row["id_agente"].'&tab=data"><img src="images/bricks.png" border="0" /></a> ';
|
|
|
|
}
|
|
|
|
if ($row["id_alert_am"] != 0) {
|
|
|
|
$data[4] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row["id_agente"].'&tab=alert"><img src="images/bell.png" border="0" /></a>';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty ($row["id_grupo"])) {
|
|
|
|
$data[5] = '<img src="images/groups_small/'.show_icon_group ($row["id_grupo"]).'.png" title="'.dame_nombre_grupo ($row["id_grupo"]).'" class="bot" />';
|
|
|
|
} else {
|
|
|
|
$data[5] = '';
|
|
|
|
}
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
if (!empty ($row["estado"])) {
|
|
|
|
$data[6] = '<a href="index.php?sec=usuario&sec2=operation/user/user_edit&ver='.$row["id_usuario"].'" title="'.dame_nombre_real ($row["id_usuario"]).'">'.substr ($row["id_usuario"],0,8).'</a>';
|
|
|
|
} else {
|
|
|
|
$data[6] = '';
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2007-02-05 18:45:14 +01:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
//Time
|
|
|
|
$data[7] = '<span class="f9" title="'.format_datetime ($row["timestamp"]).'">'.human_time_comparation ($row["timestamp"]).'</span>';
|
|
|
|
|
|
|
|
//Actions
|
|
|
|
$data[8] = '';
|
|
|
|
// Validate event
|
|
|
|
if (($row["estado"] == 0) and (give_acl ($config["id_user"], $row["id_grupo"], "IW") == 1)) {
|
|
|
|
$data[8] .= '<a href="'.$url.'&validate=1&eventid='.$row["id_evento"].'&pure='.$config["pure"].'"><img src="images/ok.png" border="0" /></a>';
|
|
|
|
}
|
|
|
|
// Delete event
|
|
|
|
if (give_acl ($config["id_user"], $row["id_grupo"], "IM") == 1) {
|
|
|
|
$data[8] .= '<a href="'.$url.'&delete=1&eventid='.$row["id_evento"].'&pure='.$config["pure"].'"><img src="images/cross.png" border="0" /></a>';
|
|
|
|
}
|
|
|
|
// Create incident from this event
|
|
|
|
if (give_acl ($config["id_user"], $row["id_grupo"], "IW") == 1) {
|
|
|
|
$data[8] .= '<a href="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&insert_form&from_event='.$row["id_evento"].'"><img src="images/page_lightning.png" border="0" /></a>';
|
|
|
|
}
|
|
|
|
|
|
|
|
//Checkbox
|
|
|
|
$data[9] = print_checkbox_extended ("eventid[]", $row["id_evento"], false, false, false, 'class="chk"', true);
|
|
|
|
|
|
|
|
array_push ($table->data, $data);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty ($table->data)) {
|
|
|
|
echo '<form method="post" action="'.$url.'&pure='.$config["pure"].'">';
|
|
|
|
print_table ($table);
|
|
|
|
echo '<div style="width:750px; text-align:right">';
|
|
|
|
if (give_acl ($config["id_user"], 0, "IW") == 1) {
|
|
|
|
print_submit_button (__('Validate'), 'validate', false, 'class="sub ok"');
|
|
|
|
}
|
2008-10-20 19:25:37 +02:00
|
|
|
if (give_acl ($config["id_user"], 0,"IM") == 1) {
|
2008-11-14 16:37:32 +01:00
|
|
|
print_submit_button (__('Delete'), 'delete', false, 'class="sub delete"');
|
2007-02-19 08:44:07 +01:00
|
|
|
}
|
2008-11-14 16:37:32 +01:00
|
|
|
echo '</div></form>';
|
|
|
|
} else {
|
|
|
|
echo '<div class="error">'.__('No events').'</div>';
|
|
|
|
}
|
|
|
|
unset ($table);
|
|
|
|
|
|
|
|
echo '<div style="padding-left:30px; width:150px; float:left; line-height:17px;">';
|
|
|
|
echo '<h3>'.__('Status').'</h3>';
|
|
|
|
echo '<img src="images/dot_green.png" /> - '.__('Validated event');
|
|
|
|
echo '<br />';
|
|
|
|
echo '<img src="images/dot_red.png" /> - '.__('Not validated event');
|
|
|
|
|
|
|
|
echo '</div><div style="padding-left:30px; width:150px; float:left; line-height:17px;">';
|
|
|
|
echo '<h3>'.__('Action').'</h3>';
|
|
|
|
echo '<img src="images/ok.png" /> - '.__('Validate event');
|
|
|
|
echo '<br />';
|
|
|
|
echo '<img src="images/cross.png" /> - '.__('Delete event');
|
|
|
|
echo '<br />';
|
|
|
|
echo '<img src="images/page_lightning.png" /> - '.__('Create incident');
|
|
|
|
echo '</div><div style="clear:both;"> </div>';
|
2007-09-27 17:12:49 +02:00
|
|
|
?>
|
2008-11-14 16:37:32 +01:00
|
|
|
<script type="text/javascript" src="include/javascript/jquery.js"></script>
|
|
|
|
<script language="JavaScript" type="text/javascript">
|
|
|
|
$(document).ready( function() {
|
|
|
|
$("INPUT[name='allbox']").click( function() {
|
|
|
|
$("INPUT[name='eventid[]']").each( function() {
|
|
|
|
$(this).attr('checked', !$(this).attr('checked'));
|
|
|
|
});
|
|
|
|
return !(this).attr('checked');
|
|
|
|
});
|
|
|
|
$("#tgl_event_control").click( function () {
|
|
|
|
$("#event_control").slideToggle ("slow");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|