pandorafms/pandora_console/godmode/setup/performance.php

98 lines
4.2 KiB
PHP
Raw Normal View History

2010-02-19 Sancho Lerena <slerena@artica.es> * functions_events.php: Fixed typo (switched meaning) in two labels. * include/styles/pandora.css: Changed background color of th default style. * include/functions_reporting.php: Improved function get_group_stats(). Now supports stats from batch-mode and get realtime stats in a more efficient way. Fixed get_fired_alerts_reporting_table() to avoid problems in external reporting (PDF & XML). * include/functions_servers.php: get_server_performance() now uses batch mode stats reporting, and improved also the realtime stats generation. Same with function get_server_info(). * include/functions_config.php: Added new config tokens (not fully implemented yet) for event, trap, strings and audit automatic purge. * include/functions_ui.php: Added new print_page_header() function to set the new standard header in all pages, using the "tabbed" format to show the title, subtitle and other options like help, or custom-tabs for the page * pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to agents_unknown. * extensions/ext_backup: New directory to place "deleted" extensions. * extensions/dbmanager/dbmanager.css: Table names now are in it's original lowercase/uppercase format. * extensions/dbmanager.php: Updated headers, and now return "empty" when a search is empty, instead "error" as before. * extensions/users_connected.php extensions/module_groups.php extensions/plugin_registration.php extensions/pandora_logs.php operation/incidents/incident.php operation/snmpconsole/snmp_view.php operation/users/user.php operation/users/user_edit.php godmode/agentes/planned_downtime.php operation/events/events.php operation/visual_console/index.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/exportdata.php operation/agentes/ver_agente.php operation/agentes/status_monitor.php operation/agentes/alerts_status.php operation/users/user_statistics.php: Added new header format. * operation/agentes/estado_grupo.php: Removed old group view. * operation/agentes/tactical.php: Adapted to use new realtime/batch statistical system. Placed events above server info. Showing only pending events and other minor changes. * operation/agentes/group_view.php: NEW screen, replacing old one. Probably most ugly, but much more useful than before. * operation/agentes/networkmap.php: Added title. * operation/messages/message.php: Added title and adding some exists in code was missing before. * operation/reporting/reporting_viewer.php: Added title. * operation/reporting/graph_viewer.php: Added title. * operation/reporting/custom_reporting.php: Added title. * operation/servers/view_server.php: * operation/menu.php: Replaced old group view with new (this has english name). Removed autorefresh "by default" in server view. * extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo. * extras/pandora_diag.php: Minor changes, removed some info and added other. * general/logon_ok.php: Minor aesthetic changes. * general/header.php: Fixed missing ";" * operation/extensions.php, godmode/extensions.php: Added support for delete extensions. * godmode/menu.php: New setup items. * godmode/setup/setup.php, godmode/setup/performance.php, godmode/setup/setup_visuals.php: Reordered setup options, new setup section "Performance", added new performance options to set "realtime" statistics or "batchmode" with it's own interval. Some setup info is now shared with the servers (but it it's any change in setup, servers should be restarted anyway). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
require_once ("include/config.php");
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;
}
// Load enterprise extensions
enterprise_include ('godmode/setup/setup.php');
/*
NOTICE FOR DEVELOPERS:
Update operation is done in config_process.php
This is done in that way so the user can see the changes inmediatly.
If you added a new token, please check update_config() in functions_config.php
to add it there.
*/
// Header
print_page_header (__('Performance configuration'), "", false, "", true);
$table->width = '90%';
$table->data = array ();
$table->data[1][0] = __('Max. days before delete events');
$table->data[1][1] = print_input_text ('event_purge', $config["event_purge"], '', 5, 5, true);
$table->data[2][0] = __('Max. days before delete traps');
$table->data[2][1] = print_input_text ('trap_purge', $config["trap_purge"], '', 5, 5, true);
$table->data[3][0] = __('Max. days before delete audit events');
$table->data[3][1] = print_input_text ('audit_purge', $config["audit_purge"], '', 5, 5, true);
$table->data[4][0] = __('Max. days before delete string data');
$table->data[4][1] = print_input_text ('string_purge', $config["string_purge"], '', 5, 5, true);
$table->data[5][0] = __('Max. days before purge');
$table->data[5][1] = print_input_text ('days_purge', $config["days_purge"], '', 5, 5, true);
$table->data[6][0] = __('Max. days before compact data');
$table->data[6][1] = print_input_text ('days_compact', $config["days_compact"], '', 5, 5, true);
$table->data[7][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
$table->data[7][1] = print_input_text ('step_compact', $config["step_compact"], '', 5, 5, true);
$table->data[8][0] = __('SLA period (seconds)');
$table->data[8][1] = print_input_text ('sla_period', $config["sla_period"], '', 8, 8, true);
$table->data[9][0] = __('Default hours for event view');
$table->data[9][1] = print_input_text ('event_view_hr', $config["event_view_hr"], '', 5, 5, true);
$table->data[10][0] = __('Compact CSS and JS into header');
$table->data[10][1] = __('Yes').'&nbsp;'.print_radio_button ('compact_header', 1, '', $config["compact_header"], true).'&nbsp;&nbsp;';
$table->data[10][1] .= __('No').'&nbsp;'.print_radio_button ('compact_header', 0, '', $config["compact_header"], true);
$table->data[11][0] = __('Use realtime statistics');
$table->data[11][1] = __('Yes').'&nbsp;'.print_radio_button ('realtimestats', 1, '', $config["realtimestats"], true).'&nbsp;&nbsp;';
$table->data[11][1] .= __('No').'&nbsp;'.print_radio_button ('realtimestats', 0, '', $config["realtimestats"], true);
$table->data[12][0] = __('Batch statistics period (secs)');
$table->data[12][1] = print_input_text ('stats_interval', $config["stats_interval"], '', 5, 5, true);
$table->data[13][0] = __('Use agent access graph'). print_help_icon("agent_access", true);
$table->data[13][1] = __('Yes').'&nbsp;'.print_radio_button ('agentaccess', 1, '', $config["agentaccess"], true).'&nbsp;&nbsp;';
$table->data[13][1] .= __('No').'&nbsp;'.print_radio_button ('agentaccess', 0, '', $config["agentaccess"], true);
echo '<form id="form_setup" method="post">';
print_input_hidden ('update_config', 1);
print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button (__('Update'), 'update_button', false, 'class="sub upd"');
echo '</div>';
echo '</form>';
?>