2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
2008-08-22 20:07:32 +02:00
|
|
|
|
|
|
|
// Pandora FMS - the Flexible Monitoring System
|
|
|
|
// ============================================
|
|
|
|
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
|
2008-04-03 17:43:34 +02:00
|
|
|
// Please see http://pandora.sourceforge.net for full contribution list
|
|
|
|
|
2006-07-09 16:20:10 +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-03 17:43:34 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2006-07-09 16:20:10 +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
|
|
|
|
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
|
|
|
check_login ();
|
2007-04-19 20:50:07 +02:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
require_once ("include/functions_agents.php");
|
|
|
|
|
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
|
|
|
$filter = get_parameter ("filter", "all");
|
2009-01-05 19:41:14 +01:00
|
|
|
$offset = (int) get_parameter_get ("offset", 0);
|
|
|
|
$id_group = (int) get_parameter ("ag_group", 1); //1 is the All group (selects all groups)
|
2007-04-19 20:50:07 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$sec2 = get_parameter_get ('sec2');
|
|
|
|
$sec2 = safe_url_extraclean ($sec2);
|
|
|
|
|
|
|
|
$sec = get_parameter_get ('sec');
|
|
|
|
$sec = safe_url_extraclean ($sec);
|
|
|
|
|
|
|
|
$url = 'index.php?sec='.$sec.'&sec2='.$sec2.'&refr='.$config["refr"].'&filter='.$filter.'&ag_group='.$id_group;
|
2007-10-03 14:41:29 +02:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
// Force alert execution
|
|
|
|
$flag_alert = (bool) get_parameter ('force_execution');
|
2009-03-27 13:03:41 +01:00
|
|
|
$alert_validate = (bool) get_parameter ('alert_validate');
|
|
|
|
|
|
|
|
if ($flag_alert == 1 && give_acl ($config['id_user'], $id_group, "AW")) {
|
2009-01-15 11:21:38 +01:00
|
|
|
require_once ("include/functions_alerts.php");
|
|
|
|
$id_alert = (int) get_parameter ('id_alert');
|
|
|
|
set_alerts_agent_module_force_execution ($id_alert);
|
|
|
|
}
|
2007-05-28 21:15:44 +02:00
|
|
|
|
2009-03-27 13:03:41 +01:00
|
|
|
if ($alert_validate) {
|
|
|
|
$ids = (array) get_parameter_post ("validate", array ());
|
|
|
|
$compound_ids = (array) get_parameter_post ("validate_compound", array ());
|
|
|
|
|
|
|
|
if (! empty ($ids) || ! empty ($compound_ids)) {
|
|
|
|
require_once ("include/functions_alerts.php");
|
|
|
|
$result1 = validate_alert_agent_module ($ids);
|
|
|
|
$result2 = validate_alert_compound ($compound_ids);
|
|
|
|
$result == $result1 || $result2;
|
|
|
|
|
|
|
|
print_result_message ($result,
|
|
|
|
__('Alert(s) validated'),
|
|
|
|
__('Error processing alert(s)'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
// Show alerts for specific agent
|
|
|
|
if (isset ($_GET["id_agente"])) {
|
|
|
|
$id_agent = (int) get_parameter_get ("id_agente", 0);
|
|
|
|
$url = $url.'&id_agente='.$id_agent;
|
|
|
|
|
|
|
|
$id_group = get_group_agents ($id_agent);
|
|
|
|
|
|
|
|
if (give_acl ($config["id_user"], $id_group, "AR") == 0) {
|
|
|
|
audit_db ($config["id_user"], $config["remote_addr"], "ACL Violation","Trying to access alert view");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
exit;
|
2007-05-28 21:15:44 +02:00
|
|
|
}
|
2007-10-03 14:41:29 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$alerts_simple = get_agent_alerts_simple ($id_agent, $filter);
|
2009-02-11 17:55:04 +01:00
|
|
|
$alerts_combined = get_agent_alerts_compound ($id_agent, $filter);
|
2009-01-15 11:21:38 +01:00
|
|
|
$print_agent = false;
|
2009-01-05 19:41:14 +01:00
|
|
|
} else {
|
2009-04-02 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Final DB changes proposed for closing this month the DB
scheme. tagente-> new server_name field to assign server (old fields will
be removed). talert_templates has two new types (warning, critical).
tevento has "user_comment" new field. Tserver has three new fields,
server_type (so some old fields will be deleted), threads and queued_modules
this last two are for statistical options. Tusuario add language type to
override global language.
* update_manager/main.php: Minor changes for correct ACL usage. Non PM
users could see in what revision it the system, but only that.
* pandoradb_migrate_v2.x_to_v3.0.sql: Updated script for new DB changes.
* general/noaccess.php: Added footer and ending div. Page was very ugly
when showing noaccess errors, nobody see it ???.
* godmode/menu.php: A LOT of ACL fixes on several options.
* godmode/agentes/agent_manager.php: Fixed a crazy floating icon.
* godmode/agentes/manage_config_remote.php: A LOT of changes, rewriting
stuff, because was not working. This also adds a lot of ACL checks.
* godmode/agentes/massive_config.php, massive*: ACL changes.
* godmode/agentes/modificar_agente.php: Fixed ACL problems.
* godmode/agentes/module_manager_editor.php: Fixed bad module categories for
some types (data, plugin and prediction).
* godmode/alerts/alert_list.php: Fixed ACL problem.
* godmode/reporting/graph_builder.php: Added ACl restriction for
non-viewable agents for current user. Seems to be a problem with data
with more than 2 sources.
* godmode/reporting/map_builder.php: ACL checks improved.
* godmode/reporting/reporting_builder.php: ACL checks added (was missing),
some code ported from 2.1, other is new. New fields shown in list.
* include/functions.php: Fixed the annoying bug of "bad counters" in
function human_time_description_raw(). Function used,format_numeric() should
not be used never to calculate nothing, only to print formatted strings.
* include/functions_db.php: Added function user_access_to_agent() to know
if a given user has access to a given agent.
* include/functioins_report.php: get_report() should let admin to watch any
report. Fixed.
* agentes/alerts_status.php: Fixed ACL problem for view alert.
* operation/incidents/incident.php: Bad call for pagination() was giving
problems to pagination call. Somebody changes pagination() interface and
make this broken. Please if you change any interface, be sure that is compatible
with old code or make a post in the list about this !
* godmode/users/user_edit.php: Additional ACL check to do not let anybody
to watch non accesible users. Even for see the username or description.
* reporting/pchart_graph.php:Progress bar shown text in white when > 60%.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1594 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-02 21:16:59 +02:00
|
|
|
if (!give_acl ($config["id_user"], 0, "AR")) {
|
2009-01-05 19:41:14 +01:00
|
|
|
audit_db ($config["id_user"], $config["remote_addr"], "ACL Violation","Trying to access alert view");
|
|
|
|
require ("general/noaccess.php");
|
2009-02-11 17:55:04 +01:00
|
|
|
return;
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
2007-05-28 21:15:44 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$alerts_simple = array ();
|
|
|
|
$alerts_combined = array ();
|
2007-05-28 21:15:44 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$agents = array_keys (get_group_agents ($id_group));
|
2008-09-16 20:16:09 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
foreach ($agents as $id_agent) {
|
|
|
|
$simple = get_agent_alerts_simple ($id_agent, $filter);
|
2009-02-11 17:55:04 +01:00
|
|
|
$combined = get_agent_alerts_compound ($id_agent, $filter);
|
2009-01-05 19:41:14 +01:00
|
|
|
|
|
|
|
$alerts_simple = array_merge ($alerts_simple, $simple);
|
|
|
|
$alerts_combined = array_merge ($alerts_combined, $combined);
|
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
|
|
|
}
|
2008-09-16 20:16:09 +02:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$print_agent = true;
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
2007-04-19 20:50:07 +02:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
$tab = get_parameter_get ("tab");
|
|
|
|
if ($tab != '') {
|
|
|
|
$url = $url.'&tab='.$tab;
|
|
|
|
}
|
2007-04-19 20:50:07 +02:00
|
|
|
|
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
|
|
|
echo "<h2>".__('Pandora Agents')." » ".__('Alerts').'</h2>';
|
2009-01-15 11:21:38 +01:00
|
|
|
|
|
|
|
echo '<form method="post" action="'.$url.'">';
|
2007-06-12 13:57:03 +02:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
if ($print_agent) {
|
|
|
|
$table->width = '90%';
|
|
|
|
$table->data = array ();
|
|
|
|
$table->style = array ();
|
2009-01-05 19:41:14 +01:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->data[0][0] = __('Group');
|
|
|
|
$table->data[0][1] = print_select (get_user_groups (), "ag_group", $id_group,
|
|
|
|
'javascript:this.form.submit();', '', '', true);
|
|
|
|
|
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
|
|
|
$alert_status_filter = array();
|
|
|
|
$alert_status_filter['all'] = __('All');
|
|
|
|
$alert_status_filter['fired'] = __('Fired');
|
|
|
|
$alert_status_filter['notfired'] = __('Not fired');
|
|
|
|
$alert_status_filter['disabled'] = __('Disabled');
|
2009-01-15 11:21:38 +01:00
|
|
|
|
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
|
|
|
$table->data[0][2] = __('Status');
|
|
|
|
$table->data[0][3] = print_select ($alert_status_filter, "filter", $filter, 'javascript:this.form.submit();', '', '', true);
|
2009-01-15 11:21:38 +01:00
|
|
|
print_table ($table);
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
|
|
|
echo '</form>';
|
2009-01-05 19:41:14 +01:00
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->width = '90%';
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->class = "databox";
|
2009-03-27 13:03:41 +01:00
|
|
|
$table->size = array ();
|
|
|
|
$table->size[0] = '20px';
|
|
|
|
$table->size[1] = '25%';
|
|
|
|
$table->size[2] = '50%';
|
|
|
|
$table->size[3] = '25%';
|
|
|
|
$table->size[4] = '20px';
|
|
|
|
$table->size[5] = '20px';
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->head = array ();
|
2009-01-08 12:53:14 +01:00
|
|
|
$table->head[0] = '';
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->head[1] = ''; //Placeholder for name
|
|
|
|
$table->head[2] = __('Template');
|
|
|
|
$table->head[3] = __('Last fired');
|
|
|
|
$table->head[4] = __('Status');
|
2009-03-24 Esteban Sanchez <estebans@artica.es>
* general/pandora_help.php: Added support for enterprise help files.
* include/javascript/pandora.js: Renamed pandora_help() to
open_help().
* include/functions_ui.php: Renamed event function on
print_help_icon(). Removed deprecated pandora_help().
* godmode/agentes/module_manager.php: Added enterprise hooks.
* godmode/agentes/module_manager_editor.php: Added categories
construction here. Added enterprise hooks.
* godmode/agentes/module_manager_editor_common.php: Replaced
deprecated pandora_help() with print_help_icon(). Moved categories
construction to module_manager_editor.
* include/config_process.php: Updated build version.
* include/styles/pandora.css: Fixed textarea height.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/massive_config.php,
godmode/agentes/massive_edit_modules.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/planned_downtime.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/map_builder.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask_form.php, godmode/servers/plugin.php,
godmode/setup/setup.php, operation/agentes/alerts_status.php,
operation/agentes/tactical.php,
godmode/agentes/agent_manager.php: Replaced deprecated pandora_help()
with print_help_icon().
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1557 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-24 16:38:54 +01:00
|
|
|
$table->head[5] = __('Validate').print_help_icon ('alert_validation', true);
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->title = __('Single alerts');
|
2009-01-15 11:21:38 +01:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
if ($print_agent == 0) {
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->head[1] = __('Module');
|
2009-01-05 19:41:14 +01:00
|
|
|
} else {
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->head[1] = __('Agent');
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->align = array ();
|
|
|
|
$table->align[4] = 'center';
|
|
|
|
$table->align[5] = 'center';
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->data = array ();
|
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$total = 0;
|
|
|
|
$printed = 0;
|
2009-01-05 19:41:14 +01:00
|
|
|
foreach ($alerts_simple as $alert) {
|
2009-01-15 11:21:38 +01:00
|
|
|
$total++;
|
|
|
|
if (empty ($alert) || $printed >= $config["block_size"] || $total <= $offset) {
|
2009-01-05 19:41:14 +01:00
|
|
|
continue;
|
2008-09-16 20:16:09 +02:00
|
|
|
}
|
2009-01-15 11:21:38 +01:00
|
|
|
$printed++;
|
2009-02-11 17:55:04 +01:00
|
|
|
array_push ($table->data, format_alert_row ($alert, false, $print_agent, $url));
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
|
|
|
|
2009-03-27 13:03:41 +01:00
|
|
|
echo '<form method="post" action="'.$url.'">';
|
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
if (!empty ($table->data)) {
|
2009-05-07 16:44:26 +02:00
|
|
|
pagination ($total, $url);
|
2009-01-05 19:41:14 +01:00
|
|
|
print_table ($table);
|
|
|
|
} else {
|
|
|
|
echo '<div class="nf">'.__('No simple alerts found').'</div>';
|
|
|
|
}
|
|
|
|
|
2009-02-11 17:55:04 +01:00
|
|
|
$table->title = __('Compound alerts');
|
2009-01-15 11:21:38 +01:00
|
|
|
$table->head[1] = __('Agent');
|
2009-02-11 17:55:04 +01:00
|
|
|
$table->head[2] = __('Name');
|
2009-01-05 19:41:14 +01:00
|
|
|
$table->data = array ();
|
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
$combined_total = 0;
|
|
|
|
$combined_printed = 0;
|
2009-01-05 19:41:14 +01:00
|
|
|
foreach ($alerts_combined as $alert) {
|
2009-01-15 11:21:38 +01:00
|
|
|
$combined_total++;
|
|
|
|
if (empty ($alert) || $combined_printed >= $config["block_size"] || $combined_total <= $offset) {
|
2009-01-05 19:41:14 +01:00
|
|
|
continue;
|
2008-02-21 16:16:54 +01:00
|
|
|
}
|
2009-01-15 11:21:38 +01:00
|
|
|
$combined_printed++;
|
2009-02-11 17:55:04 +01:00
|
|
|
array_push ($table->data, format_alert_row ($alert, true, $print_agent));
|
2009-01-05 19:41:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty ($table->data)) {
|
2009-01-15 11:21:38 +01:00
|
|
|
pagination ($total, $url, $offset);
|
2009-01-05 19:41:14 +01:00
|
|
|
print_table ($table);
|
|
|
|
}
|
|
|
|
|
2009-01-15 11:21:38 +01:00
|
|
|
if ($printed > 0 || $combined_total > 0) {
|
|
|
|
echo '<div class="action-buttons" style="width: '.$table->width.';">';
|
2009-01-05 19:41:14 +01:00
|
|
|
print_submit_button (__('Validate'), 'alert_validate', false, 'class="sub upd"', false);
|
|
|
|
echo '</div>';
|
|
|
|
}
|
2009-01-15 11:21:38 +01:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
echo '</form>';
|
2007-05-21 15:24:17 +02:00
|
|
|
?>
|
2009-01-15 11:21:38 +01:00
|
|
|
<link rel="stylesheet" href="include/styles/cluetip.css" type="text/css" />
|
|
|
|
<script type="text/javascript" src="include/javascript/jquery.cluetip.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready (function () {
|
|
|
|
$("a.template_details").cluetip ({
|
|
|
|
arrows: true,
|
|
|
|
attribute: 'href',
|
2009-02-11 17:55:04 +01:00
|
|
|
cluetipClass: 'default'
|
2009-01-15 11:21:38 +01:00
|
|
|
}).click (function () {
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|