2007-06-07 19:46:38 +02:00
|
|
|
<?php
|
|
|
|
|
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-23 22:01:37 +02:00
|
|
|
// Please see http://pandora.sourceforge.net for full contribution list
|
|
|
|
|
|
|
|
// This program is free software; you can redistribute it and/or
|
2008-09-01 06:22:26 +02:00
|
|
|
// modify it under the terms of the GNU Lesser General Public License (LGPL)
|
2008-04-23 22:01:37 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2008-09-01 06:22:26 +02:00
|
|
|
//
|
2008-04-23 22:01:37 +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.
|
2007-06-07 19:46:38 +02:00
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
/**
|
|
|
|
* Get SLA of a module.
|
|
|
|
*
|
|
|
|
* @param id_agent_module Agent module to calculate SLA
|
|
|
|
* @param period Period to check the SLA compliance.
|
|
|
|
* @param min_value Minimum data value the module in the right interval
|
|
|
|
* @param max_value Maximum data value the module in the right interval
|
|
|
|
* @param date Beginning date of the report in UNIX time (current date by default).
|
|
|
|
*
|
|
|
|
* @return SLA percentage of the requested module.
|
|
|
|
*/
|
2008-07-02 14:30:56 +02:00
|
|
|
function get_agent_module_sla ($id_agent_module, $period, $min_value, $max_value, $date = 0) {
|
2008-10-07 18:19:15 +02:00
|
|
|
if (empty ($date))
|
2008-12-24 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php, include/functions_db.php,
include/functions_html.php, operation/agentes/datos_agente.php,
operation/agentes/estado_agente.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_grupo.php, operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, reporting/fgraph.php,
godmode/db/db_audit.php, godmode/db/db_event.php, godmode/db/db_purge.php:
Added get_system_time in favor of time ();
* include/functions.php: Added get_system_time which gets the time from
a source based on user preference
* include/help/en/help_timesource.php: Explanation of timesource.
* godmode/setup/setup.php, include/config_process.php: Added timesource
selection and preference
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1310 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-24 17:53:00 +01:00
|
|
|
$date = get_system_time ();
|
2008-10-07 18:19:15 +02:00
|
|
|
|
|
|
|
if (empty ($period))
|
|
|
|
return false; //We can't calculate a 0 period (division by zero)
|
|
|
|
|
|
|
|
$datelimit = $date - $period; // start date
|
|
|
|
|
|
|
|
$id_agent = get_db_value ('id_agente', 'tagente_modulo', 'id_agente_modulo', (int) $id_agent_module);
|
|
|
|
if (empty ($id_agent))
|
|
|
|
return 0;
|
|
|
|
//No agent connected to this module. Something bad in the database
|
|
|
|
|
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
|
|
|
/* Get all the data in the interval */
|
2008-10-07 18:19:15 +02:00
|
|
|
$sql = sprintf ('SELECT datos, utimestamp FROM tagente_datos
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
WHERE id_agente = %d AND id_agente_modulo = %d
|
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
|
|
|
AND utimestamp > %d AND utimestamp <= %d
|
|
|
|
ORDER BY utimestamp ASC',
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$id_agent, $id_agent_module, $datelimit, $date);
|
2008-06-30 10:11:10 +02:00
|
|
|
$datas = get_db_all_rows_sql ($sql);
|
2008-10-07 18:19:15 +02:00
|
|
|
if ($datas === false) {
|
2008-11-08 11:57:40 +01:00
|
|
|
|
|
|
|
/* Try to get data from tagente_estado. It may found nothing because of
|
|
|
|
data compression */
|
|
|
|
$sql = sprintf ('SELECT datos, utimestamp FROM tagente_estado
|
|
|
|
WHERE id_agente = %d AND id_agente_modulo = %d
|
|
|
|
AND utimestamp > %d AND utimestamp <= %d
|
|
|
|
ORDER BY utimestamp ASC',
|
|
|
|
$id_agent, $id_agent_module, $datelimit, $date);
|
|
|
|
$data = get_db_sql ($sql);
|
|
|
|
|
|
|
|
if ($data === false) {
|
|
|
|
//No data to calculate on so we return 0.
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
$datas = array ();
|
|
|
|
array_push ($datas, $data);
|
2008-10-07 18:19:15 +02:00
|
|
|
}
|
|
|
|
|
2007-06-07 19:46:38 +02:00
|
|
|
$last_data = "";
|
|
|
|
$total_badtime = 0;
|
|
|
|
$interval_begin = 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
|
|
|
$interval_last = $date;
|
|
|
|
$previous_data_timestamp = 0;
|
|
|
|
|
|
|
|
/* Get also the previous data before the selected interval. */
|
|
|
|
$previous_data = get_previous_data ($id_agent_module, $datelimit);
|
2008-10-07 18:19:15 +02:00
|
|
|
|
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
|
|
|
if ($previous_data) {
|
|
|
|
/* Add data to the beginning */
|
|
|
|
array_unshift ($datas, $previous_data);
|
|
|
|
$previous_data_timestamp = $previous_data['utimestamp'];
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
}
|
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
|
|
|
|
|
|
|
foreach ($datas as $data) {
|
|
|
|
if ($data["datos"] > $max_value || $data["datos"] < $min_value) {
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
if ($interval_begin == 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
|
|
|
$interval_begin = $data["utimestamp"];
|
2007-06-07 19:46:38 +02:00
|
|
|
}
|
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
|
|
|
} elseif ($interval_begin != 0) {
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
// Here ends interval with data outside valid values,
|
|
|
|
// Need to add this time to counter
|
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
|
|
|
$interval_last = $data["utimestamp"];
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$temp_time = $interval_last - $interval_begin;
|
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
|
|
|
$total_badtime += $temp_time;
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$interval_begin = 0;
|
|
|
|
$interval_last = 0;
|
2007-06-07 19:46:38 +02:00
|
|
|
}
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
}
|
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
|
|
|
|
|
|
|
/* Check the last interval, if any */
|
|
|
|
if ($interval_begin != 0) {
|
|
|
|
/* The last time was the time of the previous data in the
|
|
|
|
interval. That means that in all the interval, the data was
|
|
|
|
not between the expected values, so the SLA is zero. */
|
|
|
|
if ($interval_begin = $previous_data_timestamp)
|
|
|
|
return 0;
|
|
|
|
$total_badtime += $interval_last - $interval_begin;
|
|
|
|
}
|
|
|
|
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$result = 100 - ($total_badtime / $period) * 100;
|
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
|
|
|
return max ($result, 0);
|
2007-06-07 19:46:38 +02:00
|
|
|
}
|
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
/**
|
2008-11-11 15:24:34 +01:00
|
|
|
* Get general stats info on a group
|
2008-07-07 15:16:13 +02:00
|
|
|
*
|
|
|
|
* @param id_group
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
2008-11-11 15:24:34 +01:00
|
|
|
function get_group_stats ($id_group) {
|
2008-11-14 16:37:32 +01:00
|
|
|
$groups = array_keys (get_user_groups ());
|
2008-11-11 15:24:34 +01:00
|
|
|
if ($id_group > 0 && in_array ($groups, $id_group)) {
|
|
|
|
//If a group is selected, and we have permissions to it then we don't need to look for them
|
|
|
|
$groups = array ();
|
|
|
|
$groups[0] = $id_group;
|
|
|
|
}
|
2007-06-08 17:55:53 +02:00
|
|
|
|
2008-11-11 15:24:34 +01:00
|
|
|
//Select all modules in group
|
|
|
|
$sql = sprintf ("SELECT tagente.id_agente, tagente_estado.estado, tagente_estado.datos, tagente_estado.current_interval, tagente_estado.utimestamp,
|
|
|
|
tagente_estado.id_agente_modulo, tagente_modulo.id_tipo_modulo FROM tagente, tagente_estado, tagente_modulo
|
|
|
|
WHERE tagente.disabled = 0 AND tagente.id_grupo IN (%s)
|
|
|
|
AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
|
|
|
|
AND tagente_modulo.disabled = 0", implode (",",$groups));
|
|
|
|
$result = get_db_all_rows_sql ($sql);
|
|
|
|
|
|
|
|
if ($result === false)
|
|
|
|
$result = array ();
|
|
|
|
|
|
|
|
$data = array ();
|
|
|
|
$data["monitor_checks"] = 0;
|
|
|
|
$data["monitor_not_init"] = 0;
|
|
|
|
$data["monitor_unknown"] = 0;
|
|
|
|
$data["monitor_ok"] = 0;
|
|
|
|
$data["monitor_down"] = 0;
|
|
|
|
$data["monitor_alerts"] = 0;
|
|
|
|
$data["monitor_alerts_fired"] = 0;
|
|
|
|
$data["monitor_alerts_fire_count"] = 0;
|
|
|
|
$data["data_checks"] = 0;
|
|
|
|
$data["data_not_init"] = 0;
|
|
|
|
$data["data_unknown"] = 0;
|
|
|
|
$data["data_ok"] = 0;
|
|
|
|
$data["data_down"] = 0;
|
|
|
|
$data["data_alerts"] = 0;
|
|
|
|
$data["data_alerts_fired"] = 0;
|
|
|
|
$data["data_alerts_fire_count"] = 0;
|
|
|
|
|
|
|
|
|
2008-12-24 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php, include/functions_db.php,
include/functions_html.php, operation/agentes/datos_agente.php,
operation/agentes/estado_agente.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_grupo.php, operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, reporting/fgraph.php,
godmode/db/db_audit.php, godmode/db/db_event.php, godmode/db/db_purge.php:
Added get_system_time in favor of time ();
* include/functions.php: Added get_system_time which gets the time from
a source based on user preference
* include/help/en/help_timesource.php: Explanation of timesource.
* godmode/setup/setup.php, include/config_process.php: Added timesource
selection and preference
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1310 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-24 17:53:00 +01:00
|
|
|
$cur_time = get_system_time ();
|
2008-11-11 15:24:34 +01:00
|
|
|
|
|
|
|
foreach ($result as $row) {
|
|
|
|
$last_update = $cur_time - $row["utimestamp"];
|
|
|
|
if ($row["estado"] != 100) {
|
|
|
|
//This module is a monitor (remote)
|
|
|
|
$data["monitor_checks"]++;
|
|
|
|
|
|
|
|
//Check whether it's down, not init, unknown or OK
|
|
|
|
if ($last_update == $cur_time) {
|
|
|
|
//The utimestamp is 0 and has never been updated
|
|
|
|
$data["monitor_not_init"]++;
|
|
|
|
} elseif ($last_update >= ($row["current_interval"] * 2)) {
|
|
|
|
//The utimestamp is greater than 2x the interval (it has timed out)
|
|
|
|
$data["monitor_unknown"]++;
|
|
|
|
} elseif ($row["datos"] != 0) {
|
|
|
|
//Status is something
|
|
|
|
$data["monitor_ok"]++;
|
|
|
|
} else {
|
|
|
|
//Otherwise it's down
|
|
|
|
$data["monitor_down"]++;
|
|
|
|
}
|
|
|
|
|
|
|
|
$sql = sprintf ("SELECT times_fired FROM talerta_agente_modulo WHERE id_agente_modulo = %d", $row["id_agente_modulo"]);
|
|
|
|
$fired = get_db_sql ($sql);
|
|
|
|
if ($fired !== false) {
|
|
|
|
$data["monitor_alerts"]++;
|
|
|
|
if ($fired > 0) {
|
|
|
|
$data["monitor_alerts_fired"]++;
|
|
|
|
$data["monitor_alerts_fire_count"] += $fired;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
//This module is a data check (agent)
|
|
|
|
$data["data_checks"]++;
|
|
|
|
|
|
|
|
//Check whether it's down, not init, unknown or OK
|
|
|
|
if ($last_update == $cur_time) {
|
|
|
|
//The utimestamp is 0 and has never been updated
|
|
|
|
$data["data_not_init"]++;
|
|
|
|
} elseif ($last_update >= ($row["current_interval"] * 2)) {
|
|
|
|
//The utimestamp is greater than 2x the interval (it has timed out)
|
|
|
|
$data["data_unknown"]++;
|
2008-11-14 10:11:55 +01:00
|
|
|
} elseif ($row["datos"]) {
|
2008-11-11 15:24:34 +01:00
|
|
|
//Status is something
|
|
|
|
$data["data_ok"]++;
|
|
|
|
} else {
|
|
|
|
//Otherwise it's down
|
|
|
|
$data["data_down"]++;
|
|
|
|
}
|
|
|
|
|
|
|
|
$sql = sprintf ("SELECT times_fired FROM talerta_agente_modulo WHERE id_agente_modulo = %d", $row["id_agente_modulo"]);
|
|
|
|
$fired = get_db_sql ($sql);
|
|
|
|
if ($fired !== false) {
|
|
|
|
$data["data_alerts"]++;
|
|
|
|
if ($fired > 0) {
|
|
|
|
$data["data_alerts_fired"]++;
|
|
|
|
$data["data_alerts_fire_count"] += $fired;
|
2007-06-08 17:55:53 +02:00
|
|
|
}
|
|
|
|
}
|
2008-11-11 15:24:34 +01:00
|
|
|
} //End module check
|
|
|
|
} //End foreach module
|
|
|
|
|
2008-11-20 15:09:26 +01:00
|
|
|
$data["total_agents"] = count (get_group_agents ($groups, false, "none"));
|
2008-11-11 15:24:34 +01:00
|
|
|
$data["total_checks"] = $data["data_checks"] + $data["monitor_checks"];
|
|
|
|
$data["total_ok"] = $data["data_ok"] + $data["monitor_ok"];
|
|
|
|
$data["total_alerts"] = $data["data_alerts"] + $data["monitor_alerts"];
|
|
|
|
$data["total_alerts_fired"] = $data["data_alerts_fired"] + $data["monitor_alerts_fired"];
|
|
|
|
$data["total_alerts_fire_count"] = $data["data_alerts_fire_count"] + $data["monitor_alerts_fire_count"];
|
|
|
|
$data["monitor_bad"] = $data["monitor_down"] + $data["monitor_unknown"];
|
|
|
|
$data["data_bad"] = $data["data_down"] + $data["data_unknown"];
|
|
|
|
$data["total_bad"] = $data["data_bad"] + $data["monitor_bad"];
|
|
|
|
$data["total_not_init"] = $data["data_not_init"] + $data["monitor_not_init"];
|
|
|
|
$data["total_down"] = $data["data_down"] + $data["monitor_down"];
|
|
|
|
|
|
|
|
/*
|
|
|
|
Monitor health (percentage)
|
|
|
|
Data health (percentage)
|
|
|
|
Global health (percentage)
|
|
|
|
Module sanity (percentage)
|
|
|
|
Alert level (percentage)
|
|
|
|
|
|
|
|
Server Sanity 0% Uninitialized modules
|
|
|
|
|
|
|
|
*/
|
|
|
|
if ($data["monitor_bad"] > 0 && $data["monitor_checks"]) {
|
|
|
|
$data["monitor_health"] = format_numeric (100 - ($data["monitor_bad"] / ($data["monitor_checks"] / 100)), 1);
|
|
|
|
} else {
|
|
|
|
$data["monitor_health"] = 100;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($data["data_bad"] > 0 && $data["data_checks"] > 0) {
|
|
|
|
$data["data_health"] = format_numeric (100 - ($data["data_bad"] / ($data["data_checks"] / 100)), 1);
|
|
|
|
} else {
|
|
|
|
$data["data_health"] = 100;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($data["total_bad"] > 0 && $data["total_checks"] > 0) {
|
|
|
|
$data["global_health"] = format_numeric (100 - ($data["total_bad"] / ($data["total_checks"] / 100)), 1);
|
|
|
|
} else {
|
|
|
|
$data["global_health"] = 100;
|
2007-06-08 17:55:53 +02:00
|
|
|
}
|
2007-08-28 15:33:54 +02:00
|
|
|
|
2008-11-11 15:24:34 +01:00
|
|
|
if ($data["total_not_init"] > 0 && $data["total_checks"] > 0) {
|
|
|
|
$data["module_sanity"] = format_numeric (100 - ($data["total_not_init"] / ($data["total_checks"] / 100)), 1);
|
|
|
|
} else {
|
|
|
|
$data["module_sanity"] = 100;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($data["total_alerts_fired"] > 0 && $data["total_alerts"] > 0) {
|
|
|
|
$data["alert_level"] = format_numeric (100 - ($data["total_alerts_fired"] / ($data["total_alerts"] / 100)), 1);
|
|
|
|
} else {
|
|
|
|
$data["alert_level"] = 100;
|
|
|
|
}
|
|
|
|
|
|
|
|
$data["server_sanity"] = 100 - $data["module_sanity"];
|
2008-10-14 11:19:19 +02:00
|
|
|
|
2007-06-08 17:55:53 +02:00
|
|
|
return $data;
|
|
|
|
}
|
2007-06-07 19:46:38 +02:00
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
/**
|
|
|
|
* Get an event reporting table.
|
|
|
|
*
|
|
|
|
* It construct a table object with all the events happened in a group
|
|
|
|
* during a period of time.
|
|
|
|
*
|
|
|
|
* @param id_group Group id to get the report.
|
|
|
|
* @param period Period of time to get the report.
|
2008-11-14 16:37:32 +01:00
|
|
|
* @param date Beginning date of the report
|
2008-07-07 15:16:13 +02:00
|
|
|
* @param return Flag to return or echo the report table (echo by default).
|
|
|
|
*
|
|
|
|
* @return A table object if return variable is true.
|
|
|
|
*/
|
2008-07-02 14:30:56 +02:00
|
|
|
function event_reporting ($id_group, $period, $date = 0, $return = false) {
|
2008-11-14 16:37:32 +01:00
|
|
|
if (empty ($date)) {
|
2008-12-24 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php, include/functions_db.php,
include/functions_html.php, operation/agentes/datos_agente.php,
operation/agentes/estado_agente.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_grupo.php, operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, reporting/fgraph.php,
godmode/db/db_audit.php, godmode/db/db_event.php, godmode/db/db_purge.php:
Added get_system_time in favor of time ();
* include/functions.php: Added get_system_time which gets the time from
a source based on user preference
* include/help/en/help_timesource.php: Explanation of timesource.
* godmode/setup/setup.php, include/config_process.php: Added timesource
selection and preference
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1310 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-24 17:53:00 +01:00
|
|
|
$date = get_system_time ();
|
|
|
|
} elseif (!is_numeric ($date)) {
|
2008-11-14 16:37:32 +01:00
|
|
|
$date = strtotime ($date);
|
|
|
|
}
|
2008-07-02 14:30:56 +02:00
|
|
|
|
|
|
|
$table->data = array ();
|
|
|
|
$table->head = array ();
|
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
|
|
|
$table->head[0] = __('Status');
|
|
|
|
$table->head[1] = __('Event name');
|
|
|
|
$table->head[2] = __('User ID');
|
|
|
|
$table->head[3] = __('Timestamp');
|
2008-07-02 14:30:56 +02:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
$events = get_group_events ($id_group, $period, $date);
|
|
|
|
if (empty ($events)) {
|
|
|
|
$events = array ();
|
2008-07-21 15:43:33 +02:00
|
|
|
}
|
2008-07-02 14:30:56 +02:00
|
|
|
foreach ($events as $event) {
|
|
|
|
$data = array ();
|
|
|
|
if ($event["estado"] == 0)
|
2008-11-14 16:37:32 +01:00
|
|
|
$data[0] = '<img src="images/dot_red.png" />';
|
2008-07-02 14:30:56 +02:00
|
|
|
else
|
2008-11-14 16:37:32 +01:00
|
|
|
$data[0] = '<img src="images/dot_green.png" />';
|
2008-07-02 14:30:56 +02:00
|
|
|
$data[1] = $event['evento'];
|
|
|
|
$data[2] = $event['id_usuario'] != '0' ? $event['id_usuario'] : '';
|
|
|
|
$data[3] = $event["timestamp"];
|
|
|
|
array_push ($table->data, $data);
|
2007-06-12 20:10:57 +02:00
|
|
|
}
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
if (empty ($return))
|
2008-07-02 14:30:56 +02:00
|
|
|
print_table ($table);
|
|
|
|
return $table;
|
2007-06-12 20:10:57 +02:00
|
|
|
}
|
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
/**
|
|
|
|
* Get a table report from a alerts fired array.
|
|
|
|
*
|
|
|
|
* @param alerts_fired Alerts fired array. See get_alerts_fired()
|
|
|
|
*
|
|
|
|
* @return A table object with a report of the fired alerts.
|
|
|
|
*/
|
|
|
|
function get_fired_alerts_reporting_table ($alerts_fired) {
|
2008-07-02 14:30:56 +02:00
|
|
|
$agents = array ();
|
|
|
|
|
|
|
|
foreach (array_keys ($alerts_fired) as $id_alert) {
|
|
|
|
$alert = get_db_row ('talerta_agente_modulo', 'id_aam', $id_alert);
|
2007-06-12 20:10:57 +02:00
|
|
|
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
/* Add alerts fired to $agents_fired_alerts indexed by id_agent */
|
2008-11-08 13:16:03 +01:00
|
|
|
$id_agent = get_db_value ('id_agente', 'tagente_modulo', 'id_agente_modulo', $alert['id_agente_modulo']);
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
if (!isset ($agents[$id_agent])) {
|
|
|
|
$agents[$id_agent] = array ();
|
|
|
|
}
|
|
|
|
array_push ($agents[$id_agent], $alert);
|
|
|
|
}
|
2008-07-02 14:30:56 +02:00
|
|
|
|
|
|
|
$table->data = array ();
|
|
|
|
$table->head = array ();
|
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
|
|
|
$table->head[0] = __('Agent');
|
|
|
|
$table->head[1] = __('Alert description');
|
|
|
|
$table->head[2] = __('Times Fired');
|
|
|
|
$table->head[3] = __('Priority');
|
2008-07-02 14:30:56 +02:00
|
|
|
|
2008-11-08 13:16:03 +01:00
|
|
|
foreach ($agents as $id_agent => $alerts) {
|
2008-07-02 14:30:56 +02:00
|
|
|
$data = array ();
|
|
|
|
foreach ($alerts as $alert) {
|
|
|
|
if (! isset ($data[0]))
|
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu>
* pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new
functions and better security and validation
* pandora_console/include/functions_db.php: Renamed some functions and
created agentmodule functions for consistency with documentation and to
avoid searching for and typing certain function names:
get_agentmodules is now get_agent_modules;
dame_grupo is now get_group_name;
dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new;
dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name;
dame_nombre_modulo_agentemodulo is now get_agentmodule_name;
dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type;
dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is
now get_group_name; get_agentmodule_count is get_agent_modules_count;
get_agentmodule_group is new; get_agent_group is new;
* pandora_console/include/functions_reporting.php,
pandora_console/include/functions.php,
pandora_console/operation/incidents/incident.php,
pandora_console/operation/users/user.php,
pandora_console/operation/users/user_edit.php,
pandora_console/operation/events/events.php,
pandora_console/operation/visual_console/index.php,
pandora_console/operation/agentes/estado_grupo.php,
pandora_console/operation/agentes/export_csv.php,
pandora_console/operation/agentes/estado_agente.php,
pandora_console/operation/agentes/estado_ultimopaquete.php,
pandora_console/operation/agentes/estado_generalagente.php,
pandora_console/operation/agentes/sla_view.php,
pandora_console/operation/agentes/exportdata.php,
pandora_console/operation/agentes/ver_agente.php,
pandora_console/operation/agentes/tactical.php,
pandora_console/operation/agentes/networkmap.php,
pandora_console/operation/messages/message.php,
pandora_console/operation/reporting/reporting_xml.php,
pandora_console/operation/reporting/reporting_viewer.php,
pandora_console/reporting/fgraph.php,
pandora_console/godmode/groups/group_list.php,
pandora_console/godmode/users/user_list.php,
pandora_console/godmode/users/configure_user.php,
pandora_console/godmode/db/db_refine.php,
pandora_console/godmode/db/db_info.php,
pandora_console/godmode/db/db_purge.php,
pandora_console/godmode/agentes/manage_config.php,
pandora_console/godmode/agentes/modificar_agente.php,
pandora_console/godmode/agentes/configurar_agente.php,
pandora_console/godmode/agentes/manage_config_remote.php,
pandora_console/godmode/modules/manage_network_components_form_network.php,
pandora_console/godmode/modules/manage_network_components_form_wmi.php,
pandora_console/godmode/reporting/reporting_builder.php,
pandora_console/godmode/reporting/map_builder.php,
pandora_console/godmode/reporting/graph_builder.php: Renamed functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
|
|
|
$data[0] = get_agent_name ($id_agent);
|
2008-07-02 14:30:56 +02:00
|
|
|
else
|
|
|
|
$data[0] = '';
|
|
|
|
$data[1] = $alert['descripcion'];
|
|
|
|
$data[2] = $alerts_fired[$alert['id_aam']];
|
|
|
|
$data[3] = get_alert_priority ($alert['priority']);
|
|
|
|
array_push ($table->data, $data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return $table;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a report for alerts in a group of agents.
|
|
|
|
*
|
|
|
|
* It prints the numbers of alerts defined, fired and not fired in a group.
|
|
|
|
* It also prints all the alerts that were fired grouped by agents.
|
|
|
|
*
|
|
|
|
* @param $id_group Group to get info of the alerts.
|
|
|
|
* @param $period Period of time of the desired alert report.
|
|
|
|
* @param $date Beggining date of the report (current date by default).
|
2008-07-07 15:16:13 +02:00
|
|
|
* @param $return Flag to return or echo the report (echo by default).
|
2008-07-02 14:30:56 +02:00
|
|
|
*/
|
|
|
|
function alert_reporting ($id_group, $period = 0, $date = 0, $return = false) {
|
|
|
|
$output = '';
|
|
|
|
$alerts = get_alerts_in_group ($id_group);
|
|
|
|
$alerts_fired = get_alerts_fired ($alerts, $period, $date);
|
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
$fired_percentage = 0;
|
|
|
|
if (sizeof ($alerts) > 0)
|
|
|
|
$fired_percentage = round (sizeof ($alerts_fired) / sizeof ($alerts) * 100, 2);
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$not_fired_percentage = 100 - $fired_percentage;
|
2008-06-20 14:13:35 +02:00
|
|
|
$output .= '<img src="reporting/fgraph.php?tipo=alerts_fired_pipe&height=150&width=280&fired='.
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$fired_percentage.'¬_fired='.$not_fired_percentage.'" style="float: right; border: 1px solid black">';
|
|
|
|
|
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
|
|
|
$output .= '<strong>'.__('Alerts fired').': '.sizeof ($alerts_fired).'</strong><br />';
|
|
|
|
$output .= '<strong>'.__('Total alerts monitored').': '.sizeof ($alerts).'</strong><br />';
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
|
2008-07-02 14:30:56 +02:00
|
|
|
if (! sizeof ($alerts_fired)) {
|
|
|
|
if (!$return)
|
|
|
|
echo $output;
|
|
|
|
return $output;
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
}
|
2008-07-07 15:16:13 +02:00
|
|
|
$table = get_fired_alerts_reporting_table ($alerts_fired);
|
2008-07-02 14:30:56 +02:00
|
|
|
$table->width = '100%';
|
|
|
|
$table->class = 'databox';
|
|
|
|
$table->size = array ();
|
|
|
|
$table->size[0] = '100px';
|
|
|
|
$table->style = array ();
|
|
|
|
$table->style[0] = 'font-weight: bold';
|
|
|
|
|
|
|
|
$output .= print_table ($table, true);
|
2008-07-07 15:16:13 +02:00
|
|
|
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
if (!$return)
|
|
|
|
echo $output;
|
|
|
|
return $output;
|
|
|
|
}
|
2007-06-12 20:10:57 +02:00
|
|
|
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
/**
|
|
|
|
* Get a report for monitors modules in a group of agents.
|
|
|
|
*
|
|
|
|
* It prints the numbers of monitors defined, showing those which went up and down, in a group.
|
|
|
|
* It also prints all the down monitors in the group.
|
|
|
|
*
|
|
|
|
* @param $id_group Group to get info of the monitors.
|
|
|
|
* @param $period Period of time of the desired monitor report.
|
2008-07-07 15:16:13 +02:00
|
|
|
* @param $date Beginning date of the report in UNIX time (current date by default).
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
* @param $return Flag to return or echo the report (by default).
|
|
|
|
*/
|
|
|
|
function monitor_health_reporting ($id_group, $period = 0, $date = 0, $return = false) {
|
2008-09-30 19:55:36 +02:00
|
|
|
if (empty ($date)) //If date is 0, false or empty
|
2008-12-24 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php, include/functions_db.php,
include/functions_html.php, operation/agentes/datos_agente.php,
operation/agentes/estado_agente.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_grupo.php, operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, reporting/fgraph.php,
godmode/db/db_audit.php, godmode/db/db_event.php, godmode/db/db_purge.php:
Added get_system_time in favor of time ();
* include/functions.php: Added get_system_time which gets the time from
a source based on user preference
* include/help/en/help_timesource.php: Explanation of timesource.
* godmode/setup/setup.php, include/config_process.php: Added timesource
selection and preference
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1310 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-24 17:53:00 +01:00
|
|
|
$date = get_system_time ();
|
2008-09-30 19:55:36 +02:00
|
|
|
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$datelimit = $date - $period;
|
|
|
|
$output = '';
|
|
|
|
|
2008-07-02 14:30:56 +02:00
|
|
|
$monitors = get_monitors_in_group ($id_group);
|
2008-09-30 19:55:36 +02:00
|
|
|
if (empty ($monitors)) //If monitors has returned false or an empty array
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
return;
|
2008-07-02 14:30:56 +02:00
|
|
|
$monitors_down = get_monitors_down ($monitors, $period, $date);
|
2008-09-30 19:55:36 +02:00
|
|
|
$down_percentage = round (count ($monitors_down) / count ($monitors) * 100, 2);
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$not_down_percentage = 100 - $down_percentage;
|
|
|
|
|
2008-09-30 19:55:36 +02:00
|
|
|
$output .= '<strong>'.__('Total monitors').': '.count ($monitors).'</strong><br />';
|
|
|
|
$output .= '<strong>'.__('Monitors down on period').': '.count ($monitors_down).'</strong><br />';
|
2008-07-02 14:30:56 +02:00
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
$table = get_monitors_down_reporting_table ($monitors_down);
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$table->width = '100%';
|
|
|
|
$table->class = 'databox';
|
|
|
|
$table->size = array ();
|
|
|
|
$table->size[0] = '100px';
|
2008-07-02 14:30:56 +02:00
|
|
|
$table->style = array ();
|
|
|
|
$table->style[0] = 'font-weight: bold';
|
|
|
|
|
|
|
|
$table->size = array ();
|
|
|
|
$table->size[0] = '100px';
|
|
|
|
|
|
|
|
$output .= print_table ($table, true);
|
|
|
|
|
2008-09-30 19:55:36 +02:00
|
|
|
//Floating it was ugly, moved it to the bottom
|
|
|
|
$output .= '<img src="reporting/fgraph.php?tipo=monitors_health_pipe&height=150&width=280&down='.$down_percentage.'&not_down='.$not_down_percentage.'" style="border: 1px solid black">';
|
|
|
|
|
2008-07-02 14:30:56 +02:00
|
|
|
if (!$return)
|
|
|
|
echo $output;
|
|
|
|
return $output;
|
|
|
|
}
|
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
/**
|
|
|
|
* Get a report table with all the monitors down.
|
|
|
|
*
|
|
|
|
* @param monitors_down An array with all the monitors down. See
|
|
|
|
* get_monitors_down()
|
|
|
|
*
|
|
|
|
* @return A table object with a monitors down report.
|
|
|
|
*/
|
|
|
|
function get_monitors_down_reporting_table ($monitors_down) {
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
$table->data = array ();
|
|
|
|
$table->head = array ();
|
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
|
|
|
$table->head[0] = __('Agent');
|
|
|
|
$table->head[1] = __('Monitor');
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
|
2008-07-02 14:30:56 +02:00
|
|
|
$agents = array ();
|
2008-08-22 16:28:00 +02:00
|
|
|
if ($monitors_down){
|
|
|
|
foreach ($monitors_down as $monitor) {
|
|
|
|
/* Add monitors fired to $agents_fired_alerts indexed by id_agent */
|
|
|
|
$id_agent = $monitor['id_agente'];
|
|
|
|
if (!isset ($agents[$id_agent])) {
|
|
|
|
$agents[$id_agent] = array ();
|
|
|
|
}
|
|
|
|
array_push ($agents[$id_agent], $monitor);
|
|
|
|
|
|
|
|
$monitors_down++;
|
2008-07-02 14:30:56 +02:00
|
|
|
}
|
2008-08-22 16:28:00 +02:00
|
|
|
foreach ($agents as $id_agent => $monitors) {
|
|
|
|
$data = array ();
|
|
|
|
foreach ($monitors as $monitor) {
|
|
|
|
if (! isset ($data[0]))
|
2008-11-20 15:09:26 +01:00
|
|
|
$data[0] = get_agent_name ($id_agent);
|
2008-08-22 16:28:00 +02:00
|
|
|
else
|
|
|
|
$data[0] = '';
|
|
|
|
if ($monitor['descripcion'] != '') {
|
|
|
|
$data[1] = $monitor['descripcion'];
|
|
|
|
} else {
|
|
|
|
$data[1] = $monitor['nombre'];
|
|
|
|
}
|
|
|
|
array_push ($table->data, $data);
|
2008-07-02 14:30:56 +02:00
|
|
|
}
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
}
|
|
|
|
}
|
2008-07-02 14:30:56 +02:00
|
|
|
return $table;
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a general report of a group of agents.
|
|
|
|
*
|
|
|
|
* It shows the number of agents and no more things right now.
|
|
|
|
*
|
|
|
|
* @param $id_group Group to get the report
|
|
|
|
* @param $return Flag to return or echo the report (by default).
|
|
|
|
*/
|
|
|
|
function general_group_reporting ($id_group, $return = false) {
|
2008-11-20 15:09:26 +01:00
|
|
|
$agents = get_group_agents ($id_group, false, "none");
|
|
|
|
$output = '<strong>'.__('Agents in group').': '.count ($agents).'</strong><br />';
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
|
2008-11-20 15:09:26 +01:00
|
|
|
if ($return === false)
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
echo $output;
|
2008-11-20 15:09:26 +01:00
|
|
|
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
return $output;
|
2007-06-12 20:10:57 +02:00
|
|
|
}
|
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
/**
|
|
|
|
* Get a report table of the fired alerts group by agents.
|
|
|
|
*
|
|
|
|
* @param id_agent Agent id to generate the report.
|
|
|
|
* @param period Period of time of the report.
|
|
|
|
* @param date Beginning date of the report in UNIX time (current date by default).
|
|
|
|
*
|
|
|
|
* @return A table object with the alert reporting..
|
|
|
|
*/
|
|
|
|
function get_agent_alerts_reporting_table ($id_agent, $period = 0, $date = 0) {
|
2008-07-02 14:30:56 +02:00
|
|
|
$table->data = array ();
|
|
|
|
$table->head = array ();
|
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
|
|
|
$table->head[0] = __('Type');
|
|
|
|
$table->head[1] = __('Description');
|
|
|
|
$table->head[2] = __('Minimum');
|
|
|
|
$table->head[3] = __('Maximum');
|
|
|
|
$table->head[4] = __('Threshold');
|
|
|
|
$table->head[5] = __('Last fired');
|
|
|
|
$table->head[6] = __('Times Fired');
|
2008-06-27 10:06:28 +02:00
|
|
|
|
|
|
|
$alerts = get_alerts_in_agent ($id_agent);
|
|
|
|
foreach ($alerts as $alert) {
|
|
|
|
$fires = get_alert_fires_in_period ($alert['id_agente_modulo'], $period, $date);
|
|
|
|
if (! $fires) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$alert_type = get_db_row ('talerta', 'id_alerta', $alert['id_alerta']);
|
|
|
|
$data = array ();
|
|
|
|
$data[0] = $alert_type['nombre'];
|
|
|
|
$data[1] = $alert['descripcion'];
|
|
|
|
$data[2] = $alert['dis_min'];
|
|
|
|
$data[3] = $alert['dis_max'];
|
|
|
|
$data[4] = $alert['time_threshold'];
|
|
|
|
$data[5] = get_alert_last_fire_timestamp_in_period ($alert['id_agente_modulo'], $period, $date);
|
|
|
|
$data[6] = $fires;
|
|
|
|
|
2008-07-02 14:30:56 +02:00
|
|
|
array_push ($table->data, $data);
|
2008-06-27 10:06:28 +02:00
|
|
|
}
|
2008-07-02 14:30:56 +02:00
|
|
|
return $table;
|
|
|
|
}
|
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
/**
|
|
|
|
* Get a report of monitors in an agent.
|
|
|
|
*
|
|
|
|
* @param id_agent Agent id to get the report
|
|
|
|
* @param period Period of time of the report.
|
|
|
|
* @param date Beginning date of the report in UNIX time (current date by default).
|
|
|
|
*
|
|
|
|
* @return A table object with the report.
|
|
|
|
*/
|
|
|
|
function get_agent_monitors_reporting_table ($id_agent, $period = 0, $date = 0) {
|
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
|
|
|
$n_a_string = __('N/A').'(*)';
|
2008-07-02 14:30:56 +02:00
|
|
|
$table->head = array ();
|
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
|
|
|
$table->head[0] = __('Monitor');
|
|
|
|
$table->head[1] = __('Last failure');
|
2008-07-02 14:30:56 +02:00
|
|
|
$table->data = array ();
|
|
|
|
$monitors = get_monitors_in_agent ($id_agent);
|
2008-06-27 10:06:28 +02:00
|
|
|
|
2008-07-21 15:43:33 +02:00
|
|
|
if ($monitors === false) {
|
2008-07-21 16:03:39 +02:00
|
|
|
return $table;
|
2008-07-21 15:43:33 +02:00
|
|
|
}
|
2008-06-27 10:06:28 +02:00
|
|
|
foreach ($monitors as $monitor) {
|
|
|
|
$downs = get_monitor_downs_in_period ($monitor['id_agente_modulo'], $period, $date);
|
|
|
|
if (! $downs) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$data = array ();
|
|
|
|
if ($monitor['descripcion'] != $n_a_string && $monitor['descripcion'] != '')
|
|
|
|
$data[0] = $monitor['descripcion'];
|
|
|
|
else
|
|
|
|
$data[0] = $monitor['nombre'];
|
|
|
|
$data[1] = get_monitor_last_down_timestamp_in_period ($monitor['id_agente_modulo'], $period, $date);
|
2008-07-02 14:30:56 +02:00
|
|
|
array_push ($table->data, $data);
|
|
|
|
}
|
2008-07-07 15:16:13 +02:00
|
|
|
|
2008-07-02 14:30:56 +02:00
|
|
|
return $table;
|
|
|
|
}
|
|
|
|
|
2008-07-07 15:16:13 +02:00
|
|
|
/**
|
|
|
|
* Get a report of all the modules in an agent.
|
|
|
|
*
|
|
|
|
* @param id_agent Agent id to get the report.
|
|
|
|
* @param period Period of time of the report
|
|
|
|
* @param date Beginning date of the report in UNIX time (current date by default).
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
function get_agent_modules_reporting_table ($id_agent, $period = 0, $date = 0) {
|
2008-07-02 14:30:56 +02:00
|
|
|
$table->data = array ();
|
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
|
|
|
$n_a_string = __('N/A').'(*)';
|
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu>
* pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new
functions and better security and validation
* pandora_console/include/functions_db.php: Renamed some functions and
created agentmodule functions for consistency with documentation and to
avoid searching for and typing certain function names:
get_agentmodules is now get_agent_modules;
dame_grupo is now get_group_name;
dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new;
dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name;
dame_nombre_modulo_agentemodulo is now get_agentmodule_name;
dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type;
dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is
now get_group_name; get_agentmodule_count is get_agent_modules_count;
get_agentmodule_group is new; get_agent_group is new;
* pandora_console/include/functions_reporting.php,
pandora_console/include/functions.php,
pandora_console/operation/incidents/incident.php,
pandora_console/operation/users/user.php,
pandora_console/operation/users/user_edit.php,
pandora_console/operation/events/events.php,
pandora_console/operation/visual_console/index.php,
pandora_console/operation/agentes/estado_grupo.php,
pandora_console/operation/agentes/export_csv.php,
pandora_console/operation/agentes/estado_agente.php,
pandora_console/operation/agentes/estado_ultimopaquete.php,
pandora_console/operation/agentes/estado_generalagente.php,
pandora_console/operation/agentes/sla_view.php,
pandora_console/operation/agentes/exportdata.php,
pandora_console/operation/agentes/ver_agente.php,
pandora_console/operation/agentes/tactical.php,
pandora_console/operation/agentes/networkmap.php,
pandora_console/operation/messages/message.php,
pandora_console/operation/reporting/reporting_xml.php,
pandora_console/operation/reporting/reporting_viewer.php,
pandora_console/reporting/fgraph.php,
pandora_console/godmode/groups/group_list.php,
pandora_console/godmode/users/user_list.php,
pandora_console/godmode/users/configure_user.php,
pandora_console/godmode/db/db_refine.php,
pandora_console/godmode/db/db_info.php,
pandora_console/godmode/db/db_purge.php,
pandora_console/godmode/agentes/manage_config.php,
pandora_console/godmode/agentes/modificar_agente.php,
pandora_console/godmode/agentes/configurar_agente.php,
pandora_console/godmode/agentes/manage_config_remote.php,
pandora_console/godmode/modules/manage_network_components_form_network.php,
pandora_console/godmode/modules/manage_network_components_form_wmi.php,
pandora_console/godmode/reporting/reporting_builder.php,
pandora_console/godmode/reporting/map_builder.php,
pandora_console/godmode/reporting/graph_builder.php: Renamed functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
|
|
|
$modules = get_agent_modules ($id_agent, array ("nombre", "descripcion"));
|
2008-09-02 22:11:46 +02:00
|
|
|
if ($modules === false)
|
|
|
|
$modules = array();
|
2008-07-02 14:30:56 +02:00
|
|
|
$data = array ();
|
|
|
|
|
|
|
|
foreach ($modules as $module) {
|
|
|
|
if ($module['descripcion'] != $n_a_string && $module['descripcion'] != '')
|
|
|
|
$data[0] = $module['descripcion'];
|
|
|
|
else
|
|
|
|
$data[0] = $module['nombre'];
|
|
|
|
array_push ($table->data, $data);
|
|
|
|
}
|
2008-07-07 15:16:13 +02:00
|
|
|
|
2008-07-02 14:30:56 +02:00
|
|
|
return $table;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a detailed report of an agent
|
|
|
|
*
|
|
|
|
* @param $id_agent Agent to get the report.
|
|
|
|
* @param $period Period of time of the desired report.
|
2008-07-07 15:16:13 +02:00
|
|
|
* @param $date Beginning date of the report in UNIX time (current date by default).
|
2008-07-02 14:30:56 +02:00
|
|
|
* @param $return Flag to return or echo the report (by default).
|
|
|
|
*/
|
|
|
|
function get_agent_detailed_reporting ($id_agent, $period = 0, $date = 0, $return = false) {
|
|
|
|
$output = '';
|
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
|
|
|
$n_a_string = __('N/A').'(*)';
|
2008-07-02 14:30:56 +02:00
|
|
|
|
|
|
|
/* Show modules in agent */
|
|
|
|
$output .= '<div class="agent_reporting">';
|
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu>
* pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new
functions and better security and validation
* pandora_console/include/functions_db.php: Renamed some functions and
created agentmodule functions for consistency with documentation and to
avoid searching for and typing certain function names:
get_agentmodules is now get_agent_modules;
dame_grupo is now get_group_name;
dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new;
dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name;
dame_nombre_modulo_agentemodulo is now get_agentmodule_name;
dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type;
dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is
now get_group_name; get_agentmodule_count is get_agent_modules_count;
get_agentmodule_group is new; get_agent_group is new;
* pandora_console/include/functions_reporting.php,
pandora_console/include/functions.php,
pandora_console/operation/incidents/incident.php,
pandora_console/operation/users/user.php,
pandora_console/operation/users/user_edit.php,
pandora_console/operation/events/events.php,
pandora_console/operation/visual_console/index.php,
pandora_console/operation/agentes/estado_grupo.php,
pandora_console/operation/agentes/export_csv.php,
pandora_console/operation/agentes/estado_agente.php,
pandora_console/operation/agentes/estado_ultimopaquete.php,
pandora_console/operation/agentes/estado_generalagente.php,
pandora_console/operation/agentes/sla_view.php,
pandora_console/operation/agentes/exportdata.php,
pandora_console/operation/agentes/ver_agente.php,
pandora_console/operation/agentes/tactical.php,
pandora_console/operation/agentes/networkmap.php,
pandora_console/operation/messages/message.php,
pandora_console/operation/reporting/reporting_xml.php,
pandora_console/operation/reporting/reporting_viewer.php,
pandora_console/reporting/fgraph.php,
pandora_console/godmode/groups/group_list.php,
pandora_console/godmode/users/user_list.php,
pandora_console/godmode/users/configure_user.php,
pandora_console/godmode/db/db_refine.php,
pandora_console/godmode/db/db_info.php,
pandora_console/godmode/db/db_purge.php,
pandora_console/godmode/agentes/manage_config.php,
pandora_console/godmode/agentes/modificar_agente.php,
pandora_console/godmode/agentes/configurar_agente.php,
pandora_console/godmode/agentes/manage_config_remote.php,
pandora_console/godmode/modules/manage_network_components_form_network.php,
pandora_console/godmode/modules/manage_network_components_form_wmi.php,
pandora_console/godmode/reporting/reporting_builder.php,
pandora_console/godmode/reporting/map_builder.php,
pandora_console/godmode/reporting/graph_builder.php: Renamed functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
|
|
|
$output .= '<h3 style="text-decoration: underline">'.__('Agent').' - '.get_agent_name ($id_agent).'</h3>';
|
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
|
|
|
$output .= '<h4>'.__('Modules').'</h3>';
|
2008-07-07 15:16:13 +02:00
|
|
|
$table_modules = get_agent_modules_reporting_table ($id_agent, $period, $date);
|
2008-07-02 14:30:56 +02:00
|
|
|
$table_modules->width = '99%';
|
|
|
|
$output .= print_table ($table_modules, true);
|
|
|
|
|
|
|
|
/* Show alerts in agent */
|
2008-07-07 15:16:13 +02:00
|
|
|
$table_alerts = get_agent_alerts_reporting_table ($id_agent, $period, $date);
|
2008-07-02 14:30:56 +02:00
|
|
|
$table_alerts->width = '99%';
|
|
|
|
if (sizeof ($table_alerts->data)) {
|
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
|
|
|
$output .= '<h4>'.__('Alerts').'</h4>';
|
2008-07-02 14:30:56 +02:00
|
|
|
$output .= print_table ($table_alerts, true);
|
2008-06-27 10:06:28 +02:00
|
|
|
}
|
2008-07-02 14:30:56 +02:00
|
|
|
|
|
|
|
/* Show monitor status in agent (if any) */
|
2008-07-07 15:16:13 +02:00
|
|
|
$table_monitors = get_agent_monitors_reporting_table ($id_agent, $period, $date);
|
2008-07-02 14:30:56 +02:00
|
|
|
if (sizeof ($table_monitors->data) == 0) {
|
|
|
|
$output .= '</div>';
|
|
|
|
if (! $return)
|
|
|
|
echo $output;
|
|
|
|
return $output;
|
2008-06-27 10:06:28 +02:00
|
|
|
}
|
2008-07-02 14:30:56 +02:00
|
|
|
$table_monitors->width = '99%';
|
|
|
|
$table_monitors->align = array ();
|
|
|
|
$table_monitors->align[1] = 'right';
|
|
|
|
$table_monitors->size = array ();
|
|
|
|
$table_monitors->align[1] = '10%';
|
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
|
|
|
$output .= '<h4>'.__('Monitors').'</h4>';
|
2008-07-02 14:30:56 +02:00
|
|
|
$output .= print_table ($table_monitors, true);
|
|
|
|
|
2008-06-27 10:06:28 +02:00
|
|
|
$output .= '</div>';
|
|
|
|
|
|
|
|
if (! $return)
|
|
|
|
echo $output;
|
|
|
|
return $output;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a detailed report of agents in a group.
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
*
|
|
|
|
* @param $id_group Group to get the report
|
|
|
|
* @param $return Flag to return or echo the report (by default).
|
|
|
|
*/
|
2008-07-02 14:30:56 +02:00
|
|
|
function get_agents_detailed_reporting ($id_group, $period = 0, $date = 0, $return = false) {
|
2008-11-20 15:09:26 +01:00
|
|
|
$agents = get_group_agents ($id_group, false, "none");
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
|
2008-11-20 15:09:26 +01:00
|
|
|
$output = '';
|
|
|
|
foreach ($agents as $agent_id => $agent_name) {
|
|
|
|
$output .= get_agent_detailed_reporting ($agent_id, $period, $date, true);
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
}
|
|
|
|
|
2008-11-20 15:09:26 +01:00
|
|
|
if ($return === false)
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
echo $output;
|
2008-11-20 15:09:26 +01:00
|
|
|
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
return $output;
|
|
|
|
}
|
2008-11-14 10:11:55 +01:00
|
|
|
|
2007-06-07 19:46:38 +02:00
|
|
|
?>
|