2011-03-30 14:34:25 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2011 Artica Soluciones Tecnologicas
|
|
|
|
// Please see http://pandorafms.org for full contribution list
|
|
|
|
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation; version 2
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
2012-06-25 12:42:52 +02:00
|
|
|
include_once($config['homedir'] . "/include/graphs/fgraph.php");
|
|
|
|
include_once($config['homedir'] . "/include/functions_reporting.php");
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
include_once($config['homedir'] . "/include/functions_agents.php");
|
|
|
|
include_once($config['homedir'] . "/include/functions_modules.php");
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
include_once($config['homedir'] . "/include/functions_users.php");
|
2011-03-30 14:34:25 +02:00
|
|
|
|
2011-04-12 18:30:24 +02:00
|
|
|
define("GRAPH_AREA", 0);
|
|
|
|
define("GRAPH_STACKED_AREA", 1);
|
|
|
|
define("GRAPH_LINE", 2);
|
|
|
|
define("GRAPH_STACKED_LINE", 3);
|
|
|
|
|
2012-10-02 11:07:20 +02:00
|
|
|
function get_graph_statistics ($chart_array) {
|
|
|
|
|
|
|
|
/// IMPORTANT!
|
|
|
|
///
|
|
|
|
/// The calculus for AVG, MIN and MAX values are in this function
|
|
|
|
/// because it must be done based on graph array data not using reporting
|
|
|
|
/// function to get coherent data between stats and graph visualization
|
|
|
|
|
|
|
|
$stats = array ();
|
|
|
|
|
|
|
|
$count = 0;
|
|
|
|
|
|
|
|
$size = sizeof($chart_array);
|
|
|
|
|
|
|
|
//Initialize stats array
|
|
|
|
$stats = array ("avg" => 0, "min" => null, "max" => null, "last" => 0);
|
|
|
|
|
|
|
|
foreach ($chart_array as $item) {
|
|
|
|
|
|
|
|
//Sum all values later divide by the number of elements
|
|
|
|
$stats['avg'] = $stats['avg'] + $item;
|
|
|
|
|
|
|
|
//Get minimum
|
|
|
|
if ($stats['min'] == null) {
|
|
|
|
$stats['min'] = $item;
|
|
|
|
} else if ($item < $stats['min']) {
|
|
|
|
$stats['min'] = $item;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Get maximum
|
|
|
|
if ($stats['max'] == null) {
|
|
|
|
$stats['max'] = $item;
|
|
|
|
} else if ($item > $stats['max']) {
|
|
|
|
$stats['max'] = $item;
|
|
|
|
}
|
|
|
|
|
|
|
|
$count++;
|
|
|
|
|
|
|
|
//Get last data
|
|
|
|
if ($count == $size) {
|
|
|
|
$stats['last'] = $item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//End the calculus for average
|
|
|
|
if ($count > 0) {
|
|
|
|
|
|
|
|
$stats['avg'] = $stats['avg'] / $count;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Format stat data to display properly
|
|
|
|
$stats['last'] = round($stats['last'], 2);
|
|
|
|
$stats['avg'] = round($stats['avg'], 2);
|
|
|
|
$stats['min'] = round($stats['min'], 2);
|
|
|
|
$stats['max'] = round($stats['max'], 2);
|
|
|
|
|
|
|
|
return $stats;
|
|
|
|
}
|
|
|
|
|
2012-12-05 12:41:52 +01:00
|
|
|
function get_statwin_graph_statistics ($chart_array, $series_suffix = '') {
|
2012-10-02 11:07:20 +02:00
|
|
|
|
|
|
|
/// IMPORTANT!
|
|
|
|
///
|
|
|
|
/// The calculus for AVG, MIN and MAX values are in this function
|
|
|
|
/// because it must be done based on graph array data not using reporting
|
|
|
|
/// function to get coherent data between stats and graph visualization
|
|
|
|
|
|
|
|
$stats = array ();
|
|
|
|
|
|
|
|
$count = 0;
|
|
|
|
|
|
|
|
$size = sizeof($chart_array);
|
|
|
|
|
|
|
|
//Initialize stats array
|
|
|
|
$stats['sum'] = array ("avg" => 0, "min" => null, "max" => null, "last" => 0);
|
|
|
|
$stats['min'] = array ("avg" => 0, "min" => null, "max" => null, "last" => 0);
|
2012-11-28 19:29:24 +01:00
|
|
|
$stats['max'] = array ("avg" => 0, "min" => null, "max" => null, "last" => 0);
|
2012-10-02 11:07:20 +02:00
|
|
|
|
|
|
|
foreach ($chart_array as $item) {
|
2012-12-05 12:41:52 +01:00
|
|
|
if($series_suffix != '') {
|
|
|
|
$item['sum'] = $item['sum'.$series_suffix];
|
|
|
|
$item['min'] = $item['min'.$series_suffix];
|
|
|
|
$item['max'] = $item['max'.$series_suffix];
|
|
|
|
}
|
|
|
|
|
2012-10-02 11:07:20 +02:00
|
|
|
//Get stats for normal grap
|
2012-11-28 19:29:24 +01:00
|
|
|
if (isset($item['sum']) && $item['sum']) {
|
2012-10-02 11:07:20 +02:00
|
|
|
//Sum all values later divide by the number of elements
|
|
|
|
$stats['sum']['avg'] = $stats['sum']['avg'] + $item['sum'];
|
|
|
|
|
|
|
|
//Get minimum
|
|
|
|
if ($stats['sum']['min'] == null) {
|
|
|
|
$stats['sum']['min'] = $item['sum'];
|
|
|
|
} else if ($item['sum'] < $stats['sum']['min']) {
|
|
|
|
$stats['sum']['min'] = $item['sum'];
|
|
|
|
}
|
|
|
|
|
|
|
|
//Get maximum
|
|
|
|
if ($stats['sum']['max'] == null) {
|
2012-12-05 12:41:52 +01:00
|
|
|
$stats['sum']['max'] = $item['sum'];
|
|
|
|
} else if ($item['sum'] > $stats['sum']['max']) {
|
|
|
|
$stats['sum']['max'] = $item['sum'];
|
|
|
|
}
|
2012-10-02 11:07:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//Get stats for min graph
|
2012-11-28 19:29:24 +01:00
|
|
|
if (isset($item['min']) && $item['min']) {
|
|
|
|
//Sum all values later divide by the number of elements
|
|
|
|
$stats['min']['avg'] = $stats['min']['avg'] + $item['min'];
|
2012-10-02 11:07:20 +02:00
|
|
|
|
2012-11-28 19:29:24 +01:00
|
|
|
//Get minimum
|
|
|
|
if ($stats['min']['min'] == null) {
|
|
|
|
$stats['min']['min'] = $item['min'];
|
|
|
|
} else if ($item['min'] < $stats['min']['min']) {
|
|
|
|
$stats['min']['min'] = $item['min'];
|
|
|
|
}
|
2012-10-02 11:07:20 +02:00
|
|
|
|
2012-11-28 19:29:24 +01:00
|
|
|
//Get maximum
|
|
|
|
if ($stats['min']['max'] == null) {
|
|
|
|
$stats['min']['max'] = $item['min'];
|
|
|
|
} else if ($item['min'] > $stats['min']['max']) {
|
|
|
|
$stats['min']['max'] = $item['min'];
|
|
|
|
}
|
|
|
|
}
|
2012-10-02 11:07:20 +02:00
|
|
|
|
|
|
|
//Get stats for max graph
|
2012-11-28 19:29:24 +01:00
|
|
|
if (isset($item['max']) && $item['max']) {
|
|
|
|
//Sum all values later divide by the number of elements
|
|
|
|
$stats['max']['avg'] = $stats['max']['avg'] + $item['max'];
|
2012-10-02 11:07:20 +02:00
|
|
|
|
2012-11-28 19:29:24 +01:00
|
|
|
//Get minimum
|
|
|
|
if ($stats['max']['min'] == null) {
|
|
|
|
$stats['max']['min'] = $item['max'];
|
|
|
|
} else if ($item['max'] < $stats['max']['min']) {
|
|
|
|
$stats['max']['min'] = $item['max'];
|
|
|
|
}
|
|
|
|
|
|
|
|
//Get maximum
|
|
|
|
if ($stats['max']['max'] == null) {
|
|
|
|
$stats['max']['max'] = $item['max'];
|
|
|
|
} else if ($item['max'] > $stats['max']['max']) {
|
|
|
|
$stats['max']['max'] = $item['max'];
|
|
|
|
}
|
|
|
|
}
|
2012-10-02 11:07:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
//Count elements
|
|
|
|
$count++;
|
|
|
|
|
|
|
|
//Get last data
|
|
|
|
if ($count == $size) {
|
2012-11-28 19:29:24 +01:00
|
|
|
if (isset($item['sum']) && $item['sum']) {
|
2012-10-02 11:07:20 +02:00
|
|
|
$stats['sum']['last'] = $item['sum'];
|
|
|
|
}
|
|
|
|
|
2012-11-28 19:29:24 +01:00
|
|
|
if(isset($item['min']) && $item['min']) {
|
2012-10-02 11:07:20 +02:00
|
|
|
$stats['min']['last'] = $item['min'];
|
|
|
|
}
|
|
|
|
|
2012-11-28 19:29:24 +01:00
|
|
|
if (isset($item['max']) && $item['max']) {
|
2012-10-02 11:07:20 +02:00
|
|
|
$stats['max']['last'] = $item['max'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//End the calculus for average
|
|
|
|
if ($count > 0) {
|
|
|
|
|
|
|
|
$stats['sum']['avg'] = $stats['sum']['avg'] / $count;
|
|
|
|
$stats['min']['avg'] = $stats['min']['avg'] / $count;
|
|
|
|
$stats['max']['avg'] = $stats['max']['avg'] / $count;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Format stat data to display properly
|
|
|
|
$stats['sum']['last'] = round($stats['sum']['last'], 2);
|
|
|
|
$stats['sum']['avg'] = round($stats['sum']['avg'], 2);
|
|
|
|
$stats['sum']['min'] = round($stats['sum']['min'], 2);
|
|
|
|
$stats['sum']['max'] = round($stats['sum']['max'], 2);
|
|
|
|
|
|
|
|
$stats['min']['last'] = round($stats['min']['last'], 2);
|
|
|
|
$stats['min']['avg'] = round($stats['min']['avg'], 2);
|
|
|
|
$stats['min']['min'] = round($stats['min']['min'], 2);
|
|
|
|
$stats['min']['max'] = round($stats['min']['max'], 2);
|
|
|
|
|
|
|
|
$stats['max']['last'] = round($stats['max']['last'], 2);
|
|
|
|
$stats['max']['avg'] = round($stats['max']['avg'], 2);
|
|
|
|
$stats['max']['min'] = round($stats['max']['min'], 2);
|
|
|
|
$stats['max']['max'] = round($stats['max']['max'], 2);
|
|
|
|
|
|
|
|
return $stats;
|
|
|
|
}
|
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_index,
|
2012-09-10 09:53:37 +02:00
|
|
|
$data, $data_i, $previous_data, $resolution, $interval, $period, $datelimit,
|
2012-08-30 11:22:03 +02:00
|
|
|
$projection, $avg_only = false, $uncompressed_module = false,
|
2012-09-18 11:02:49 +02:00
|
|
|
$show_events = false, $show_alerts = false, $show_unknown = false, $baseline = false,
|
2012-09-19 16:59:31 +02:00
|
|
|
$baseline_data = array(), $events = array(), $series_suffix = '', $start_unknown = false) {
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-03-30 14:34:25 +02:00
|
|
|
global $config;
|
2012-09-18 11:02:49 +02:00
|
|
|
global $chart_extra_data;
|
|
|
|
global $series_type;
|
2012-11-05 12:18:52 +01:00
|
|
|
global $max_value;
|
2012-08-30 17:50:18 +02:00
|
|
|
|
2012-11-05 12:18:52 +01:00
|
|
|
$max_value = 0;
|
2012-09-18 11:02:49 +02:00
|
|
|
$flash_chart = $config['flash_charts'];
|
|
|
|
|
2011-03-30 14:34:25 +02:00
|
|
|
// Event iterator
|
2012-08-30 11:22:03 +02:00
|
|
|
$event_i = 0;
|
2012-09-18 11:02:49 +02:00
|
|
|
|
|
|
|
// Is unknown flag
|
2012-09-19 16:59:31 +02:00
|
|
|
$is_unknown = $start_unknown;
|
2012-09-18 11:02:49 +02:00
|
|
|
|
2011-03-30 14:34:25 +02:00
|
|
|
// Calculate chart data
|
|
|
|
for ($i = 0; $i < $resolution; $i++) {
|
|
|
|
$timestamp = $datelimit + ($interval * $i);
|
|
|
|
|
|
|
|
$total = 0;
|
|
|
|
$count = 0;
|
|
|
|
|
|
|
|
// Read data that falls in the current interval
|
|
|
|
$interval_min = false;
|
|
|
|
$interval_max = false;
|
2012-08-30 11:22:03 +02:00
|
|
|
|
|
|
|
while (isset ($data[$data_i]) && $data[$data_i]['utimestamp'] >= $timestamp && $data[$data_i]['utimestamp'] < ($timestamp + $interval)) {
|
2011-03-30 14:34:25 +02:00
|
|
|
if ($interval_min === false) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$interval_min = $data[$data_i]['datos'];
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
|
|
|
if ($interval_max === false) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$interval_max = $data[$data_i]['datos'];
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
if ($data[$data_i]['datos'] > $interval_max) {
|
|
|
|
$interval_max = $data[$data_i]['datos'];
|
|
|
|
} else if ($data[$data_i]['datos'] < $interval_min) {
|
|
|
|
$interval_min = $data[$data_i]['datos'];
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
2012-08-30 11:22:03 +02:00
|
|
|
$total += $data[$data_i]['datos'];
|
2011-03-30 14:34:25 +02:00
|
|
|
$count++;
|
2012-08-30 11:22:03 +02:00
|
|
|
$data_i++;
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2012-11-05 12:18:52 +01:00
|
|
|
if($max_value < $interval_max) {
|
|
|
|
$max_value = $interval_max;
|
|
|
|
}
|
|
|
|
|
2011-03-30 14:34:25 +02:00
|
|
|
// Data in the interval
|
|
|
|
if ($count > 0) {
|
|
|
|
$total /= $count;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-03-30 14:34:25 +02:00
|
|
|
// Read events and alerts that fall in the current interval
|
|
|
|
$event_value = 0;
|
|
|
|
$alert_value = 0;
|
2012-09-18 11:02:49 +02:00
|
|
|
$unknown_value = 0;
|
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
$event_ids = array();
|
|
|
|
$alert_ids = array();
|
2012-08-30 11:22:03 +02:00
|
|
|
while (isset ($events[$event_i]) && $events[$event_i]['utimestamp'] >= $timestamp && $events[$event_i]['utimestamp'] <= ($timestamp + $interval)) {
|
2011-03-30 14:34:25 +02:00
|
|
|
if ($show_events == 1) {
|
|
|
|
$event_value++;
|
2012-08-30 11:22:03 +02:00
|
|
|
$event_ids[] = $events[$event_i]['id_evento'];
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
2012-08-30 11:22:03 +02:00
|
|
|
if ($show_alerts == 1 && substr ($events[$event_i]['event_type'], 0, 5) == 'alert') {
|
2011-03-30 14:34:25 +02:00
|
|
|
$alert_value++;
|
2012-08-30 11:22:03 +02:00
|
|
|
$alert_ids[] = $events[$event_i]['id_evento'];
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
2012-09-18 11:02:49 +02:00
|
|
|
if ($show_unknown) {
|
|
|
|
if($events[$event_i]['event_type'] == 'going_unknown') {
|
|
|
|
$is_unknown = true;
|
|
|
|
}
|
|
|
|
else if(substr ($events[$event_i]['event_type'], 0, 5) == 'going') {
|
|
|
|
$is_unknown = false;
|
|
|
|
}
|
|
|
|
}
|
2012-08-30 11:22:03 +02:00
|
|
|
$event_i++;
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
|
2012-09-18 11:02:49 +02:00
|
|
|
if($is_unknown) {
|
|
|
|
$unknown_value++;
|
|
|
|
}
|
2011-03-31 19:07:00 +02:00
|
|
|
|
2012-02-02 20:00:56 +01:00
|
|
|
if (!$flash_chart) {
|
|
|
|
// Set the title and time format
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($period <= SECONDS_6HOURS) {
|
2012-02-02 20:00:56 +01:00
|
|
|
$time_format = 'H:i:s';
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
elseif ($period < SECONDS_1DAY) {
|
2012-02-02 20:00:56 +01:00
|
|
|
$time_format = 'H:i';
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
elseif ($period < SECONDS_15DAYS) {
|
2012-02-02 20:00:56 +01:00
|
|
|
$time_format = "M \nd H:i";
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
elseif ($period < SECONDS_1MONTH) {
|
2012-02-02 20:00:56 +01:00
|
|
|
$time_format = "M \nd H\h";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$time_format = "M \nd H\h";
|
|
|
|
}
|
2011-03-31 19:07:00 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-02-02 20:00:56 +01:00
|
|
|
// Set the title and time format
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($period <= SECONDS_6HOURS) {
|
2012-02-02 20:00:56 +01:00
|
|
|
$time_format = 'H:i:s';
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
elseif ($period < SECONDS_1DAY) {
|
2012-02-02 20:00:56 +01:00
|
|
|
$time_format = 'H:i';
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
elseif ($period < SECONDS_15DAYS) {
|
2012-02-02 20:00:56 +01:00
|
|
|
$time_format = "M d H:i";
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
elseif ($period < SECONDS_1MONTH) {
|
2012-02-02 20:00:56 +01:00
|
|
|
$time_format = "M d H\h";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$time_format = "M d H\h";
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
}
|
2011-03-31 19:07:00 +02:00
|
|
|
}
|
2012-02-02 20:00:56 +01:00
|
|
|
|
2011-03-31 19:07:00 +02:00
|
|
|
$timestamp_short = date($time_format, $timestamp);
|
|
|
|
$long_index[$timestamp_short] = date(
|
|
|
|
html_entity_decode($config['date_format'], ENT_QUOTES, "UTF-8"), $timestamp);
|
2011-11-03 16:14:12 +01:00
|
|
|
if (!$projection){
|
|
|
|
$timestamp = $timestamp_short;
|
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
|
2012-06-25 15:17:05 +02:00
|
|
|
// Data
|
2012-03-07 18:58:15 +01:00
|
|
|
if($show_events) {
|
2012-09-19 16:59:31 +02:00
|
|
|
if(!isset($chart[$timestamp]['event'.$series_suffix])) {
|
|
|
|
$chart[$timestamp]['event'.$series_suffix] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$chart[$timestamp]['event'.$series_suffix] += $event_value;
|
2012-08-30 11:22:03 +02:00
|
|
|
$series_type['event'.$series_suffix] = 'points';
|
2012-03-07 18:58:15 +01:00
|
|
|
}
|
|
|
|
if($show_alerts) {
|
2012-09-19 16:59:31 +02:00
|
|
|
if(!isset($chart[$timestamp]['alert'.$series_suffix])) {
|
|
|
|
$chart[$timestamp]['alert'.$series_suffix] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$chart[$timestamp]['alert'.$series_suffix] += $alert_value;
|
2012-08-30 11:22:03 +02:00
|
|
|
$series_type['alert'.$series_suffix] = 'points';
|
2012-03-07 18:58:15 +01:00
|
|
|
}
|
2012-09-18 11:02:49 +02:00
|
|
|
if($show_unknown) {
|
2012-09-19 16:59:31 +02:00
|
|
|
if(!isset($chart[$timestamp]['unknown'.$series_suffix])) {
|
|
|
|
$chart[$timestamp]['unknown'.$series_suffix] = 0;
|
|
|
|
}
|
|
|
|
|
2012-09-18 11:02:49 +02:00
|
|
|
$chart[$timestamp]['unknown'.$series_suffix] = $unknown_value;
|
|
|
|
$series_type['unknown'.$series_suffix] = 'area';
|
|
|
|
}
|
|
|
|
|
|
|
|
if($is_unknown) {
|
|
|
|
$total = $interval_max = $interval_min = $previous_data = 0;
|
|
|
|
}
|
2012-08-30 11:22:03 +02:00
|
|
|
|
2011-03-30 14:34:25 +02:00
|
|
|
if ($count > 0) {
|
2011-08-16 19:09:43 +02:00
|
|
|
if ($avg_only) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = $total;
|
2011-08-16 19:09:43 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-08-30 11:22:03 +02:00
|
|
|
$chart[$timestamp]['max'.$series_suffix] = $interval_max;
|
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = $total;
|
|
|
|
$chart[$timestamp]['min'.$series_suffix] = $interval_min;
|
2011-08-16 19:09:43 +02:00
|
|
|
}
|
2011-03-30 14:34:25 +02:00
|
|
|
$previous_data = $total;
|
|
|
|
// Compressed data
|
2011-08-16 19:09:43 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-03-30 14:34:25 +02:00
|
|
|
if ($uncompressed_module || ($timestamp > time ())) {
|
2011-08-16 19:09:43 +02:00
|
|
|
if ($avg_only) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = 0;
|
2011-08-16 19:09:43 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-08-30 11:22:03 +02:00
|
|
|
$chart[$timestamp]['max'.$series_suffix] = 0;
|
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = 0;
|
|
|
|
$chart[$timestamp]['min'.$series_suffix] = 0;
|
2011-08-16 19:09:43 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if ($avg_only) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = $previous_data;
|
2011-08-16 19:09:43 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-08-30 11:22:03 +02:00
|
|
|
$chart[$timestamp]['max'.$series_suffix] = $previous_data;
|
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = $previous_data;
|
|
|
|
$chart[$timestamp]['min'.$series_suffix] = $previous_data;
|
2011-08-16 19:09:43 +02:00
|
|
|
}
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
|
|
|
}
|
2011-06-27 18:28:10 +02:00
|
|
|
|
2011-03-31 19:07:00 +02:00
|
|
|
//$chart[$timestamp]['count'] = 0;
|
2011-03-30 14:34:25 +02:00
|
|
|
/////////
|
|
|
|
//$chart[$timestamp]['timestamp_bottom'] = $timestamp;
|
|
|
|
//$chart[$timestamp]['timestamp_top'] = $timestamp + $interval;
|
|
|
|
/////////
|
2012-03-07 18:58:15 +01:00
|
|
|
|
2012-10-03 13:07:21 +02:00
|
|
|
//Baseline was replaced by compare graphs feature
|
|
|
|
/*if ($baseline) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$chart[$timestamp]['baseline'.$series_suffix] = array_shift ($baseline_data);
|
|
|
|
if ($chart[$timestamp]['baseline'.$series_suffix] == NULL) {
|
|
|
|
$chart[$timestamp]['baseline'.$series_suffix] = 0;
|
2011-08-16 19:09:43 +02:00
|
|
|
}
|
2012-10-03 13:07:21 +02:00
|
|
|
}*/
|
2012-03-01 17:41:02 +01:00
|
|
|
|
|
|
|
if(!empty($event_ids)) {
|
2012-09-19 16:59:31 +02:00
|
|
|
$chart_extra_data[count($chart)-1]['events'] = implode(',',$event_ids);
|
2012-03-01 17:41:02 +01:00
|
|
|
}
|
|
|
|
if(!empty($alert_ids)) {
|
2012-09-19 16:59:31 +02:00
|
|
|
$chart_extra_data[count($chart)-1]['alerts'] = implode(',',$alert_ids);
|
2012-03-01 17:41:02 +01:00
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
}
|
2012-08-30 11:22:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
|
|
|
|
$width, $height , $title = '', $unit_name = null,
|
|
|
|
$show_alerts = false, $avg_only = 0, $date = 0, $unit = '',
|
|
|
|
$baseline = 0, $return_data = 0, $show_title = true, $projection = false,
|
2012-09-18 11:02:49 +02:00
|
|
|
$adapt_key = '', $compare = false, $series_suffix = '', $series_suffix_str = '',
|
|
|
|
$show_unknown = false) {
|
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
global $config;
|
|
|
|
global $chart;
|
|
|
|
global $color;
|
|
|
|
global $legend;
|
|
|
|
global $long_index;
|
|
|
|
global $series_type;
|
|
|
|
global $chart_extra_data;
|
|
|
|
global $warning_min;
|
|
|
|
global $critical_min;
|
2012-09-10 09:53:37 +02:00
|
|
|
global $graphic_type;
|
2012-11-05 12:18:52 +01:00
|
|
|
global $max_value;
|
2012-02-02 19:39:58 +01:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
$chart = array();
|
|
|
|
$color = array();
|
|
|
|
$legend = array();
|
|
|
|
$long_index = array();
|
|
|
|
$warning_min = 0;
|
|
|
|
$critical_min = 0;
|
2012-09-19 16:59:31 +02:00
|
|
|
$start_unknown = false;
|
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
// Set variables
|
|
|
|
if ($date == 0) $date = get_system_time();
|
|
|
|
$datelimit = $date - $period;
|
|
|
|
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
|
|
|
$interval = (int) ($period / $resolution);
|
|
|
|
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
|
|
|
$agent_id = agents_get_agent_id ($agent_name);
|
|
|
|
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
|
|
|
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
|
|
|
$module_type = modules_get_moduletype_name ($id_module_type);
|
|
|
|
$uncompressed_module = is_module_uncompressed ($module_type);
|
|
|
|
if ($uncompressed_module) {
|
|
|
|
$avg_only = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
$flash_chart = $config['flash_charts'];
|
|
|
|
|
|
|
|
// Get event data (contains alert data too)
|
2012-09-04 17:58:48 +02:00
|
|
|
$events = array();
|
2012-09-18 11:02:49 +02:00
|
|
|
if ($show_unknown == 1 || $show_events == 1 || $show_alerts == 1) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$events = db_get_all_rows_filter ('tevento',
|
|
|
|
array ('id_agentmodule' => $agent_module_id,
|
|
|
|
"utimestamp > $datelimit",
|
|
|
|
"utimestamp < $date",
|
|
|
|
'order' => 'utimestamp ASC'),
|
|
|
|
array ('id_evento', 'evento', 'utimestamp', 'event_type'));
|
2012-09-19 16:59:31 +02:00
|
|
|
|
|
|
|
// Get the last event after inverval to know if graph start on unknown
|
|
|
|
$prev_event = db_get_row_filter ('tevento',
|
|
|
|
array ('id_agentmodule' => $agent_module_id,
|
|
|
|
"utimestamp <= $datelimit",
|
|
|
|
'order' => 'utimestamp DESC'));
|
|
|
|
if(isset($prev_event['event_type']) && $prev_event['event_type'] == 'going_unknown') {
|
|
|
|
$start_unknown = true;
|
|
|
|
}
|
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
if ($events === false) {
|
|
|
|
$events = array ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get module data
|
|
|
|
$data = db_get_all_rows_filter ('tagente_datos',
|
|
|
|
array ('id_agente_modulo' => $agent_module_id,
|
|
|
|
"utimestamp > $datelimit",
|
|
|
|
"utimestamp < $date",
|
|
|
|
'order' => 'utimestamp ASC'),
|
|
|
|
array ('datos', 'utimestamp'), 'AND', true);
|
|
|
|
|
|
|
|
// Get module warning_min and critical_min
|
|
|
|
$warning_min = db_get_value('min_warning','tagente_modulo','id_agente_modulo',$agent_module_id);
|
|
|
|
$critical_min = db_get_value('min_critical','tagente_modulo','id_agente_modulo',$agent_module_id);
|
|
|
|
|
|
|
|
if ($data === false) {
|
|
|
|
$data = array ();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Uncompressed module data
|
|
|
|
if ($uncompressed_module) {
|
|
|
|
$min_necessary = 1;
|
|
|
|
|
|
|
|
// Compressed module data
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Get previous data
|
|
|
|
$previous_data = modules_get_previous_data ($agent_module_id, $datelimit);
|
|
|
|
if ($previous_data !== false) {
|
|
|
|
$previous_data['utimestamp'] = $datelimit;
|
|
|
|
array_unshift ($data, $previous_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get next data
|
|
|
|
$nextData = modules_get_next_data ($agent_module_id, $date);
|
|
|
|
if ($nextData !== false) {
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
}
|
|
|
|
else if (count ($data) > 0) {
|
|
|
|
// Propagate the last known data to the end of the interval
|
|
|
|
$nextData = array_pop ($data);
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
$nextData['utimestamp'] = $date;
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
}
|
|
|
|
|
|
|
|
$min_necessary = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check available data
|
|
|
|
if (count ($data) < $min_necessary) {
|
|
|
|
if (!$graphic_type) {
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if (!$projection) {
|
2012-08-30 11:22:03 +02:00
|
|
|
return fs_error_image ();
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
return fs_error_image ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
graphic_error ();
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
// Data iterator
|
|
|
|
$data_i = 0;
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
// Set initial conditions
|
|
|
|
if ($data[0]['utimestamp'] == $datelimit) {
|
|
|
|
$previous_data = $data[0]['datos'];
|
|
|
|
$data_i++;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$previous_data = 0;
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
// Get baseline data
|
2012-10-03 13:07:21 +02:00
|
|
|
//Baseline was replaced by compare graph feature
|
2012-09-04 17:58:48 +02:00
|
|
|
$baseline_data = array();
|
2012-10-03 13:07:21 +02:00
|
|
|
/*if ($baseline) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$baseline_data = array ();
|
|
|
|
if ($baseline == 1) {
|
|
|
|
$baseline_data = enterprise_hook ('reporting_enterprise_get_baseline', array ($agent_module_id, $period, $width, $height , $title, $unit_name, $date));
|
|
|
|
if ($baseline_data === ENTERPRISE_NOT_HOOK) {
|
|
|
|
$baseline_data = array ();
|
|
|
|
}
|
|
|
|
}
|
2012-10-03 13:07:21 +02:00
|
|
|
}*/
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
if (empty($unit)){
|
|
|
|
$unit = modules_get_unit($agent_module_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Calculate chart data
|
|
|
|
grafico_modulo_sparse_data_chart ($chart, $chart_data_extra, $long_index,
|
2012-09-10 09:53:37 +02:00
|
|
|
$data, $data_i, $previous_data, $resolution, $interval, $period, $datelimit,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$projection, $avg_only, $uncompressed_module,
|
2012-09-18 11:02:49 +02:00
|
|
|
$show_events, $show_alerts, $show_unknown, $baseline,
|
2012-09-19 16:59:31 +02:00
|
|
|
$baseline_data, $events, $series_suffix, $start_unknown);
|
|
|
|
|
2011-03-30 14:34:25 +02:00
|
|
|
// Return chart data and don't draw
|
|
|
|
if ($return_data == 1) {
|
|
|
|
return $chart;
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
}
|
2011-03-30 14:34:25 +02:00
|
|
|
|
2012-12-05 12:41:52 +01:00
|
|
|
$graph_stats = get_statwin_graph_statistics($chart, $series_suffix);
|
2012-10-02 11:07:20 +02:00
|
|
|
|
2011-03-30 14:34:25 +02:00
|
|
|
// Fix event and alert scale
|
2012-11-08 08:42:11 +01:00
|
|
|
$event_max = 2 + (float)$max_value * 1.05;
|
2011-03-30 14:34:25 +02:00
|
|
|
foreach ($chart as $timestamp => $chart_data) {
|
2012-08-30 11:22:03 +02:00
|
|
|
if ($show_events && $chart_data['event'.$series_suffix] > 0) {
|
2012-09-18 11:02:49 +02:00
|
|
|
$chart[$timestamp]['event'.$series_suffix] = $event_max * 1.2;
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
if ($show_alerts && $chart_data['alert'.$series_suffix] > 0) {
|
2012-09-18 11:02:49 +02:00
|
|
|
$chart[$timestamp]['alert'.$series_suffix] = $event_max * 1.10;
|
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
if ($show_unknown && $chart_data['unknown'.$series_suffix] > 0) {
|
2012-09-18 11:02:49 +02:00
|
|
|
$chart[$timestamp]['unknown'.$series_suffix] = $event_max * 1.05;
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
|
|
|
// Only show caption if graph is not small
|
|
|
|
if ($width > MIN_WIDTH_CAPTION && $height > MIN_HEIGHT)
|
|
|
|
//Flash chart
|
2012-10-02 11:07:20 +02:00
|
|
|
$caption = __('Max. Value').$series_suffix_str . ': ' . $graph_stats['sum']['max'] . ' ' . __('Avg. Value').$series_suffix_str . ': ' . $graph_stats['sum']['avg'] . ' ' . __('Min. Value').$series_suffix_str . ': ' . $graph_stats['sum']['min'] . ' ' . __('Units. Value').$series_suffix_str . ': ' . $unit;
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
else
|
2011-04-07 16:34:03 +02:00
|
|
|
$caption = array();
|
2011-03-30 14:34:25 +02:00
|
|
|
|
|
|
|
///////
|
2012-01-24 19:53:18 +01:00
|
|
|
// Color commented not to restrict serie colors
|
2011-03-31 19:07:00 +02:00
|
|
|
if($show_events) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$color['event'.$series_suffix] = array('border' => '#ff0000', 'color' => '#ff0000', 'alpha' => 50);
|
2011-03-31 19:07:00 +02:00
|
|
|
}
|
|
|
|
if($show_alerts) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$color['alert'.$series_suffix] = array('border' => '#ff7f00', 'color' => '#ff7f00', 'alpha' => 50);
|
2011-03-31 19:07:00 +02:00
|
|
|
}
|
2012-09-18 11:02:49 +02:00
|
|
|
if($show_unknown) {
|
|
|
|
$color['unknown'.$series_suffix] = array('border' => '#999999', 'color' => '#999999', 'alpha' => 50);
|
|
|
|
}
|
2012-08-30 11:22:03 +02:00
|
|
|
$color['max'.$series_suffix] = array('border' => '#000000', 'color' => $config['graph_color3'], 'alpha' => 50);
|
|
|
|
$color['sum'.$series_suffix] = array('border' => '#000000', 'color' => $config['graph_color2'], 'alpha' => 50);
|
|
|
|
$color['min'.$series_suffix] = array('border' => '#000000', 'color' => $config['graph_color1'], 'alpha' => 50);
|
2012-10-03 13:07:21 +02:00
|
|
|
//Baseline was replaced by compare graph feature
|
|
|
|
//$color['baseline'.$series_suffix] = array('border' => null, 'color' => '#0097BD', 'alpha' => 10);
|
2012-08-30 11:22:03 +02:00
|
|
|
$color['unit'.$series_suffix] = array('border' => null, 'color' => '#0097BC', 'alpha' => 10);
|
2011-03-30 14:34:25 +02:00
|
|
|
|
2011-03-31 19:07:00 +02:00
|
|
|
if($show_events) {
|
2012-09-19 16:59:31 +02:00
|
|
|
$legend['event'.$series_suffix_str] = __('Events').$series_suffix_str;
|
|
|
|
$chart_extra_data['legend_events'] = $legend['event'].$series_suffix_str;
|
2011-03-31 19:07:00 +02:00
|
|
|
}
|
|
|
|
if($show_alerts) {
|
2012-09-19 16:59:31 +02:00
|
|
|
$legend['alert'.$series_suffix] = __('Alerts').$series_suffix_str;
|
|
|
|
$chart_extra_data['legend_alerts'] = $legend['alert'.$series_suffix_str];
|
2011-03-31 19:07:00 +02:00
|
|
|
}
|
2012-09-18 11:02:49 +02:00
|
|
|
if($show_unknown) {
|
|
|
|
$legend['unknown'.$series_suffix] = __('Unknown').$series_suffix_str;
|
2012-09-19 16:59:31 +02:00
|
|
|
$chart_extra_data['legend_unknown'] = $legend['unknown'.$series_suffix_str];
|
2012-09-18 11:02:49 +02:00
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-04-24 13:20:27 +02:00
|
|
|
if (!$avg_only){
|
2012-10-02 11:07:20 +02:00
|
|
|
$legend['max'.$series_suffix] = __('Max').$series_suffix_str.': '.__('Last').': '.$graph_stats['max']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['max']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['max']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['max']['min'].' '.$unit;
|
2012-10-02 17:15:27 +02:00
|
|
|
$legend['sum'.$series_suffix] = __('Data').$series_suffix_str.': '.__('Last').': '.$graph_stats['sum']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['sum']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['sum']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['sum']['min'].' '.$unit;
|
2012-10-02 11:07:20 +02:00
|
|
|
$legend['min'.$series_suffix] = __('Min').$series_suffix_str.': '.__('Last').': '.$graph_stats['min']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['min']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['min']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['min']['min'].' '.$unit;
|
2012-04-24 13:20:27 +02:00
|
|
|
}
|
|
|
|
else
|
2012-10-02 11:07:20 +02:00
|
|
|
$legend['sum'.$series_suffix] = __('Data').$series_suffix_str.': '.__('Last').': '.$graph_stats['sum']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['sum']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['sum']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['sum']['min'].' '.$unit;
|
2012-10-03 13:07:21 +02:00
|
|
|
//Baseline was replaced by compare graph feature
|
|
|
|
/*if ($baseline) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$legend['baseline'.$series_suffix] = __('Baseline');
|
2012-10-03 13:07:21 +02:00
|
|
|
}*/
|
2012-08-30 11:22:03 +02:00
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$width, $height , $title = '', $unit_name = null,
|
|
|
|
$show_alerts = false, $avg_only = 0, $pure = false,
|
|
|
|
$date = 0, $unit = '', $baseline = 0, $return_data = 0,
|
|
|
|
$show_title = true, $only_image = false, $homeurl = '', $ttl = 1,
|
2012-09-18 11:02:49 +02:00
|
|
|
$projection = false, $adapt_key = '', $compare = false, $show_unknown = false) {
|
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
|
|
|
|
|
|
|
$flash_chart = $config['flash_charts'];
|
|
|
|
|
|
|
|
enterprise_include_once("include/functions_reporting.php");
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
global $chart;
|
|
|
|
global $color;
|
|
|
|
global $legend;
|
|
|
|
global $long_index;
|
|
|
|
global $series_type;
|
|
|
|
global $chart_extra_data;
|
|
|
|
global $warning_min;
|
|
|
|
global $critical_min;
|
|
|
|
|
2012-09-19 16:59:31 +02:00
|
|
|
$series_suffix_str = '';
|
2012-08-31 13:59:46 +02:00
|
|
|
if($compare !== false) {
|
2012-08-30 11:22:03 +02:00
|
|
|
$series_suffix = '2';
|
|
|
|
$series_suffix_str = ' ('.__('Previous').')';
|
|
|
|
// Build the data of the previous period
|
2012-09-18 11:02:49 +02:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
|
2012-09-19 16:59:31 +02:00
|
|
|
$width, $height, $title, $unit_name,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$show_alerts, $avg_only, $date-$period, $unit, $baseline, $return_data,
|
|
|
|
$show_title, $projection, $adapt_key, $compare,
|
2012-09-18 11:02:49 +02:00
|
|
|
$series_suffix, $series_suffix_str, $show_unknown);
|
2012-09-19 16:59:31 +02:00
|
|
|
|
2012-08-31 13:59:46 +02:00
|
|
|
switch($compare) {
|
|
|
|
case 'separated':
|
|
|
|
// Store the chart calculated
|
|
|
|
$chart_prev = $chart;
|
|
|
|
$legend_prev = $legend;
|
|
|
|
$long_index_prev = $long_index;
|
2012-09-19 16:59:31 +02:00
|
|
|
$series_type_prev = $series_type;
|
|
|
|
$color_prev = $color;
|
2012-08-31 13:59:46 +02:00
|
|
|
break;
|
|
|
|
case 'overlapped':
|
|
|
|
// Store the chart calculated deleting index, because will be over the current period
|
|
|
|
$chart_prev = array_values($chart);
|
|
|
|
$legend_prev = $legend;
|
2012-09-19 16:59:31 +02:00
|
|
|
$series_type_prev = $series_type;
|
2012-08-31 13:59:46 +02:00
|
|
|
break;
|
|
|
|
}
|
2012-08-30 11:22:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Build the data of the current period
|
|
|
|
$data_returned = grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$width, $height , $title, $unit_name,
|
|
|
|
$show_alerts, $avg_only, $date, $unit, $baseline,
|
2012-09-18 11:02:49 +02:00
|
|
|
$return_data, $show_title, $projection, $adapt_key, $compare, '', '', $show_unknown);
|
2012-09-19 16:59:31 +02:00
|
|
|
|
2012-08-30 11:22:03 +02:00
|
|
|
if ($return_data) {
|
|
|
|
return $data_returned;
|
|
|
|
}
|
|
|
|
|
2012-08-31 13:59:46 +02:00
|
|
|
if($compare === 'overlapped') {
|
2012-08-30 11:22:03 +02:00
|
|
|
$i = 0;
|
|
|
|
foreach($chart as $k=>$v) {
|
2012-09-18 11:02:49 +02:00
|
|
|
if(!isset($chart_prev[$i])) {
|
|
|
|
continue;
|
|
|
|
}
|
2012-08-30 11:22:03 +02:00
|
|
|
$chart[$k] = array_merge($v,$chart_prev[$i]);
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
$legend = array_merge($legend, $legend_prev);
|
2012-04-24 13:20:27 +02:00
|
|
|
}
|
2011-03-31 10:46:04 +02:00
|
|
|
|
2011-04-13 17:11:51 +02:00
|
|
|
if ($only_image) {
|
|
|
|
$flash_chart = false;
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
|
|
|
|
|
|
|
if ($compare === 'separated') {
|
2012-08-31 13:59:46 +02:00
|
|
|
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
2012-08-31 13:59:46 +02:00
|
|
|
$water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl,
|
2012-09-19 16:59:31 +02:00
|
|
|
$series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str).
|
2012-08-31 13:59:46 +02:00
|
|
|
'<br>'.
|
2012-09-19 16:59:31 +02:00
|
|
|
area_graph($flash_chart, $chart_prev, $width, $height/2, $color_prev, $legend_prev,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$long_index_prev, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
2012-08-31 13:59:46 +02:00
|
|
|
$water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl,
|
2012-09-19 16:59:31 +02:00
|
|
|
$series_type_prev, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str);
|
2012-08-31 13:59:46 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Color commented not to restrict serie colors
|
|
|
|
return area_graph($flash_chart, $chart, $width, $height, $color, $legend,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
2012-08-31 13:59:46 +02:00
|
|
|
$water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl,
|
2012-09-19 16:59:31 +02:00
|
|
|
$series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str);
|
2012-08-31 13:59:46 +02:00
|
|
|
}
|
2011-04-05 18:11:53 +02:00
|
|
|
}
|
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
function graph_get_formatted_date($timestamp, $format1, $format2) {
|
|
|
|
global $config;
|
|
|
|
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($config['flash_charts']) {
|
2011-12-22 19:42:50 +01:00
|
|
|
$date = date("$format1 $format2", $timestamp);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$date = date($format1, $timestamp);
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($format2 != '') {
|
2011-12-22 19:42:50 +01:00
|
|
|
$date .= "\n".date($format2, $timestamp);
|
|
|
|
}
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
return $date;
|
2011-12-22 19:42:50 +01:00
|
|
|
}
|
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
/**
|
|
|
|
* Produces a combined/user defined graph
|
|
|
|
*
|
|
|
|
* @param array List of source modules
|
|
|
|
* @param array List of weighs for each module
|
|
|
|
* @param int Period (in seconds)
|
|
|
|
* @param int Width, in pixels
|
|
|
|
* @param int Height, in pixels
|
|
|
|
* @param string Title for graph
|
|
|
|
* @param string Unit name, for render in legend
|
|
|
|
* @param int Show events in graph (set to 1)
|
|
|
|
* @param int Show alerts in graph (set to 1)
|
|
|
|
* @param int Pure mode (without titles) (set to 1)
|
|
|
|
* @param int Date to start of getting info.
|
2011-10-26 17:18:51 +02:00
|
|
|
* @param mixed If is a projection graph this parameter will be module data with prediction data (the projection)
|
|
|
|
* or false in other case.
|
2011-04-05 18:11:53 +02:00
|
|
|
*
|
|
|
|
* @return Mixed
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function graphic_combined_module ($module_list, $weight_list, $period, $width, $height,
|
2012-06-25 12:42:52 +02:00
|
|
|
$title, $unit_name, $show_events = 0, $show_alerts = 0, $pure = 0,
|
|
|
|
$stacked = 0, $date = 0, $only_image = false, $homeurl = '', $ttl = 1, $projection = false, $prediction_period = false) {
|
2011-04-05 18:11:53 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$time_format_2 = '';
|
2012-01-03 18:41:04 +01:00
|
|
|
$temp_range = $period;
|
2011-04-18 18:07:20 +02:00
|
|
|
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($projection != false) {
|
2012-01-03 18:41:04 +01:00
|
|
|
if ($period < $prediction_period)
|
|
|
|
$temp_range = $prediction_period;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-07 16:34:03 +02:00
|
|
|
// Set the title and time format
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($temp_range <= SECONDS_6HOURS) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'H:i:s';
|
2011-04-07 16:34:03 +02:00
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
elseif ($temp_range < SECONDS_1DAY) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'H:i';
|
2011-04-07 16:34:03 +02:00
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
elseif ($temp_range < SECONDS_15DAYS) {
|
2011-12-22 19:42:50 +01:00
|
|
|
$time_format = 'M d';
|
|
|
|
$time_format_2 = 'H:i';
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($projection != false) {
|
2012-01-03 18:41:04 +01:00
|
|
|
$time_format_2 = 'H\h';
|
|
|
|
}
|
2011-04-07 16:34:03 +02:00
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
elseif ($temp_range <= SECONDS_1MONTH) {
|
2011-12-22 19:42:50 +01:00
|
|
|
$time_format = 'M d';
|
|
|
|
$time_format_2 = 'H\h';
|
2011-04-07 16:34:03 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-12-22 19:42:50 +01:00
|
|
|
$time_format = 'M d';
|
2011-04-07 16:34:03 +02:00
|
|
|
}
|
2011-10-26 17:18:51 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Set variables
|
2012-06-25 12:42:52 +02:00
|
|
|
if ($date == 0)
|
|
|
|
$date = get_system_time();
|
2011-04-05 18:11:53 +02:00
|
|
|
$datelimit = $date - $period;
|
|
|
|
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
2012-06-25 12:42:52 +02:00
|
|
|
$interval = (int) ($period / $resolution);
|
2011-10-26 17:18:51 +02:00
|
|
|
|
|
|
|
// If projection graph, fill with zero previous data to projection interval
|
2012-06-25 12:42:52 +02:00
|
|
|
if ($projection != false) {
|
2011-10-26 17:18:51 +02:00
|
|
|
$j = $datelimit;
|
|
|
|
$in_range = true;
|
|
|
|
while ($in_range){
|
2011-12-22 19:42:50 +01:00
|
|
|
$timestamp_f = graph_get_formatted_date($j, $time_format, $time_format_2);
|
|
|
|
|
2011-10-26 17:18:51 +02:00
|
|
|
//$timestamp_f = date('d M Y H:i:s', $j);
|
|
|
|
$before_projection[$timestamp_f] = 0;
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-10-26 17:18:51 +02:00
|
|
|
if ($j > $date){
|
|
|
|
$in_range = false;
|
2012-06-25 12:42:52 +02:00
|
|
|
}
|
|
|
|
$j = $j + $interval;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-10-26 17:18:51 +02:00
|
|
|
// Added support for projection graphs (normal_module + 1(prediction data))
|
2012-06-25 12:42:52 +02:00
|
|
|
if ($projection !== false) {
|
2011-10-26 17:18:51 +02:00
|
|
|
$module_number = count ($module_list) + 1;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
else {
|
|
|
|
$module_number = count ($module_list);
|
|
|
|
}
|
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// interval - This is the number of "rows" we are divided the time to fill data.
|
2012-06-25 12:42:52 +02:00
|
|
|
// more interval, more resolution, and slower.
|
2011-04-05 18:11:53 +02:00
|
|
|
// periodo - Gap of time, in seconds. This is now to (now-periodo) secs
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Init weights
|
|
|
|
for ($i = 0; $i < $module_number; $i++) {
|
|
|
|
if (! isset ($weight_list[$i])) {
|
|
|
|
$weight_list[$i] = 1;
|
2012-03-12 17:23:50 +01:00
|
|
|
}
|
|
|
|
else if ($weight_list[$i] == 0) {
|
2012-06-25 12:42:52 +02:00
|
|
|
$weight_list[$i] = 1;
|
2011-04-05 18:11:53 +02:00
|
|
|
}
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Set data containers
|
|
|
|
for ($i = 0; $i < $resolution; $i++) {
|
2012-06-25 12:42:52 +02:00
|
|
|
$timestamp = $datelimit + ($interval * $i);/*
|
|
|
|
$timestamp_short = date($time_format, $timestamp);
|
|
|
|
$long_index[$timestamp_short] = date(
|
|
|
|
html_entity_decode($config['date_format'], ENT_QUOTES, "UTF-8"), $timestamp);
|
|
|
|
$timestamp = $timestamp_short;*/
|
|
|
|
|
|
|
|
$graph[$timestamp]['count'] = 0;
|
|
|
|
$graph[$timestamp]['timestamp_bottom'] = $timestamp;
|
|
|
|
$graph[$timestamp]['timestamp_top'] = $timestamp + $interval;
|
|
|
|
$graph[$timestamp]['min'] = 0;
|
|
|
|
$graph[$timestamp]['max'] = 0;
|
|
|
|
$graph[$timestamp]['event'] = 0;
|
|
|
|
$graph[$timestamp]['alert'] = 0;
|
2011-04-05 18:11:53 +02:00
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-07 16:34:03 +02:00
|
|
|
$long_index = array();
|
2011-10-26 17:18:51 +02:00
|
|
|
|
2011-12-12 14:01:04 +01:00
|
|
|
$graph_values = array();
|
|
|
|
$module_name_list = array();
|
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Calculate data for each module
|
|
|
|
for ($i = 0; $i < $module_number; $i++) {
|
2011-10-26 17:18:51 +02:00
|
|
|
// If its a projection graph, first module will be data and second will be the projection
|
2012-06-25 12:42:52 +02:00
|
|
|
if ($projection != false && $i != 0) {
|
2011-10-26 17:18:51 +02:00
|
|
|
$agent_module_id = $module_list[0];
|
2012-06-25 12:42:52 +02:00
|
|
|
|
|
|
|
//Get and process agent name
|
|
|
|
$agent_name = io_safe_output(
|
|
|
|
modules_get_agentmodule_agent_name ($agent_module_id));
|
|
|
|
$agent_name = ui_print_truncate_text($agent_name, 'agent_small', false, true, false, '...', false);
|
|
|
|
|
|
|
|
|
2011-10-26 17:18:51 +02:00
|
|
|
$agent_id = agents_get_agent_id ($agent_name);
|
2012-06-25 12:42:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
//Get and process module name
|
|
|
|
$module_name = io_safe_output(
|
|
|
|
modules_get_agentmodule_name ($agent_module_id));
|
|
|
|
$module_name = sprintf(__("projection for %s"), $module_name);
|
|
|
|
$module_name = ui_print_truncate_text($module_name, 'module_small', false, true, false, '...', false);
|
|
|
|
|
|
|
|
|
|
|
|
$module_name_list[$i] = $agent_name ." / ". $module_name;
|
2011-10-26 17:18:51 +02:00
|
|
|
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
|
|
|
$module_type = modules_get_moduletype_name ($id_module_type);
|
2012-06-25 12:42:52 +02:00
|
|
|
$uncompressed_module = is_module_uncompressed ($module_type);
|
2012-03-12 17:23:50 +01:00
|
|
|
}
|
|
|
|
else {
|
2011-10-26 17:18:51 +02:00
|
|
|
$agent_module_id = $module_list[$i];
|
2012-06-25 12:42:52 +02:00
|
|
|
|
|
|
|
//Get and process agent name
|
|
|
|
$agent_name = io_safe_output(
|
|
|
|
modules_get_agentmodule_agent_name ($agent_module_id));
|
|
|
|
$agent_name = ui_print_truncate_text($agent_name, 'agent_small', false, true, false, '...', false);
|
|
|
|
|
|
|
|
|
2011-10-26 17:18:51 +02:00
|
|
|
$agent_id = agents_get_agent_id ($agent_name);
|
2012-06-25 12:42:52 +02:00
|
|
|
|
|
|
|
//Get and process module name
|
|
|
|
$module_name = io_safe_output(
|
|
|
|
modules_get_agentmodule_name ($agent_module_id));
|
|
|
|
$module_name = ui_print_truncate_text($module_name, 'module_small', false, true, false, '...', false);
|
|
|
|
|
|
|
|
$module_name_list[$i] = $agent_name . " / " . $module_name;
|
2011-10-26 17:18:51 +02:00
|
|
|
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
|
|
|
$module_type = modules_get_moduletype_name ($id_module_type);
|
2012-06-25 12:42:52 +02:00
|
|
|
$uncompressed_module = is_module_uncompressed ($module_type);
|
2011-10-26 17:18:51 +02:00
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
if ($uncompressed_module) {
|
|
|
|
$avg_only = 1;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Get event data (contains alert data too)
|
|
|
|
if ($show_events == 1 || $show_alerts == 1) {
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$events = db_get_all_rows_filter ('tevento',
|
2011-04-05 18:11:53 +02:00
|
|
|
array ('id_agentmodule' => $agent_module_id,
|
|
|
|
"utimestamp > $datelimit",
|
|
|
|
"utimestamp < $date",
|
|
|
|
'order' => 'utimestamp ASC'),
|
|
|
|
array ('evento', 'utimestamp', 'event_type'));
|
|
|
|
if ($events === false) {
|
|
|
|
$events = array ();
|
|
|
|
}
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Get module data
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data = db_get_all_rows_filter ('tagente_datos',
|
2011-04-05 18:11:53 +02:00
|
|
|
array ('id_agente_modulo' => $agent_module_id,
|
|
|
|
"utimestamp > $datelimit",
|
|
|
|
"utimestamp < $date",
|
|
|
|
'order' => 'utimestamp ASC'),
|
2012-06-14 12:11:35 +02:00
|
|
|
array ('datos', 'utimestamp'), 'AND', true);
|
2011-04-05 18:11:53 +02:00
|
|
|
if ($data === false) {
|
|
|
|
$data = array ();
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Uncompressed module data
|
|
|
|
if ($uncompressed_module) {
|
|
|
|
$min_necessary = 1;
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Compressed module data
|
2012-06-25 12:42:52 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-04-05 18:11:53 +02:00
|
|
|
// Get previous data
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$previous_data = modules_get_previous_data ($agent_module_id, $datelimit);
|
2011-04-05 18:11:53 +02:00
|
|
|
if ($previous_data !== false) {
|
|
|
|
$previous_data['utimestamp'] = $datelimit;
|
|
|
|
array_unshift ($data, $previous_data);
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Get next data
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$nextData = modules_get_next_data ($agent_module_id, $date);
|
2011-04-05 18:11:53 +02:00
|
|
|
if ($nextData !== false) {
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
} else if (count ($data) > 0) {
|
|
|
|
// Propagate the last known data to the end of the interval
|
|
|
|
$nextData = array_pop ($data);
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
$nextData['utimestamp'] = $date;
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
}
|
|
|
|
|
|
|
|
$min_necessary = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set initial conditions
|
|
|
|
$graph_values[$i] = array();
|
|
|
|
|
|
|
|
// Check available data
|
|
|
|
if (count ($data) < $min_necessary) {
|
|
|
|
continue;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Data iterator
|
|
|
|
$j = 0;
|
|
|
|
|
|
|
|
// Event iterator
|
|
|
|
$k = 0;
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Set initial conditions
|
2011-04-06 16:42:31 +02:00
|
|
|
|
|
|
|
//$graph_values[$i] = array();
|
|
|
|
$temp_graph_values = array();
|
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
if ($data[0]['utimestamp'] == $datelimit) {
|
|
|
|
$previous_data = $data[0]['datos'];
|
|
|
|
$j++;
|
2011-04-07 16:34:03 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-04-05 18:11:53 +02:00
|
|
|
$previous_data = 0;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-07 16:34:03 +02:00
|
|
|
$max = 0;
|
|
|
|
$min = null;
|
|
|
|
$avg = 0;
|
|
|
|
$countAvg = 0;
|
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Calculate chart data
|
|
|
|
for ($l = 0; $l < $resolution; $l++) {
|
2011-04-07 16:34:03 +02:00
|
|
|
$countAvg ++;
|
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
$timestamp = $datelimit + ($interval * $l);
|
2011-12-22 19:42:50 +01:00
|
|
|
$timestamp_short = graph_get_formatted_date($timestamp, $time_format, $time_format_2);
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-07 16:34:03 +02:00
|
|
|
$long_index[$timestamp_short] = date(
|
|
|
|
html_entity_decode($config['date_format'], ENT_QUOTES, "UTF-8"), $timestamp);
|
|
|
|
//$timestamp = $timestamp_short;
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
$total = 0;
|
|
|
|
$count = 0;
|
|
|
|
|
|
|
|
// Read data that falls in the current interval
|
|
|
|
$interval_min = $previous_data;
|
|
|
|
$interval_max = $previous_data;
|
|
|
|
while (isset ($data[$j]) && $data[$j]['utimestamp'] >= $timestamp && $data[$j]['utimestamp'] < ($timestamp + $interval)) {
|
|
|
|
if ($data[$j]['datos'] > $interval_max) {
|
|
|
|
$interval_max = $data[$j]['datos'];
|
2012-06-25 12:42:52 +02:00
|
|
|
}
|
|
|
|
else if ($data[$j]['datos'] < $interval_max) {
|
2011-04-05 18:11:53 +02:00
|
|
|
$interval_min = $data[$j]['datos'];
|
|
|
|
}
|
|
|
|
$total += $data[$j]['datos'];
|
|
|
|
$count++;
|
|
|
|
$j++;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Average
|
|
|
|
if ($count > 0) {
|
|
|
|
$total /= $count;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Read events and alerts that fall in the current interval
|
|
|
|
$event_value = 0;
|
|
|
|
$alert_value = 0;
|
|
|
|
while (isset ($events[$k]) && $events[$k]['utimestamp'] >= $timestamp && $events[$k]['utimestamp'] <= ($timestamp + $interval)) {
|
|
|
|
if ($show_events == 1) {
|
|
|
|
$event_value++;
|
|
|
|
}
|
|
|
|
if ($show_alerts == 1 && substr ($events[$k]['event_type'], 0, 5) == 'alert') {
|
|
|
|
$alert_value++;
|
|
|
|
}
|
|
|
|
$k++;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
// Data
|
|
|
|
if ($count > 0) {
|
2011-04-06 16:42:31 +02:00
|
|
|
//$graph_values[$i][$timestamp] = $total * $weight_list[$i];
|
2011-04-07 16:34:03 +02:00
|
|
|
$temp_graph_values[$timestamp_short] = $total * $weight_list[$i];
|
2011-04-06 16:42:31 +02:00
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
$previous_data = $total;
|
2012-06-25 12:42:52 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Compressed data
|
2011-04-05 18:11:53 +02:00
|
|
|
if ($uncompressed_module || ($timestamp > time ())) {
|
2011-04-06 16:42:31 +02:00
|
|
|
//$graph_values[$i][$timestamp] = 0;
|
2011-04-07 16:34:03 +02:00
|
|
|
$temp_graph_values[$timestamp_short] = 0;
|
2011-04-06 16:42:31 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
//$graph_values[$i][$timestamp] = $previous_data * $weight_list[$i];
|
2011-04-07 16:34:03 +02:00
|
|
|
$temp_graph_values[$timestamp_short] = $previous_data * $weight_list[$i];
|
2011-04-05 18:11:53 +02:00
|
|
|
}
|
|
|
|
}
|
2011-04-06 16:42:31 +02:00
|
|
|
|
2011-04-07 16:34:03 +02:00
|
|
|
//Extract max, min, avg
|
|
|
|
if ($max < $temp_graph_values[$timestamp_short]) {
|
|
|
|
$max = $temp_graph_values[$timestamp_short];
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($min)) {
|
|
|
|
if ($min > $temp_graph_values[$timestamp_short]) {
|
|
|
|
$min = $temp_graph_values[$timestamp_short];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$min = $temp_graph_values[$timestamp_short];
|
|
|
|
}
|
|
|
|
$avg += $temp_graph_values[$timestamp_short];
|
|
|
|
|
2011-10-26 17:18:51 +02:00
|
|
|
// Added to support projection graphs
|
2012-03-12 17:23:50 +01:00
|
|
|
if ($projection != false and $i != 0) {
|
2012-06-25 12:42:52 +02:00
|
|
|
$projection_data = array();
|
|
|
|
$projection_data = array_merge($before_projection, $projection);
|
|
|
|
$graph_values[$i] = $projection_data;
|
2012-03-12 17:23:50 +01:00
|
|
|
}
|
|
|
|
else {
|
2012-06-25 12:42:52 +02:00
|
|
|
$graph_values[$i] = $temp_graph_values;
|
2011-10-26 17:18:51 +02:00
|
|
|
}
|
2011-04-06 16:42:31 +02:00
|
|
|
}
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
|
2011-04-07 16:34:03 +02:00
|
|
|
//Add the max, min and avg in the legend
|
|
|
|
$avg = round($avg / $countAvg, 1);
|
2012-10-02 11:07:20 +02:00
|
|
|
|
|
|
|
$graph_stats = get_graph_statistics($graph_values[$i]);
|
|
|
|
|
|
|
|
$min = $graph_stats['min'];
|
|
|
|
$max = $graph_stats['max'];
|
|
|
|
$avg = $graph_stats['avg'];
|
|
|
|
$last = $graph_stats['last'];
|
2011-06-27 18:28:10 +02:00
|
|
|
$units = modules_get_unit($agent_module_id);
|
2011-04-18 18:45:20 +02:00
|
|
|
|
2011-10-26 17:18:51 +02:00
|
|
|
if ($projection == false or ($projection != false and $i == 0)){
|
2012-10-02 11:07:20 +02:00
|
|
|
$module_name_list[$i] .= ": ".__('Last').": $last $units; ".__("Max").": $max $units; ".__("Min").": $min $units; ". __("Avg").": $avg";
|
2011-10-26 17:18:51 +02:00
|
|
|
}
|
2011-04-07 16:34:03 +02:00
|
|
|
|
2011-04-06 16:42:31 +02:00
|
|
|
if ($weight_list[$i] != 1) {
|
2011-04-07 16:34:03 +02:00
|
|
|
//$module_name_list[$i] .= " (x". format_numeric ($weight_list[$i], 1).")";
|
2011-04-06 16:42:31 +02:00
|
|
|
$module_name_list[$i] .= " (x". format_numeric ($weight_list[$i], 1).")";
|
|
|
|
}
|
|
|
|
|
2011-04-07 16:34:03 +02:00
|
|
|
//$graph_values[$module_name_list[$i]] = $graph_values[$i];
|
|
|
|
//unset($graph_values[$i]);
|
|
|
|
|
|
|
|
//$graph_values[$i] = $graph_values[$i];
|
2011-04-06 16:42:31 +02:00
|
|
|
}
|
2011-04-07 16:34:03 +02:00
|
|
|
$temp = array();
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-06 16:42:31 +02:00
|
|
|
foreach ($graph_values as $graph_group => $point) {
|
|
|
|
foreach ($point as $timestamp_point => $point_value) {
|
|
|
|
$temp[$timestamp_point][$graph_group] = $point_value;
|
2011-04-05 18:11:53 +02:00
|
|
|
}
|
|
|
|
}
|
2011-04-06 16:42:31 +02:00
|
|
|
$graph_values = $temp;
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-06 16:42:31 +02:00
|
|
|
/*
|
2011-04-05 18:11:53 +02:00
|
|
|
for ($i = 0; $i < $module_number; $i++) {
|
2011-04-06 16:42:31 +02:00
|
|
|
if ($weight_list[$i] != 1) {
|
2011-04-05 18:11:53 +02:00
|
|
|
$module_name_list[$i] .= " (x". format_numeric ($weight_list[$i], 1).")";
|
2011-04-06 16:42:31 +02:00
|
|
|
}
|
2011-04-05 18:11:53 +02:00
|
|
|
}
|
2011-04-06 16:42:31 +02:00
|
|
|
*/
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-11-29 13:52:56 +01:00
|
|
|
$flash_charts = $config['flash_charts'];
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2011-04-13 17:11:51 +02:00
|
|
|
if ($only_image) {
|
|
|
|
$flash_charts = false;
|
|
|
|
}
|
2012-06-25 12:42:52 +02:00
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-06-25 12:42:52 +02:00
|
|
|
|
|
|
|
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
//Work around for fixed the agents name with huge size chars.
|
2012-06-25 12:42:52 +02:00
|
|
|
$fixed_font_size = $config['font_size'] - 1;
|
2012-10-02 17:15:27 +02:00
|
|
|
|
|
|
|
//Set graph color
|
|
|
|
|
|
|
|
$color = array();
|
|
|
|
|
|
|
|
$color[0] = array('border' => '#000000', 'color' => $config['graph_color1'], 'alpha' => 50);
|
|
|
|
$color[1] = array('border' => '#000000', 'color' => $config['graph_color2'], 'alpha' => 50);
|
|
|
|
$color[2] = array('border' => '#000000', 'color' => $config['graph_color3'], 'alpha' => 50);
|
|
|
|
|
2011-04-05 18:11:53 +02:00
|
|
|
switch ($stacked) {
|
2011-04-12 18:30:24 +02:00
|
|
|
case GRAPH_AREA:
|
2011-04-13 17:11:51 +02:00
|
|
|
return area_graph($flash_charts, $graph_values, $width, $height,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$color, $module_name_list, $long_index, ui_get_full_url("images/image_problem.opaque.png"),
|
2012-03-01 17:41:02 +01:00
|
|
|
"", "", $homeurl, $water_mark,
|
2012-06-25 12:42:52 +02:00
|
|
|
$config['fontpath'], $fixed_font_size, "", $ttl);
|
2011-04-05 18:11:53 +02:00
|
|
|
break;
|
|
|
|
default:
|
2011-11-29 17:07:44 +01:00
|
|
|
case GRAPH_STACKED_AREA:
|
2011-04-13 17:11:51 +02:00
|
|
|
return stacked_area_graph($flash_charts, $graph_values, $width, $height,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$color, $module_name_list, $long_index, ui_get_full_url("images/image_problem.opaque.png"),
|
2012-03-01 17:41:02 +01:00
|
|
|
"", "", $water_mark,
|
2012-06-25 12:42:52 +02:00
|
|
|
$config['fontpath'], $fixed_font_size, "", $ttl, $homeurl);
|
2011-04-05 18:11:53 +02:00
|
|
|
break;
|
2011-11-29 17:07:44 +01:00
|
|
|
case GRAPH_LINE:
|
2011-04-13 17:11:51 +02:00
|
|
|
return line_graph($flash_charts, $graph_values, $width, $height,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$color, $module_name_list, $long_index, ui_get_full_url("images/image_problem.opaque.png"),
|
2012-03-01 17:41:02 +01:00
|
|
|
"", "", $water_mark,
|
2012-06-25 12:42:52 +02:00
|
|
|
$config['fontpath'], $fixed_font_size, "", $ttl, $homeurl);
|
2011-04-05 18:11:53 +02:00
|
|
|
break;
|
2011-04-12 18:30:24 +02:00
|
|
|
case GRAPH_STACKED_LINE:
|
2011-04-13 17:11:51 +02:00
|
|
|
return stacked_line_graph($flash_charts, $graph_values, $width, $height,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$color, $module_name_list, $long_index, ui_get_full_url("images/image_problem.opaque.png"),
|
2012-03-01 17:41:02 +01:00
|
|
|
"", "", $water_mark,
|
2012-06-25 12:42:52 +02:00
|
|
|
$config['fontpath'], $fixed_font_size, "", $ttl, $homeurl);
|
2011-04-05 18:11:53 +02:00
|
|
|
break;
|
2011-04-12 18:30:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a graph with access data of agents
|
|
|
|
*
|
|
|
|
* @param integer id_agent Agent ID
|
|
|
|
* @param integer width pie graph width
|
|
|
|
* @param integer height pie graph height
|
|
|
|
* @param integer period time period
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function graphic_agentaccess ($id_agent, $width, $height, $period = 0) {
|
2011-04-12 18:30:24 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2011-04-18 16:05:54 +02:00
|
|
|
|
2011-04-12 18:30:24 +02:00
|
|
|
$data = array ();
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2011-04-12 18:30:24 +02:00
|
|
|
$resolution = $config["graph_res"] * ($period * 2 / $width); // Number of "slices" we want in graph
|
|
|
|
|
|
|
|
$interval = (int) ($period / $resolution);
|
|
|
|
$date = get_system_time ();
|
|
|
|
$datelimit = $date - $period;
|
|
|
|
$periodtime = floor ($period / $interval);
|
|
|
|
$time = array ();
|
|
|
|
$data = array ();
|
2011-04-05 18:11:53 +02:00
|
|
|
|
2011-08-19 17:33:41 +02:00
|
|
|
$empty_data = true;
|
2011-04-12 18:30:24 +02:00
|
|
|
for ($i = 0; $i < $interval; $i++) {
|
|
|
|
$bottom = $datelimit + ($periodtime * $i);
|
|
|
|
if (! $graphic_type) {
|
|
|
|
$name = date('G:i', $bottom);
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-04-12 18:30:24 +02:00
|
|
|
$name = $bottom;
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2011-04-12 18:30:24 +02:00
|
|
|
$top = $datelimit + ($periodtime * ($i + 1));
|
2011-05-16 18:56:14 +02:00
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
|
|
|
$data[$name]['data'] = (int) db_get_value_filter ('COUNT(*)',
|
|
|
|
'tagent_access',
|
|
|
|
array ('id_agent' => $id_agent,
|
|
|
|
'utimestamp > '.$bottom,
|
|
|
|
'utimestamp < '.$top));
|
|
|
|
break;
|
|
|
|
case "oracle":
|
|
|
|
$data[$name]['data'] = (int) db_get_value_filter ('count(*)',
|
|
|
|
'tagent_access',
|
|
|
|
array ('id_agent' => $id_agent,
|
|
|
|
'utimestamp > '.$bottom,
|
|
|
|
'utimestamp < '.$top));
|
|
|
|
break;
|
2011-08-19 17:33:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($data[$name]['data'] != 0) {
|
|
|
|
$empty_data = false;
|
|
|
|
}
|
2011-04-12 18:30:24 +02:00
|
|
|
}
|
2011-04-05 18:11:53 +02:00
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-03-01 17:41:02 +01:00
|
|
|
|
2011-08-19 17:33:41 +02:00
|
|
|
if ($empty_data)
|
|
|
|
echo fs_error_image();
|
|
|
|
else {
|
|
|
|
echo area_graph($config['flash_charts'], $data, $width, $height,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
null, null, null, ui_get_full_url("images/image_problem.opaque.png"), "", "", "",
|
|
|
|
$water_mark,
|
|
|
|
$config['fontpath'], $config['font_size'], "");
|
2011-08-19 17:33:41 +02:00
|
|
|
}
|
2011-04-12 18:30:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a pie graph with events data of agent
|
|
|
|
*
|
|
|
|
* @param integer width pie graph width
|
|
|
|
* @param integer height pie graph height
|
|
|
|
* @param integer id_agent Agent ID
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function graph_event_module ($width = 300, $height = 200, $id_agent) {
|
2011-04-12 18:30:24 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2011-04-12 18:30:24 +02:00
|
|
|
$data = array ();
|
|
|
|
$max_items = 6;
|
2011-05-16 18:56:14 +02:00
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_evento) as count_number, nombre
|
|
|
|
FROM tevento, tagente_modulo
|
|
|
|
WHERE id_agentmodule = id_agente_modulo
|
|
|
|
AND disabled = 0 AND tevento.id_agente = %d
|
|
|
|
GROUP BY id_agentmodule, nombre LIMIT %d', $id_agent, $max_items);
|
|
|
|
break;
|
|
|
|
case "oracle":
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_evento) as count_number, dbms_lob.substr(nombre,4000,1) as nombre
|
|
|
|
FROM tevento, tagente_modulo
|
|
|
|
WHERE (id_agentmodule = id_agente_modulo
|
|
|
|
AND disabled = 0 AND tevento.id_agente = %d) AND rownum <= %d
|
|
|
|
GROUP BY id_agentmodule, dbms_lob.substr(nombre,4000,1)', $id_agent, $max_items);
|
|
|
|
break;
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$events = db_get_all_rows_sql ($sql);
|
2011-04-12 18:30:24 +02:00
|
|
|
if ($events === false) {
|
|
|
|
if (! $graphic_type) {
|
2011-07-19 11:28:09 +02:00
|
|
|
return fs_error_image ();
|
2011-04-12 18:30:24 +02:00
|
|
|
}
|
|
|
|
graphic_error ();
|
|
|
|
return;
|
2011-04-05 18:11:53 +02:00
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
|
|
|
|
2011-04-12 18:30:24 +02:00
|
|
|
foreach ($events as $event) {
|
|
|
|
$data[$event['nombre'].' ('.$event['count_number'].')'] = $event["count_number"];
|
|
|
|
}
|
2011-04-05 18:11:53 +02:00
|
|
|
|
2011-04-12 18:30:24 +02:00
|
|
|
/* System events */
|
|
|
|
$sql = "SELECT COUNT(*) FROM tevento WHERE id_agentmodule = 0 AND id_agente = $id_agent";
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$value = db_get_sql ($sql);
|
2011-04-12 18:30:24 +02:00
|
|
|
if ($value > 0) {
|
|
|
|
$data[__('System').' ('.$value.')'] = $value;
|
2011-04-05 18:11:53 +02:00
|
|
|
}
|
2011-04-12 18:30:24 +02:00
|
|
|
asort ($data);
|
2011-04-05 18:11:53 +02:00
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-03-01 17:41:02 +01:00
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, $width, $height, __("other"),
|
2012-03-01 17:41:02 +01:00
|
|
|
'', $water_mark,
|
2011-04-20 17:54:31 +02:00
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-03-30 14:34:25 +02:00
|
|
|
}
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/graphs/functions_gd.php,
include/graphs/fgraph.php, include/functions_visual_map.php,
include/fgraph.php, operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php. operation/agentes/stat_win.php,
operation/servers/view_server.php, operation/servers/view_server_detail.php,
mobile/operation/agents/tactical.php, general/logon_ok.php,
godmode/reporting/graph_builder.preview.php: added function "progress_bar2"
and changed in source code of Pandora.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4199 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 11:29:10 +02:00
|
|
|
|
2012-06-12 21:26:26 +02:00
|
|
|
function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value_text = false, $color = false, $options = false) {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/graphs/functions_gd.php,
include/graphs/fgraph.php, include/functions_visual_map.php,
include/fgraph.php, operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php. operation/agentes/stat_win.php,
operation/servers/view_server.php, operation/servers/view_server_detail.php,
mobile/operation/agents/tactical.php, general/logon_ok.php,
godmode/reporting/graph_builder.preview.php: added function "progress_bar2"
and changed in source code of Pandora.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4199 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 11:29:10 +02:00
|
|
|
global $config;
|
|
|
|
|
|
|
|
$out_of_lim_str = __("Out of limits");
|
|
|
|
$title = "";
|
2011-06-13 13:12:32 +02:00
|
|
|
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
if ($value_text === false) {
|
|
|
|
$value_text = $progress . "%";
|
|
|
|
}
|
|
|
|
|
|
|
|
$colorRGB = '';
|
|
|
|
if ($color !== false) {
|
|
|
|
$colorRGB = html_html2rgb($color);
|
|
|
|
$colorRGB = implode('|', $colorRGB);
|
|
|
|
}
|
|
|
|
|
2012-06-12 21:26:26 +02:00
|
|
|
$class_tag = '';
|
|
|
|
$id_tag = '';
|
|
|
|
if ($options !== false) {
|
|
|
|
foreach ($options as $option_type => $option_value) {
|
|
|
|
if ($option_type == 'class')
|
|
|
|
$class_tag = ' class="' . $option_value . '" ';
|
|
|
|
else if ($option_type == 'id')
|
|
|
|
$id_tag = ' id="' . $option_value . '" ';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-13 13:12:32 +02:00
|
|
|
require_once("include_graph_dependencies.php");
|
2011-06-14 16:08:14 +02:00
|
|
|
include_graphs_dependencies($config['homedir'].'/');
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$src = ui_get_full_url(
|
|
|
|
"/include/graphs/fgraph.php?homeurl=../../&graph_type=progressbar" .
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
"&width=".$width."&height=".$height."&progress=".$progress.
|
|
|
|
"&mode=" . $mode . "&out_of_lim_str=".$out_of_lim_str .
|
|
|
|
"&title=".$title."&font=".$config['fontpath']."&value_text=". $value_text .
|
2012-11-27 12:53:31 +01:00
|
|
|
"&colorRGB=". $colorRGB, false, false, false
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
return "<img title='" . $title . "' alt='" . $title . "'" . $class_tag . $id_tag .
|
|
|
|
" src='" . $src . "' />";
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
}
|
2011-06-13 13:12:32 +02:00
|
|
|
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
function progress_bubble($progress, $width, $height, $title = '', $mode = 1, $value_text = false, $color = false) {
|
|
|
|
global $config;
|
|
|
|
|
|
|
|
$out_of_lim_str = __("Out of limits");
|
|
|
|
$title = "";
|
|
|
|
|
|
|
|
if ($value_text === false) {
|
|
|
|
$value_text = $progress . "%";
|
|
|
|
}
|
|
|
|
|
|
|
|
$colorRGB = '';
|
|
|
|
if ($color !== false) {
|
|
|
|
$colorRGB = html_html2rgb($color);
|
|
|
|
$colorRGB = implode('|', $colorRGB);
|
|
|
|
}
|
|
|
|
|
|
|
|
require_once("include_graph_dependencies.php");
|
|
|
|
include_graphs_dependencies($config['homedir'].'/');
|
|
|
|
|
|
|
|
return "<img title='" . $title . "' alt='" . $title . "'" .
|
2012-04-24 15:45:02 +02:00
|
|
|
" src='" . $config['homeurl'] . "/include/graphs/fgraph.php?homeurl=../../&graph_type=progressbubble" .
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
"&width=".$width."&height=".$height."&progress=".$progress.
|
|
|
|
"&mode=" . $mode . "&out_of_lim_str=".$out_of_lim_str .
|
|
|
|
"&title=".$title."&font=".$config['fontpath']."&value_text=". $value_text .
|
|
|
|
"&colorRGB=". $colorRGB . "' />";
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/graphs/functions_gd.php,
include/graphs/fgraph.php, include/functions_visual_map.php,
include/fgraph.php, operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php. operation/agentes/stat_win.php,
operation/servers/view_server.php, operation/servers/view_server_detail.php,
mobile/operation/agents/tactical.php, general/logon_ok.php,
godmode/reporting/graph_builder.preview.php: added function "progress_bar2"
and changed in source code of Pandora.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4199 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 11:29:10 +02:00
|
|
|
}
|
2011-04-13 15:01:37 +02:00
|
|
|
|
2012-11-08 08:42:11 +01:00
|
|
|
function graph_sla_slicebar ($id, $period, $sla_min, $sla_max, $date, $daysWeek = null, $time_from = null, $time_to = null, $width, $height, $home_url, $ttl = 1, $data = false) {
|
2011-04-13 15:01:37 +02:00
|
|
|
global $config;
|
2012-04-24 15:45:02 +02:00
|
|
|
|
2012-11-08 08:42:11 +01:00
|
|
|
// If the data is not provided, we got it
|
|
|
|
if($data === false) {
|
|
|
|
$data = reporting_get_agentmodule_sla_array ($id, $period, $sla_min, $sla_max, $date, $daysWeek, $time_from, $time_to);
|
|
|
|
}
|
|
|
|
|
|
|
|
$colors = array(1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN, 5 => COL_NOTINIT);
|
2012-04-24 15:45:02 +02:00
|
|
|
|
2011-05-09 17:20:58 +02:00
|
|
|
return slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'],
|
2012-06-20 19:11:53 +02:00
|
|
|
$config['round_corner'], $home_url, $ttl);
|
2011-04-13 15:01:37 +02:00
|
|
|
}
|
2011-04-13 17:58:59 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a pie graph with purge data of agent
|
|
|
|
*
|
|
|
|
* @param integer id_agent ID of agent to show
|
|
|
|
* @param integer width pie graph width
|
|
|
|
* @param integer height pie graph height
|
|
|
|
*/
|
2011-07-21 11:24:41 +02:00
|
|
|
function grafico_db_agentes_purge ($id_agent, $width = 380, $height = 300) {
|
2011-04-13 17:58:59 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2011-04-20 11:23:54 +02:00
|
|
|
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-13 17:58:59 +02:00
|
|
|
if ($id_agent < 1) {
|
|
|
|
$id_agent = -1;
|
|
|
|
$query = "";
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
|
|
|
$modules = agents_get_modules ($id_agent);
|
2011-04-13 17:58:59 +02:00
|
|
|
$query = sprintf (" AND id_agente_modulo IN (%s)", implode (",", array_keys ($modules)));
|
|
|
|
}
|
|
|
|
|
|
|
|
// All data (now)
|
|
|
|
$time["all"] = get_system_time ();
|
|
|
|
// 1 day ago
|
2012-07-18 15:25:51 +02:00
|
|
|
$time["1day"] = $time["all"] - SECONDS_1DAY;
|
2011-04-13 17:58:59 +02:00
|
|
|
// 1 week ago
|
2012-07-18 15:25:51 +02:00
|
|
|
$time["1week"] = $time["all"] - SECONDS_1WEEK;
|
2011-04-13 17:58:59 +02:00
|
|
|
// 1 month ago
|
2012-07-18 15:25:51 +02:00
|
|
|
$time["1month"] = $time["all"] - SECONDS_1MONTH;
|
2011-04-13 17:58:59 +02:00
|
|
|
// Three months ago
|
2012-07-18 15:25:51 +02:00
|
|
|
$time["3month"] = $time["all"] - SECONDS_3MONTHS;
|
2011-04-13 17:58:59 +02:00
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data[__("Today")] = db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos WHERE utimestamp > %d %s", $time["1day"], $query), 0, true);
|
|
|
|
$data["1 ".__("Week")] = db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos WHERE utimestamp > %d %s", $time["1week"], $query), 0, true);
|
|
|
|
$data["1 ".__("Month")] = db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos WHERE utimestamp > %d %s", $time["1month"], $query), 0, true);
|
|
|
|
$data["3 ".__("Months")] = db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos WHERE utimestamp > %d %s", $time["3month"], $query), 0, true);
|
|
|
|
$data[__("Older")] = db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos WHERE 1=1 %s", $query));
|
2011-04-13 17:58:59 +02:00
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data[__("Today")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["1day"], $query), 0, true);
|
|
|
|
$data["1 ".__("Week")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["1week"], $query), 0, true);
|
|
|
|
$data["1 ".__("Month")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["1month"], $query), 0, true);
|
|
|
|
$data["3 ".__("Months")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["3month"], $query), 0, true);
|
|
|
|
$data[__("Older")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_string WHERE 1=1 %s", $query), 0, true);
|
2012-04-24 15:45:02 +02:00
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data[__("Today")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_log4x WHERE utimestamp > %d %s", $time["1day"], $query), 0, true);
|
|
|
|
$data["1 ".__("Week")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_log4x WHERE utimestamp > %d %s", $time["1week"], $query), 0, true);
|
|
|
|
$data["1 ".__("Month")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_log4x WHERE utimestamp > %d %s", $time["1month"], $query), 0, true);
|
|
|
|
$data["3 ".__("Months")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_log4x WHERE utimestamp > %d %s", $time["3month"], $query), 0, true);
|
|
|
|
$data[__("Older")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_log4x WHERE 1=1 %s", $query), 0, true);
|
2012-04-24 15:45:02 +02:00
|
|
|
|
2011-04-13 17:58:59 +02:00
|
|
|
$data[__("Older")] = $data[__("Older")] - $data["3 ".__("Months")];
|
2011-09-01 17:03:00 +02:00
|
|
|
|
|
|
|
if ($data[__("Today")] == 0 && $data["1 ".__("Week")] == 0 &&
|
|
|
|
$data["1 ".__("Month")] == 0 && $data["3 ".__("Months")] == 0 && $data[__("Older")] == 0) {
|
|
|
|
return html_print_image('images/image_problem.png', true);
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, $width, $height,
|
2012-03-01 17:41:02 +01:00
|
|
|
__('Other'), '', $water_mark,
|
2011-04-20 17:54:31 +02:00
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 17:58:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a horizontal bar graph with packets data of agents
|
|
|
|
*
|
|
|
|
* @param integer width pie graph width
|
|
|
|
* @param integer height pie graph height
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_db_agentes_paquetes($width = 380, $height = 300) {
|
2011-04-13 17:58:59 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2011-04-20 11:23:54 +02:00
|
|
|
|
2011-04-13 17:58:59 +02:00
|
|
|
$data = array ();
|
|
|
|
$legend = array ();
|
|
|
|
|
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
|
|
|
$agents = agents_get_group_agents (array_keys (users_get_groups ()), false, "none");
|
|
|
|
$count = agents_get_modules_data_count (array_keys ($agents));
|
2011-04-13 17:58:59 +02:00
|
|
|
unset ($count["total"]);
|
|
|
|
arsort ($count, SORT_NUMERIC);
|
|
|
|
$count = array_slice ($count, 0, 8, true);
|
|
|
|
|
|
|
|
foreach ($count as $agent_id => $value) {
|
|
|
|
$data[$agents[$agent_id]]['g'] = $value;
|
|
|
|
}
|
|
|
|
|
2012-03-05 11:26:34 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-03-05 11:26:34 +01:00
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return hbar_graph($config['flash_charts'], $data, $width, $height, array(),
|
2011-04-20 17:54:31 +02:00
|
|
|
$legend, "", "", true, "",
|
2012-03-05 11:26:34 +01:00
|
|
|
$water_mark,
|
2011-04-25 13:48:27 +02:00
|
|
|
$config['fontpath'], $config['font_size'], false);
|
2011-04-13 17:58:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a horizontal bar graph with modules data of agents
|
|
|
|
*
|
|
|
|
* @param integer height graph height
|
|
|
|
* @param integer width graph width
|
|
|
|
*/
|
2012-03-05 11:26:34 +01:00
|
|
|
function graph_db_agentes_modulos($width, $height) {
|
2011-04-13 17:58:59 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2011-04-20 11:23:54 +02:00
|
|
|
|
2011-04-13 17:58:59 +02:00
|
|
|
$data = array ();
|
|
|
|
|
|
|
|
switch ($config['dbtype']){
|
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$modules = db_get_all_rows_sql ('SELECT COUNT(id_agente_modulo), id_agente
|
2011-04-13 17:58:59 +02:00
|
|
|
FROM tagente_modulo
|
|
|
|
GROUP BY id_agente
|
|
|
|
ORDER BY 1 DESC LIMIT 10');
|
|
|
|
break;
|
|
|
|
case "oracle":
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$modules = db_get_all_rows_sql ('SELECT COUNT(id_agente_modulo), id_agente
|
2011-04-13 17:58:59 +02:00
|
|
|
FROM tagente_modulo
|
|
|
|
WHERE rownum <= 10
|
|
|
|
GROUP BY id_agente
|
|
|
|
ORDER BY 1 DESC');
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if ($modules === false)
|
|
|
|
$modules = array ();
|
|
|
|
|
|
|
|
foreach ($modules as $module) {
|
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
|
|
|
$agent_name = agents_get_name ($module['id_agente'], "none");
|
2011-04-13 17:58:59 +02:00
|
|
|
switch ($config['dbtype']){
|
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
|
|
|
$data[$agent_name]['g'] = $module['COUNT(id_agente_modulo)'];
|
|
|
|
break;
|
|
|
|
case "oracle":
|
|
|
|
$data[$agent_name]['g'] = $module['count(id_agente_modulo)'];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-03-01 17:41:02 +01:00
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return hbar_graph($config['flash_charts'], $data, $width, $height, array(),
|
2011-04-20 17:54:31 +02:00
|
|
|
array(), "", "", true, "",
|
2012-03-01 17:41:02 +01:00
|
|
|
$water_mark,
|
2011-04-25 13:48:27 +02:00
|
|
|
$config['fontpath'], $config['font_size'], false);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a pie graph with users activity in a period of time
|
|
|
|
*
|
|
|
|
* @param integer width pie graph width
|
|
|
|
* @param integer height pie graph height
|
|
|
|
* @param integer period time period
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function graphic_user_activity ($width = 350, $height = 230) {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$data = array ();
|
|
|
|
$max_items = 5;
|
|
|
|
switch ($config['dbtype']) {
|
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_usuario) n_incidents, id_usuario
|
|
|
|
FROM tsesion
|
|
|
|
GROUP BY id_usuario
|
|
|
|
ORDER BY 1 DESC LIMIT %d', $max_items);
|
|
|
|
break;
|
|
|
|
case "oracle":
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_usuario) n_incidents, id_usuario
|
|
|
|
FROM tsesion
|
|
|
|
WHERE rownum <= %d
|
|
|
|
GROUP BY id_usuario
|
|
|
|
ORDER BY 1 DESC', $max_items);
|
|
|
|
break;
|
|
|
|
}
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$logins = db_get_all_rows_sql ($sql);
|
2011-04-13 17:58:59 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
if($logins == false) {
|
|
|
|
$logins = array();
|
|
|
|
}
|
|
|
|
foreach ($logins as $login) {
|
|
|
|
$data[$login['id_usuario']] = $login['n_incidents'];
|
|
|
|
}
|
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, $width, $height,
|
2011-04-20 17:54:31 +02:00
|
|
|
__('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png",
|
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
2011-04-13 17:58:59 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
/**
|
|
|
|
* Print a pie graph with priodity incident
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_incidente_prioridad () {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-04-24 15:45:02 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$data_tmp = array (0, 0, 0, 0, 0, 0);
|
|
|
|
$sql = 'SELECT COUNT(id_incidencia) n_incidents, prioridad
|
|
|
|
FROM tincidencia
|
|
|
|
GROUP BY prioridad
|
|
|
|
ORDER BY 2 DESC';
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$incidents = db_get_all_rows_sql ($sql);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
|
|
|
|
if($incidents == false) {
|
|
|
|
$incidents = array();
|
2011-04-13 17:58:59 +02:00
|
|
|
}
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
foreach ($incidents as $incident) {
|
|
|
|
if ($incident['prioridad'] < 5)
|
|
|
|
$data_tmp[$incident['prioridad']] = $incident['n_incidents'];
|
|
|
|
else
|
|
|
|
$data_tmp[5] += $incident['n_incidents'];
|
|
|
|
}
|
|
|
|
$data = array (__('Informative') => $data_tmp[0],
|
2012-07-18 15:25:51 +02:00
|
|
|
__('Low') => $data_tmp[1],
|
|
|
|
__('Medium') => $data_tmp[2],
|
|
|
|
__('Serious') => $data_tmp[3],
|
|
|
|
__('Very serious') => $data_tmp[4],
|
|
|
|
__('Maintenance') => $data_tmp[5]);
|
2011-04-13 17:58:59 +02:00
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, 320, 200,
|
2011-04-20 17:54:31 +02:00
|
|
|
__('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png",
|
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
2011-04-13 17:58:59 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
/**
|
|
|
|
* Print a pie graph with incidents data
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function graph_incidents_status () {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
|
|
|
$data = array (0, 0, 0, 0);
|
2011-04-13 17:58:59 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$data = array ();
|
|
|
|
$data[__('Open incident')] = 0;
|
|
|
|
$data[__('Closed incident')] = 0;
|
|
|
|
$data[__('Outdated')] = 0;
|
|
|
|
$data[__('Invalid')] = 0;
|
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$incidents = db_get_all_rows_filter ('tincidencia',
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
array ('estado' => array (0, 2, 3, 13)),
|
|
|
|
array ('estado'));
|
|
|
|
if ($incidents === false)
|
|
|
|
$incidents = array ();
|
|
|
|
foreach ($incidents as $incident) {
|
|
|
|
if ($incident["estado"] == 0)
|
|
|
|
$data[__("Open incident")]++;
|
|
|
|
if ($incident["estado"] == 2)
|
|
|
|
$data[__("Closed incident")]++;
|
|
|
|
if ($incident["estado"] == 3)
|
|
|
|
$data[__("Outdated")]++;
|
|
|
|
if ($incident["estado"] == 13)
|
|
|
|
$data[__("Invalid")]++;
|
|
|
|
}
|
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, 370, 180,
|
2011-04-20 17:54:31 +02:00
|
|
|
__('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png",
|
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a pie graph with incident data by group
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function graphic_incident_group () {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-04-24 15:45:02 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$data = array ();
|
|
|
|
$max_items = 5;
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_incidencia) n_incidents, nombre
|
|
|
|
FROM tincidencia,tgrupo
|
|
|
|
WHERE tgrupo.id_grupo = tincidencia.id_grupo
|
2012-03-31 08:45:05 +02:00
|
|
|
GROUP BY tgrupo.id_grupo, nombre ORDER BY 1 DESC LIMIT %d',
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$max_items);
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$incidents = db_get_all_rows_sql ($sql);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
|
2011-08-11 19:09:21 +02:00
|
|
|
$sql = sprintf ('SELECT COUNT(id_incidencia) n_incidents
|
|
|
|
FROM tincidencia
|
|
|
|
WHERE tincidencia.id_grupo = 0');
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-08-11 19:09:21 +02:00
|
|
|
$incidents_all = db_get_value_sql($sql);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
if($incidents == false) {
|
|
|
|
$incidents = array();
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
foreach ($incidents as $incident) {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$data[$incident['nombre']] = $incident['n_incidents'];
|
|
|
|
}
|
|
|
|
|
2011-08-11 19:09:21 +02:00
|
|
|
if($incidents_all > 0) {
|
|
|
|
$data[__('All')] = $incidents_all;
|
|
|
|
}
|
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, 320, 200,
|
2011-04-20 17:54:31 +02:00
|
|
|
__('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png",
|
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a graph with access data of agents
|
|
|
|
*
|
|
|
|
* @param integer id_agent Agent ID
|
|
|
|
* @param integer width pie graph width
|
|
|
|
* @param integer height pie graph height
|
|
|
|
* @param integer period time period
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function graphic_incident_user () {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-04-24 15:45:02 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$data = array ();
|
|
|
|
$max_items = 5;
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_incidencia) n_incidents, id_usuario
|
|
|
|
FROM tincidencia
|
|
|
|
GROUP BY id_usuario
|
|
|
|
ORDER BY 1 DESC LIMIT %d', $max_items);
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$incidents = db_get_all_rows_sql ($sql);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
|
|
|
|
if($incidents == false) {
|
|
|
|
$incidents = array();
|
|
|
|
}
|
|
|
|
foreach ($incidents as $incident) {
|
|
|
|
if($incident['id_usuario'] == false) {
|
|
|
|
$name = __('System');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$name = $incident['id_usuario'];
|
|
|
|
}
|
2012-04-24 15:45:02 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$data[$name] = $incident['n_incidents'];
|
|
|
|
}
|
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, 320, 200,
|
2011-04-20 17:54:31 +02:00
|
|
|
__('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png",
|
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a pie graph with access data of incidents source
|
|
|
|
*
|
|
|
|
* @param integer width pie graph width
|
|
|
|
* @param integer height pie graph height
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function graphic_incident_source($width = 320, $height = 200) {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$data = array ();
|
|
|
|
$max_items = 5;
|
|
|
|
|
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_incidencia) n_incident, origen
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
FROM tincidencia
|
|
|
|
GROUP BY `origen`
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
ORDER BY 1 DESC LIMIT %d', $max_items);
|
|
|
|
break;
|
|
|
|
case "postgresql":
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_incidencia) n_incident, origen
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
FROM tincidencia
|
|
|
|
GROUP BY "origen"
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
ORDER BY 1 DESC LIMIT %d', $max_items);
|
|
|
|
break;
|
|
|
|
case "oracle":
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_incidencia) n_incident, origen
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
FROM tincidencia
|
|
|
|
WHERE rownum <= %d
|
|
|
|
GROUP BY origen
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
ORDER BY 1 DESC', $max_items);
|
|
|
|
break;
|
|
|
|
}
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$origins = db_get_all_rows_sql ($sql);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
|
|
|
|
if($origins == false) {
|
|
|
|
$origins = array();
|
|
|
|
}
|
|
|
|
foreach ($origins as $origin) {
|
|
|
|
$data[$origin['origen']] = $origin['n_incident'];
|
|
|
|
}
|
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, $width, $height,
|
2011-04-20 17:54:31 +02:00
|
|
|
__('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png",
|
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a pie graph with events data of group
|
|
|
|
*
|
|
|
|
* @param integer width pie graph width
|
|
|
|
* @param integer height pie graph height
|
|
|
|
* @param string url
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_eventos_grupo ($width = 300, $height = 200, $url = "") {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$url = html_entity_decode (rawurldecode ($url), ENT_QUOTES); //It was urlencoded, so we urldecode it
|
|
|
|
$data = array ();
|
|
|
|
$loop = 0;
|
|
|
|
define ('NUM_PIECES_PIE', 6);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$badstrings = array (";", "SELECT ", "DELETE ", "UPDATE ", "INSERT ", "EXEC");
|
|
|
|
//remove bad strings from the query so queries like ; DELETE FROM don't pass
|
|
|
|
$url = str_ireplace ($badstrings, "", $url);
|
|
|
|
|
|
|
|
//This will give the distinct id_agente, give the id_grupo that goes
|
|
|
|
//with it and then the number of times it occured. GROUP BY statement
|
|
|
|
//is required if both DISTINCT() and COUNT() are in the statement
|
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$sql = sprintf ('SELECT DISTINCT(id_agente) AS id_agente,
|
|
|
|
id_grupo, COUNT(id_agente) AS count
|
|
|
|
FROM tevento
|
|
|
|
WHERE 1=1 %s
|
|
|
|
GROUP BY id_agente
|
|
|
|
ORDER BY count DESC', $url);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
break;
|
2012-03-25 14:32:18 +02:00
|
|
|
case "postgresql":
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
case "oracle":
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$sql = sprintf ('SELECT DISTINCT(id_agente) AS id_agente,
|
|
|
|
id_grupo, COUNT(id_agente) AS count
|
|
|
|
FROM tevento
|
|
|
|
WHERE 1=1 %s
|
|
|
|
GROUP BY id_agente, id_grupo
|
|
|
|
ORDER BY count DESC', $url);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$result = db_get_all_rows_sql ($sql);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
if ($result === false) {
|
|
|
|
$result = array();
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
foreach ($result as $row) {
|
|
|
|
if (!check_acl ($config["id_user"], $row["id_grupo"], "AR") == 1)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if ($loop >= NUM_PIECES_PIE) {
|
|
|
|
if (!isset ($data[__('Other')]))
|
|
|
|
$data[__('Other')] = 0;
|
|
|
|
$data[__('Other')] += $row["count"];
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
if ($row["id_agente"] == 0) {
|
|
|
|
$name = __('SYSTEM')." (".$row["count"].")";
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
|
|
|
$name = mb_substr (agents_get_name ($row["id_agente"], "lower"), 0, 14)." (".$row["count"].")";
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
|
|
|
$data[$name] = $row["count"];
|
|
|
|
}
|
|
|
|
$loop++;
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-03-05 11:26:34 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-03-05 11:26:34 +01:00
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, $width, $height,
|
2012-03-05 11:26:34 +01:00
|
|
|
__('Other'), '', $water_mark,
|
2011-04-20 17:54:31 +02:00
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a pie graph with events data in 320x200 size
|
|
|
|
*
|
|
|
|
* @param string filter Filter for query in DB
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_eventos_total($filter = "") {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$filter = str_replace ( "\\" , "", $filter);
|
|
|
|
$data = array ();
|
|
|
|
$legend = array ();
|
|
|
|
$total = 0;
|
|
|
|
|
|
|
|
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 0 $filter";
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data[__('Maintenance')] = db_get_sql ($sql);
|
2011-09-06 14:32:26 +02:00
|
|
|
if ($data[__('Maintenance')] == 0) {
|
|
|
|
unset($data[__('Maintenance')]);
|
|
|
|
}
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
|
|
|
|
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 1 $filter";
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data[__('Informational')] = db_get_sql ($sql);
|
2011-09-06 14:32:26 +02:00
|
|
|
if ($data[__('Informational')] == 0) {
|
|
|
|
unset($data[__('Informational')]);
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 2 $filter";
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data[__('Normal')] = db_get_sql ($sql);
|
2011-09-06 14:32:26 +02:00
|
|
|
if ($data[__('Normal')] == 0) {
|
|
|
|
unset($data[__('Normal')]);
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 3 $filter";
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data[__('Warning')] = db_get_sql ($sql);
|
2011-09-06 14:32:26 +02:00
|
|
|
if ($data[__('Warning')] == 0) {
|
|
|
|
unset($data[__('Warning')]);
|
|
|
|
}
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
|
|
|
|
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 4 $filter";
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data[__('Critical')] = db_get_sql ($sql);
|
2011-09-06 14:32:26 +02:00
|
|
|
if ($data[__('Critical')] == 0) {
|
|
|
|
unset($data[__('Critical')]);
|
|
|
|
}
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
|
|
|
|
asort ($data);
|
|
|
|
|
2012-03-05 11:26:34 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-03-05 11:26:34 +01:00
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, 320, 200,
|
2012-03-05 11:26:34 +01:00
|
|
|
__('Other'), '', $water_mark,
|
2011-04-20 17:54:31 +02:00
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a pie graph with events data of users
|
|
|
|
*
|
|
|
|
* @param integer height pie graph height
|
|
|
|
* @param integer period time period
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_eventos_usuario ($width, $height) {
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
$data = array ();
|
|
|
|
$max_items = 5;
|
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
|
|
|
$sql = sprintf ('SELECT COUNT(id_evento) events, id_usuario
|
|
|
|
FROM tevento
|
|
|
|
GROUP BY id_usuario
|
|
|
|
ORDER BY 1 DESC LIMIT %d', $max_items);
|
|
|
|
break;
|
|
|
|
case "oracle":
|
|
|
|
$sql = sprintf ('SELECT * FROM (SELECT COUNT(id_evento) events, id_usuario
|
|
|
|
FROM tevento
|
|
|
|
GROUP BY id_usuario
|
|
|
|
ORDER BY 1 DESC) WHERE rownum <= %d', $max_items);
|
|
|
|
break;
|
|
|
|
}
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$events = db_get_all_rows_sql ($sql);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
if ($events === false) {
|
|
|
|
$events = array();
|
|
|
|
}
|
|
|
|
|
2011-08-19 14:14:42 +02:00
|
|
|
foreach($events as $event) {
|
|
|
|
if($event['id_usuario'] == '0') {
|
|
|
|
$data[__('System')] = $event['events'];
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$data[$event['id_usuario']] = $event['events'];
|
|
|
|
}
|
|
|
|
}
|
2012-03-05 11:26:34 +01:00
|
|
|
|
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-20 11:23:54 +02:00
|
|
|
return pie3d_graph($config['flash_charts'], $data, $width, $height,
|
2012-03-05 11:26:34 +01:00
|
|
|
__('Other'), '', $water_mark,
|
2011-04-20 17:54:31 +02:00
|
|
|
$config['fontpath'], $config['font_size']);
|
2011-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/incidents/incident_statistics.php,
operation/agentes/custom_fields.php, operation/agentes/agent_fields.php,
operation/servers/view_server_detail.php,
operation/integria_incidents/incident_statistics.php,
operation/events/event_statistics.php, operation/events/events_list.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/graph_builder.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/graph_builder.preview.php: changed for to use new engine.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-13 19:31:06 +02:00
|
|
|
}
|
2011-04-14 18:52:50 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a custom SQL-defined graph
|
|
|
|
*
|
|
|
|
* @param integer ID of report content, used to get SQL code to get information for graph
|
|
|
|
* @param integer height graph height
|
|
|
|
* @param integer width graph width
|
|
|
|
* @param integer Graph type 1 vbar, 2 hbar, 3 pie
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function graph_custom_sql_graph ($id, $width, $height, $type = 'sql_graph_vbar', $only_image = false, $homeurl = '', $ttl = 1) {
|
2011-04-14 18:52:50 +02:00
|
|
|
global $config;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
|
|
|
$report_content = db_get_row ('treport_content', 'id_rc', $id);
|
|
|
|
if ($report_content["external_source"] != ""){
|
|
|
|
$sql = io_safe_output ($report_content["external_source"]);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$sql = db_get_row('treport_custom_sql', 'id', $report_content["treport_custom_sql_id"]);
|
|
|
|
$sql = io_safe_output($sql['sql']);
|
|
|
|
}
|
|
|
|
|
2012-09-10 17:12:52 +02:00
|
|
|
if (($config['metaconsole'] == 1) && defined('METACONSOLE')) {
|
|
|
|
$metaconsole_connection = enterprise_hook('metaconsole_get_connection', array($report_content['server_name']));
|
|
|
|
|
|
|
|
if ($metaconsole_connection === false) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (enterprise_hook('metaconsole_load_external_db', array($metaconsole_connection)) != NOERR) {
|
|
|
|
//ui_print_error_message ("Error connecting to ".$server_name);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.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_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
|
|
|
$data_result = db_get_all_rows_sql ($sql);
|
2012-09-10 17:12:52 +02:00
|
|
|
|
|
|
|
if (($config['metaconsole'] == 1) && defined('METACONSOLE'))
|
|
|
|
enterprise_hook('metaconsole_restore_db');
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-14 18:52:50 +02:00
|
|
|
if ($data_result === false)
|
|
|
|
$data_result = array ();
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-14 18:52:50 +02:00
|
|
|
$data = array ();
|
|
|
|
|
|
|
|
$count = 0;
|
|
|
|
foreach ($data_result as $data_item) {
|
|
|
|
$count++;
|
2012-07-18 15:25:51 +02:00
|
|
|
switch ($type) {
|
|
|
|
case 'sql_graph_vbar': // vertical bar
|
|
|
|
$data[$data_item["label"]]['g'] = $data_item["value"];
|
|
|
|
break;
|
|
|
|
case 'sql_graph_hbar': // horizontal bar
|
|
|
|
$data[$data_item["label"]]['g'] = $data_item["value"];
|
|
|
|
break;
|
|
|
|
case 'sql_graph_pie': // Pie
|
|
|
|
$data[$data_item["label"]] = $data_item["value"];
|
|
|
|
break;
|
|
|
|
}
|
2011-04-14 18:52:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
$flash_charts = $config['flash_charts'];
|
|
|
|
|
|
|
|
if ($only_image) {
|
|
|
|
$flash_charts = false;
|
|
|
|
}
|
|
|
|
|
2012-03-05 11:26:34 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-03-05 11:26:34 +01:00
|
|
|
|
2012-07-18 15:25:51 +02:00
|
|
|
switch ($type) {
|
|
|
|
case 'sql_graph_vbar': // vertical bar
|
|
|
|
return vbar_graph($flash_charts, $data, $width, $height, array(),
|
|
|
|
array(), "", "", $homeurl,
|
|
|
|
$water_mark,
|
|
|
|
$config['fontpath'], $config['font_size'], false, $ttl);
|
|
|
|
break;
|
|
|
|
case 'sql_graph_hbar': // horizontal bar
|
|
|
|
return hbar_graph($flash_charts, $data, $width, $height, array(),
|
2012-09-10 17:12:52 +02:00
|
|
|
array(), "", "", true, $homeurl,
|
2012-07-18 15:25:51 +02:00
|
|
|
$water_mark,
|
|
|
|
$config['fontpath'], $config['font_size'], false, $ttl);
|
|
|
|
break;
|
|
|
|
case 'sql_graph_pie': // Pie
|
|
|
|
return pie3d_graph($flash_charts, $data, $width, $height, __("other"), $homeurl,
|
|
|
|
$water_mark, $config['fontpath'], '', $ttl);
|
|
|
|
break;
|
|
|
|
}
|
2011-04-14 18:52:50 +02:00
|
|
|
}
|
2011-04-18 16:05:54 +02:00
|
|
|
|
2012-01-26 13:51:43 +01:00
|
|
|
/**
|
|
|
|
* Print a static graph with event data of agents
|
|
|
|
*
|
|
|
|
* @param integer id_agent Agent ID
|
|
|
|
* @param integer width pie graph width
|
|
|
|
* @param integer height pie graph height
|
|
|
|
* @param integer period time period
|
|
|
|
*/
|
2012-03-05 11:26:34 +01:00
|
|
|
function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl) {
|
2012-01-26 13:51:43 +01:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
|
|
|
|
|
|
|
$data = array ();
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-01-26 13:51:43 +01:00
|
|
|
$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
|
|
|
|
|
|
|
|
$interval = (int) ($period / $resolution);
|
|
|
|
$date = get_system_time ();
|
|
|
|
$datelimit = $date - $period;
|
|
|
|
$periodtime = floor ($period / $interval);
|
|
|
|
$time = array ();
|
|
|
|
$data = array ();
|
|
|
|
$legend = array();
|
2012-03-01 17:41:02 +01:00
|
|
|
$full_legend = array();
|
2012-01-26 13:51:43 +01:00
|
|
|
|
|
|
|
$cont = 0;
|
|
|
|
for ($i = 0; $i < $interval; $i++) {
|
|
|
|
$bottom = $datelimit + ($periodtime * $i);
|
|
|
|
if (! $graphic_type) {
|
|
|
|
$name = date('H\h', $bottom);
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-01-26 13:51:43 +01:00
|
|
|
$name = $bottom;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Show less values in legend
|
|
|
|
if ($cont == 0 or $cont % 2)
|
|
|
|
$legend[$name] = $name;
|
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
$full_legend[$name] = $name;;
|
|
|
|
|
2012-01-26 13:51:43 +01:00
|
|
|
$top = $datelimit + ($periodtime * ($i + 1));
|
|
|
|
$event = db_get_row_filter ('tevento',
|
|
|
|
array ('id_agente' => $id_agent,
|
|
|
|
'utimestamp > '.$bottom,
|
|
|
|
'utimestamp < '.$top), 'criticity, utimestamp');
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-01-26 13:51:43 +01:00
|
|
|
if (!empty($event['utimestamp'])){
|
|
|
|
$data[$cont]['utimestamp'] = $periodtime;
|
|
|
|
switch ($event['criticity']) {
|
2012-07-18 15:25:51 +02:00
|
|
|
case 3:
|
|
|
|
$data[$cont]['data'] = 2;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
$data[$cont]['data'] = 3;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
$data[$cont]['data'] = 1;
|
|
|
|
break;
|
2012-01-26 13:51:43 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
2012-07-18 15:25:51 +02:00
|
|
|
$data[$cont]['utimestamp'] = $periodtime;
|
|
|
|
$data[$cont]['data'] = 1;
|
|
|
|
}
|
2012-01-26 13:51:43 +01:00
|
|
|
$cont++;
|
|
|
|
}
|
|
|
|
|
|
|
|
$colors = array(1 => '#38B800', 2 => '#FFFF00', 3 => '#FF0000', 4 => '#C3C3C3');
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-01-26 13:51:43 +01:00
|
|
|
// Draw slicebar graph
|
2012-07-18 15:25:51 +02:00
|
|
|
if ($config['flash_charts']) {
|
2012-03-01 17:41:02 +01:00
|
|
|
echo flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'], $config['round_corner'], $homeurl);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
// Draw legend
|
|
|
|
echo "<br>";
|
2012-01-26 13:51:43 +01:00
|
|
|
echo " ";
|
2012-07-18 15:25:51 +02:00
|
|
|
foreach ($legend as $hour) {
|
2012-03-01 17:41:02 +01:00
|
|
|
echo "<span style='font-size: 6pt'>" . $hour . "</span>";
|
|
|
|
echo " ";
|
|
|
|
}
|
2012-01-26 13:51:43 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-04-18 16:05:54 +02:00
|
|
|
// Prints an error image
|
2011-07-19 11:28:09 +02:00
|
|
|
function fs_error_image () {
|
2011-04-18 16:05:54 +02:00
|
|
|
global $config;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-27 15:43:31 +02:00
|
|
|
return html_print_image("images/image_problem.png", true, array("border" => '0'));
|
2011-04-18 16:05:54 +02:00
|
|
|
}
|
2011-04-19 14:11:00 +02:00
|
|
|
|
2012-08-30 17:50:18 +02:00
|
|
|
function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
|
|
|
$unit_name, $show_alerts, $avg_only = 0, $date = 0, $series_suffix = '',
|
2012-09-19 16:59:31 +02:00
|
|
|
$series_suffix_str = '', $show_unknown = false) {
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
global $config;
|
2012-08-30 17:50:18 +02:00
|
|
|
global $chart;
|
|
|
|
global $color;
|
|
|
|
global $legend;
|
|
|
|
global $long_index;
|
2012-09-19 16:59:31 +02:00
|
|
|
global $series_type;
|
|
|
|
global $chart_extra_data;
|
2012-08-30 17:50:18 +02:00
|
|
|
|
|
|
|
$chart = array();
|
|
|
|
$color = array();
|
|
|
|
$legend = array();
|
|
|
|
$long_index = array();
|
2012-09-19 16:59:31 +02:00
|
|
|
$start_unknown = false;
|
2011-04-19 14:11:00 +02:00
|
|
|
|
|
|
|
// Set variables
|
|
|
|
if ($date == 0) $date = get_system_time();
|
|
|
|
$datelimit = $date - $period;
|
|
|
|
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
|
|
|
$interval = (int) ($period / $resolution);
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
|
|
|
$agent_id = agents_get_agent_id ($agent_name);
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
|
|
|
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
|
|
|
$module_type = modules_get_moduletype_name ($id_module_type);
|
2011-04-19 14:11:00 +02:00
|
|
|
$uncompressed_module = is_module_uncompressed ($module_type);
|
|
|
|
if ($uncompressed_module) {
|
|
|
|
$avg_only = 1;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Get event data (contains alert data too)
|
2012-09-19 16:59:31 +02:00
|
|
|
if ($show_unknown == 1 || $show_events == 1 || $show_alerts == 1) {
|
2011-04-20 18:57:06 +02:00
|
|
|
$events = db_get_all_rows_filter('tevento',
|
2011-04-19 14:11:00 +02:00
|
|
|
array ('id_agentmodule' => $agent_module_id,
|
|
|
|
"utimestamp > $datelimit",
|
|
|
|
"utimestamp < $date",
|
|
|
|
'order' => 'utimestamp ASC'),
|
2012-09-19 16:59:31 +02:00
|
|
|
array ('evento', 'utimestamp', 'event_type', 'id_evento'));
|
|
|
|
|
|
|
|
// Get the last event after inverval to know if graph start on unknown
|
|
|
|
$prev_event = db_get_row_filter ('tevento',
|
|
|
|
array ('id_agentmodule' => $agent_module_id,
|
|
|
|
"utimestamp <= $datelimit",
|
|
|
|
'order' => 'utimestamp DESC'));
|
|
|
|
if(isset($prev_event['event_type']) && $prev_event['event_type'] == 'going_unknown') {
|
|
|
|
$start_unknown = true;
|
|
|
|
}
|
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
if ($events === false) {
|
|
|
|
$events = array ();
|
|
|
|
}
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Get module data
|
2011-04-20 18:57:06 +02:00
|
|
|
$data = db_get_all_rows_filter ('tagente_datos',
|
2011-04-19 14:11:00 +02:00
|
|
|
array ('id_agente_modulo' => $agent_module_id,
|
|
|
|
"utimestamp > $datelimit",
|
|
|
|
"utimestamp < $date",
|
|
|
|
'order' => 'utimestamp ASC'),
|
|
|
|
array ('datos', 'utimestamp'));
|
|
|
|
if ($data === false) {
|
|
|
|
$data = array ();
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Uncompressed module data
|
|
|
|
if ($uncompressed_module) {
|
|
|
|
$min_necessary = 1;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Compressed module data
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-04-19 14:11:00 +02:00
|
|
|
// Get previous data
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$previous_data = modules_get_previous_data ($agent_module_id, $datelimit);
|
2011-04-19 14:11:00 +02:00
|
|
|
if ($previous_data !== false) {
|
|
|
|
$previous_data['utimestamp'] = $datelimit;
|
|
|
|
array_unshift ($data, $previous_data);
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Get next data
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$nextData = modules_get_next_data ($agent_module_id, $date);
|
2011-04-19 14:11:00 +02:00
|
|
|
if ($nextData !== false) {
|
|
|
|
array_push ($data, $nextData);
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else if (count ($data) > 0) {
|
2011-04-19 14:11:00 +02:00
|
|
|
// Propagate the last known data to the end of the interval
|
|
|
|
$nextData = array_pop ($data);
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
$nextData['utimestamp'] = $date;
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
}
|
|
|
|
|
|
|
|
$min_necessary = 2;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Check available data
|
|
|
|
if (count ($data) < $min_necessary) {
|
|
|
|
if (!$graphic_type) {
|
2011-07-19 11:28:09 +02:00
|
|
|
return fs_error_image ();
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
graphic_error ();
|
|
|
|
}
|
2012-02-27 17:20:28 +01:00
|
|
|
|
|
|
|
if (empty($unit_name)){
|
|
|
|
$unit = modules_get_unit($agent_module_id);
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
}
|
|
|
|
else
|
2012-02-27 17:20:28 +01:00
|
|
|
$unit = $unit_name;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Data iterator
|
|
|
|
$j = 0;
|
|
|
|
|
|
|
|
// Event iterator
|
|
|
|
$k = 0;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Set initial conditions
|
|
|
|
if ($data[0]['utimestamp'] == $datelimit) {
|
|
|
|
$previous_data = $data[0]['datos'];
|
|
|
|
$j++;
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-04-19 14:11:00 +02:00
|
|
|
$previous_data = 0;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Calculate chart data
|
|
|
|
for ($i = 0; $i < $resolution; $i++) {
|
|
|
|
$timestamp = $datelimit + ($interval * $i);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
$zero = 0;
|
|
|
|
$total = 0;
|
|
|
|
$count = 0;
|
|
|
|
|
|
|
|
// Read data that falls in the current interval
|
2012-07-18 15:25:51 +02:00
|
|
|
while (isset ($data[$j]) &&
|
|
|
|
$data[$j]['utimestamp'] >= $timestamp &&
|
|
|
|
$data[$j]['utimestamp'] <= ($timestamp + $interval)) {
|
2011-04-19 14:11:00 +02:00
|
|
|
if ($data[$j]['datos'] == 0) {
|
|
|
|
$zero = 1;
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-04-19 14:11:00 +02:00
|
|
|
$total += $data[$j]['datos'];
|
|
|
|
$count++;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
$j++;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Average
|
|
|
|
if ($count > 0) {
|
|
|
|
$total /= $count;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Read events and alerts that fall in the current interval
|
|
|
|
$event_value = 0;
|
|
|
|
$alert_value = 0;
|
2012-09-19 16:59:31 +02:00
|
|
|
$unknown_value = 0;
|
|
|
|
|
|
|
|
$event_ids = array();
|
|
|
|
$alert_ids = array();
|
2012-07-18 15:25:51 +02:00
|
|
|
while (isset ($events[$k]) &&
|
|
|
|
$events[$k]['utimestamp'] >= $timestamp &&
|
|
|
|
$events[$k]['utimestamp'] < ($timestamp + $interval)) {
|
2011-04-19 14:11:00 +02:00
|
|
|
if ($show_events == 1) {
|
|
|
|
$event_value++;
|
2012-09-19 16:59:31 +02:00
|
|
|
$event_ids[] = $events[$k]['id_evento'];
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
if ($show_alerts == 1 && substr ($events[$k]['event_type'], 0, 5) == 'alert') {
|
|
|
|
$alert_value++;
|
2012-09-19 16:59:31 +02:00
|
|
|
$alert_ids[] = $events[$k]['id_evento'];
|
|
|
|
}
|
|
|
|
if ($show_unknown) {
|
|
|
|
if($events[$k]['event_type'] == 'going_unknown') {
|
|
|
|
$is_unknown = true;
|
|
|
|
}
|
|
|
|
else if(substr ($events[$k]['event_type'], 0, 5) == 'going') {
|
|
|
|
$is_unknown = false;
|
|
|
|
}
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
$k++;
|
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
|
|
|
|
if($is_unknown) {
|
|
|
|
$unknown_value++;
|
|
|
|
}
|
2011-04-19 14:11:00 +02:00
|
|
|
|
|
|
|
// Set the title and time format
|
2012-07-18 15:25:51 +02:00
|
|
|
if ($period <= SECONDS_6HOURS) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'H:i:s';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($period < SECONDS_1DAY) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'H:i';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($period < SECONDS_15DAYS) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'M d H:i';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($period < SECONDS_1MONTH) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'M d H\h';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'M d H\h';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
$timestamp_short = date($time_format, $timestamp);
|
|
|
|
$long_index[$timestamp_short] = date(
|
|
|
|
html_entity_decode($config['date_format'], ENT_QUOTES, "UTF-8"), $timestamp);
|
|
|
|
$timestamp = $timestamp_short;
|
|
|
|
/////////////////////////////////////////////////////////////////
|
2012-09-19 16:59:31 +02:00
|
|
|
|
|
|
|
if($is_unknown) {
|
|
|
|
$total = 0;
|
|
|
|
}
|
2012-10-02 17:15:27 +02:00
|
|
|
|
|
|
|
if($show_events) {
|
|
|
|
if(!isset($chart[$timestamp]['event'.$series_suffix])) {
|
|
|
|
$chart[$timestamp]['event'.$series_suffix] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$chart[$timestamp]['event'.$series_suffix] += $event_value;
|
|
|
|
$series_type['event'.$series_suffix] = 'points';
|
|
|
|
}
|
|
|
|
if($show_alerts) {
|
|
|
|
if(!isset($chart[$timestamp]['alert'.$series_suffix])) {
|
|
|
|
$chart[$timestamp]['alert'.$series_suffix] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$chart[$timestamp]['alert'.$series_suffix] += $alert_value;
|
|
|
|
$series_type['alert'.$series_suffix] = 'points';
|
|
|
|
}
|
|
|
|
if($show_unknown) {
|
|
|
|
if(!isset($chart[$timestamp]['unknown'.$series_suffix])) {
|
|
|
|
$chart[$timestamp]['unknown'.$series_suffix] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$chart[$timestamp]['unknown'.$series_suffix] = $unknown_value;
|
|
|
|
$series_type['unknown'.$series_suffix] = 'area';
|
|
|
|
}
|
|
|
|
|
|
|
|
//The order filling the array is very important to get the same colors
|
|
|
|
//in legends and graphs!!!
|
2012-10-02 17:54:22 +02:00
|
|
|
//Boolean graph doesn't have max!!!
|
|
|
|
/*if (!$avg_only) {
|
2012-10-02 17:15:27 +02:00
|
|
|
$chart[$timestamp]['max'.$series_suffix] = 0;
|
2012-10-02 17:54:22 +02:00
|
|
|
}*/
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Data and zeroes (draw a step)
|
|
|
|
if ($zero == 1 && $count > 0) {
|
2012-02-27 17:20:28 +01:00
|
|
|
if ($avg_only) {
|
2012-08-30 17:50:18 +02:00
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = $total;
|
2012-02-27 17:20:28 +01:00
|
|
|
}
|
|
|
|
else {
|
2012-08-30 17:50:18 +02:00
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = $total;
|
2012-12-05 12:41:52 +01:00
|
|
|
$chart[$timestamp + 1] = array ('sum'.$series_suffix => 0,
|
2012-07-18 15:25:51 +02:00
|
|
|
//'count' => 0,
|
|
|
|
//'timestamp_bottom' => $timestamp,
|
|
|
|
//'timestamp_top' => $timestamp + $interval,
|
2012-12-05 12:41:52 +01:00
|
|
|
'min'.$series_suffix => 0,
|
|
|
|
'max'.$series_suffix => 0,
|
|
|
|
'event'.$series_suffix => $event_value,
|
|
|
|
'alert'.$series_suffix => $alert_value);
|
2012-02-27 17:20:28 +01:00
|
|
|
}
|
2011-04-19 14:11:00 +02:00
|
|
|
$previous_data = 0;
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else if ($zero == 1) { // Just zeros
|
2012-08-30 17:50:18 +02:00
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = 0;
|
2011-04-19 14:11:00 +02:00
|
|
|
$previous_data = 0;
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else if ($count > 0) { // No zeros
|
2012-08-30 17:50:18 +02:00
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = $total;
|
2011-04-19 14:11:00 +02:00
|
|
|
$previous_data = $total;
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else { // Compressed data
|
2012-09-19 16:59:31 +02:00
|
|
|
if ($uncompressed_module || ($timestamp > time ()) || $is_unknown) {
|
2012-08-30 17:50:18 +02:00
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = 0;
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-08-30 17:50:18 +02:00
|
|
|
$chart[$timestamp]['sum'.$series_suffix] = $previous_data;
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-10-02 17:54:22 +02:00
|
|
|
|
|
|
|
//Boolean graph doesn't have min!!!
|
|
|
|
/*if (!$avg_only) {
|
2012-08-30 17:50:18 +02:00
|
|
|
$chart[$timestamp]['min'.$series_suffix] = 0;
|
2012-10-02 17:54:22 +02:00
|
|
|
}*/
|
2012-09-19 16:59:31 +02:00
|
|
|
|
|
|
|
if(!empty($event_ids)) {
|
|
|
|
$chart_extra_data[count($chart)-1]['events'] = implode(',',$event_ids);
|
|
|
|
}
|
|
|
|
if(!empty($alert_ids)) {
|
|
|
|
$chart_extra_data[count($chart)-1]['alerts'] = implode(',',$alert_ids);
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-09-19 16:59:31 +02:00
|
|
|
}
|
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Get min, max and avg (less efficient but centralized for all modules and reports)
|
2012-12-05 12:41:52 +01:00
|
|
|
$graph_stats = get_statwin_graph_statistics($chart, $series_suffix);
|
2012-10-02 11:07:20 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Fix event and alert scale
|
|
|
|
foreach ($chart as $timestamp => $chart_data) {
|
2012-07-18 15:25:51 +02:00
|
|
|
if ($show_events) {
|
2012-09-19 16:59:31 +02:00
|
|
|
if ($chart_data['event'.$series_suffix] > 0) {
|
|
|
|
$chart[$timestamp]['event'.$series_suffix] = $max_value * 1.2;
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($show_alerts) {
|
2012-09-19 16:59:31 +02:00
|
|
|
if ($chart_data['alert'.$series_suffix] > 0) {
|
|
|
|
$chart[$timestamp]['alert'.$series_suffix] = $max_value * 1.10;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($show_unknown) {
|
|
|
|
if ($chart_data['unknown'.$series_suffix] > 0) {
|
|
|
|
$chart[$timestamp]['unknown'.$series_suffix] = $max_value * 1.05;
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
|
2011-12-22 11:08:00 +01:00
|
|
|
///////////////////////////////////////////////////
|
2011-04-19 14:11:00 +02:00
|
|
|
// Set the title and time format
|
2012-07-18 15:25:51 +02:00
|
|
|
if ($period <= SECONDS_6HOURS) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'H:i:s';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($period < SECONDS_1DAY) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'H:i';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($period < SECONDS_15DAYS) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'M d H:i';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($period < SECONDS_1MONTH) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'M d H\h';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'M d H\h';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
|
2012-07-18 15:25:51 +02:00
|
|
|
// Flash chart
|
2012-10-02 11:07:20 +02:00
|
|
|
$caption = __('Max. Value').$series_suffix_str . ': ' . $graph_stats['sum']['max'] . ' ' . __('Avg. Value').$series_suffix_str .
|
|
|
|
': ' . $graph_stats['sum']['avg'] . ' ' . __('Min. Value').$series_suffix_str . ': ' . $graph_stats['sum']['min'] . ' ' . __('Units').$series_suffix_str . ': ' . $unit;
|
2011-04-19 14:11:00 +02:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
if($show_events) {
|
2012-08-30 17:50:18 +02:00
|
|
|
$legend['event'.$series_suffix] = __('Events').$series_suffix_str;
|
2012-09-19 16:59:31 +02:00
|
|
|
$chart_extra_data['legend_events'] = $legend['event'.$series_suffix];
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
if($show_alerts) {
|
2012-08-30 17:50:18 +02:00
|
|
|
$legend['alert'.$series_suffix] = __('Alerts').$series_suffix_str;
|
2012-09-19 16:59:31 +02:00
|
|
|
$chart_extra_data['legend_alerts'] = $legend['alert'.$series_suffix];
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
if($show_unknown) {
|
|
|
|
$legend['unknown'.$series_suffix] = __('Unknown').$series_suffix_str;
|
|
|
|
$chart_extra_data['legend_unknown'] = $legend['unknown'.$series_suffix];
|
|
|
|
}
|
|
|
|
|
2012-08-30 17:50:18 +02:00
|
|
|
if (!$avg_only) {
|
2012-10-02 17:54:22 +02:00
|
|
|
//Boolean graph doesn't have max!!!
|
|
|
|
//$legend['max'.$series_suffix] = __('Max').$series_suffix_str .': '.__('Last').': '.$graph_stats['max']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['max']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['max']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['max']['min'].' '.$unit;
|
2012-10-02 17:15:27 +02:00
|
|
|
$legend['sum'.$series_suffix] = __('Data').$series_suffix_str.': '.__('Last').': '.$graph_stats['sum']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['sum']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['sum']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['sum']['min'].' '.$unit;
|
2012-10-02 17:54:22 +02:00
|
|
|
//Boolean graph doesn't have min!!!
|
|
|
|
//$legend['min'.$series_suffix] = __('Min').$series_suffix_str .': '.__('Last').': '.$graph_stats['min']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['min']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['min']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['min']['min'].' '.$unit;
|
2012-10-02 17:15:27 +02:00
|
|
|
} else {
|
|
|
|
$legend['sum'.$series_suffix] = __('Data').$series_suffix_str.': '.__('Last').': '.$graph_stats['sum']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['sum']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['sum']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['sum']['min'].' '.$unit;
|
|
|
|
|
2012-08-30 17:50:18 +02:00
|
|
|
}
|
|
|
|
//$legend['baseline'.$series_suffix] = __('Baseline').$series_suffix_str;
|
2011-04-19 14:11:00 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
if($show_events) {
|
2012-10-02 17:15:27 +02:00
|
|
|
$color['event'.$series_suffix] = array('border' => '#ff0000', 'color' => '#ff0000', 'alpha' => 50);
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
if($show_alerts) {
|
2012-10-02 17:15:27 +02:00
|
|
|
$color['alert'.$series_suffix] = array('border' => '#ff7f00', 'color' => '#ff7f00', 'alpha' => 50);
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
if($show_unknown) {
|
|
|
|
$color['unknown'.$series_suffix] = array('border' => '#999999', 'color' => '#999999', 'alpha' => 50);
|
|
|
|
}
|
2012-08-30 17:50:18 +02:00
|
|
|
$color['max'.$series_suffix] = array('border' => '#000000', 'color' => $config['graph_color3'], 'alpha' => 50);
|
2012-10-02 17:15:27 +02:00
|
|
|
$color['sum'.$series_suffix] = array('border' => '#000000', 'color' => $config['graph_color2'], 'alpha' => 50);
|
2012-08-30 17:50:18 +02:00
|
|
|
$color['min'.$series_suffix] = array('border' => '#000000', 'color' => $config['graph_color1'], 'alpha' => 50);
|
|
|
|
//$color['baseline'.$series_suffix] = array('border' => null, 'color' => '#0097BD', 'alpha' => 10);
|
|
|
|
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
}
|
|
|
|
|
2012-08-30 17:50:18 +02:00
|
|
|
function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
|
|
|
|
$width, $height , $title, $unit_name, $show_alerts, $avg_only = 0, $pure=0,
|
2012-09-19 16:59:31 +02:00
|
|
|
$date = 0, $only_image = false, $homeurl = '', $adapt_key = '', $compare = false, $show_unknown = false) {
|
2011-04-19 14:11:00 +02:00
|
|
|
|
2012-08-30 17:50:18 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-03-05 11:26:34 +01:00
|
|
|
|
2012-06-25 15:17:05 +02:00
|
|
|
$flash_chart = $config['flash_charts'];
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2012-08-30 17:50:18 +02:00
|
|
|
global $chart;
|
|
|
|
global $color;
|
|
|
|
global $legend;
|
|
|
|
global $long_index;
|
2012-09-19 16:59:31 +02:00
|
|
|
global $series_type;
|
|
|
|
global $chart_extra_data;
|
|
|
|
|
|
|
|
$series_suffix_str = '';
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($compare !== false) {
|
2012-08-30 17:50:18 +02:00
|
|
|
$series_suffix = '2';
|
|
|
|
$series_suffix_str = ' ('.__('Previous').')';
|
|
|
|
// Build the data of the previous period
|
|
|
|
grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
2012-09-19 16:59:31 +02:00
|
|
|
$unit_name, $show_alerts, $avg_only, $date-$period, $series_suffix,
|
|
|
|
$series_suffix_str, $show_unknown);
|
2012-08-31 13:59:46 +02:00
|
|
|
switch($compare) {
|
|
|
|
case 'separated':
|
|
|
|
// Store the chart calculated
|
|
|
|
$chart_prev = $chart;
|
|
|
|
$legend_prev = $legend;
|
|
|
|
$long_index_prev = $long_index;
|
2012-09-19 16:59:31 +02:00
|
|
|
$series_type_prev = $series_type;
|
|
|
|
$chart_extra_data_prev = $chart_extra_data;
|
|
|
|
$chart_extra_data = array();
|
|
|
|
$color_prev = $color;
|
2012-08-31 13:59:46 +02:00
|
|
|
break;
|
|
|
|
case 'overlapped':
|
|
|
|
// Store the chart calculated deleting index, because will be over the current period
|
|
|
|
$chart_prev = array_values($chart);
|
|
|
|
$legend_prev = $legend;
|
2012-09-19 16:59:31 +02:00
|
|
|
$series_type_prev = $series_type;
|
2012-08-31 13:59:46 +02:00
|
|
|
break;
|
|
|
|
}
|
2012-08-30 17:50:18 +02:00
|
|
|
}
|
|
|
|
grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
2012-09-19 16:59:31 +02:00
|
|
|
$unit_name, $show_alerts, $avg_only, $date, '', '', $show_unknown);
|
2012-10-02 17:54:22 +02:00
|
|
|
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($compare === 'overlapped') {
|
2012-08-31 13:59:46 +02:00
|
|
|
$i = 0;
|
|
|
|
foreach($chart as $k=>$v) {
|
|
|
|
$chart[$k] = array_merge($v,$chart_prev[$i]);
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
$legend = array_merge($legend, $legend_prev);
|
|
|
|
}
|
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
if ($only_image) {
|
|
|
|
$flash_chart = false;
|
|
|
|
}
|
|
|
|
|
2012-03-05 11:26:34 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-09-19 16:59:31 +02:00
|
|
|
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if ($compare === 'separated') {
|
2012-08-30 17:50:18 +02:00
|
|
|
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
2012-08-30 17:50:18 +02:00
|
|
|
$water_mark,
|
2012-09-19 16:59:31 +02:00
|
|
|
$config['fontpath'], $config['font_size'], $unit, 1, $series_type,
|
|
|
|
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str).
|
2012-08-30 17:50:18 +02:00
|
|
|
'<br>'.
|
2012-09-19 16:59:31 +02:00
|
|
|
area_graph($flash_chart, $chart_prev, $width, $height/2, $color_prev, $legend_prev,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$long_index_prev, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
2012-08-30 17:50:18 +02:00
|
|
|
$water_mark,
|
2012-09-19 16:59:31 +02:00
|
|
|
$config['fontpath'], $config['font_size'], $unit, 1, $series_type_prev,
|
|
|
|
$chart_extra_data_prev, 0, 0, $adapt_key, false, $series_suffix_str);
|
2012-08-30 17:50:18 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
return area_graph($flash_chart, $chart, $width, $height, $color, $legend,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
$long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
2012-08-30 17:50:18 +02:00
|
|
|
$water_mark,
|
2012-09-19 16:59:31 +02:00
|
|
|
$config['fontpath'], $config['font_size'], $unit, 1, $series_type,
|
|
|
|
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str);
|
2012-08-30 17:50:18 +02:00
|
|
|
}
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
|
2011-12-21 14:09:26 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Print an area graph with netflow aggregated
|
|
|
|
*/
|
|
|
|
|
2012-10-08 21:19:58 +02:00
|
|
|
function graph_netflow_aggregate_area ($data, $period, $width, $height, $unit = '', $ttl = 1, $only_image = false) {
|
2011-12-21 14:09:26 +01:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-01-11 17:34:53 +01:00
|
|
|
if (empty ($data)) {
|
|
|
|
echo fs_error_image ();
|
|
|
|
return;
|
2011-12-21 14:09:26 +01:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
|
|
|
if ($period <= SECONDS_6HOURS) {
|
|
|
|
$chart_time_format = 'H:i:s';
|
|
|
|
}
|
|
|
|
elseif ($period < SECONDS_1DAY) {
|
|
|
|
$chart_time_format = 'H:i';
|
|
|
|
}
|
|
|
|
elseif ($period < SECONDS_15DAYS) {
|
|
|
|
$chart_time_format = 'M d H:i';
|
|
|
|
}
|
|
|
|
elseif ($period < SECONDS_1MONTH) {
|
|
|
|
$chart_time_format = 'M d H\h';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$chart_time_format = 'M d H\h';
|
|
|
|
}
|
2012-06-25 15:17:05 +02:00
|
|
|
|
2012-01-11 17:34:53 +01:00
|
|
|
// Calculate source indexes
|
|
|
|
$i = 0;
|
2012-01-13 14:14:16 +01:00
|
|
|
$sources = array ();
|
2012-01-11 17:34:53 +01:00
|
|
|
foreach ($data['sources'] as $source => $value) {
|
|
|
|
$source_indexes[$source] = $i;
|
|
|
|
$sources[$i] = $source;
|
|
|
|
$i++;
|
2012-01-05 13:08:15 +01:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-01-11 17:34:53 +01:00
|
|
|
// Add sources to chart
|
|
|
|
$chart = array ();
|
|
|
|
foreach ($data['data'] as $timestamp => $data) {
|
|
|
|
$chart_date = date ($chart_time_format, $timestamp);
|
|
|
|
$chart[$chart_date] = array ();
|
|
|
|
foreach ($source_indexes as $source => $index) {
|
|
|
|
$chart[$chart_date][$index] = 0;
|
|
|
|
}
|
|
|
|
foreach ($data as $source => $value) {
|
|
|
|
$chart[$chart_date][$source_indexes[$source]] = $value;
|
2011-12-21 14:09:26 +01:00
|
|
|
}
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-23 09:37:36 +01:00
|
|
|
$flash_chart = $config['flash_charts'];
|
|
|
|
if ($only_image) {
|
|
|
|
$flash_chart = false;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-01-13 15:52:52 +01:00
|
|
|
if ($config['homeurl'] != '') {
|
2012-09-28 16:06:20 +02:00
|
|
|
$homeurl = $config['homeurl'];
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-01-13 15:52:52 +01:00
|
|
|
$homeurl = '';
|
|
|
|
}
|
2012-03-05 11:26:34 +01:00
|
|
|
|
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-10-11 17:52:26 +02:00
|
|
|
return area_graph($flash_chart, $chart, $width, $height, array (), $sources,
|
|
|
|
array (), "images/image_problem.opaque.png", "", $unit, $homeurl,
|
2012-09-19 16:59:31 +02:00
|
|
|
$config['homedir'] . "/images/logo_vertical_water.png",
|
2012-10-08 21:19:58 +02:00
|
|
|
$config['fontpath'], $config['font_size'], $unit, 2);
|
2011-12-21 14:09:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print an area graph with netflow total
|
|
|
|
*/
|
2012-10-08 21:19:58 +02:00
|
|
|
function graph_netflow_total_area ($data, $period, $width, $height, $unit = '', $ttl = 1, $only_image = false) {
|
2011-12-21 14:09:26 +01:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-01-11 17:34:53 +01:00
|
|
|
if (empty ($data)) {
|
|
|
|
echo fs_error_image ();
|
|
|
|
return;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
|
|
|
if ($period <= SECONDS_6HOURS) {
|
|
|
|
$chart_time_format = 'H:i:s';
|
|
|
|
}
|
|
|
|
elseif ($period < SECONDS_1DAY) {
|
|
|
|
$chart_time_format = 'H:i';
|
|
|
|
}
|
|
|
|
elseif ($period < SECONDS_15DAYS) {
|
|
|
|
$chart_time_format = 'M d H:i';
|
|
|
|
}
|
|
|
|
elseif ($period < SECONDS_1MONTH) {
|
|
|
|
$chart_time_format = 'M d H\h';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$chart_time_format = 'M d H\h';
|
|
|
|
}
|
2012-01-11 17:34:53 +01:00
|
|
|
|
|
|
|
// Populate chart
|
|
|
|
$chart = array ();
|
|
|
|
foreach ($data as $timestamp => $value) {
|
|
|
|
$chart[date ($chart_time_format, $timestamp)] = $value;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-21 14:09:26 +01:00
|
|
|
$flash_chart = $config['flash_charts'];
|
|
|
|
if ($only_image) {
|
|
|
|
$flash_chart = false;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-01-13 15:52:52 +01:00
|
|
|
if ($config['homeurl'] != '') {
|
2012-09-28 16:06:20 +02:00
|
|
|
$homeurl = $config['homeurl'];
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2012-01-13 15:52:52 +01:00
|
|
|
$homeurl = '';
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-03-05 11:26:34 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
|
|
|
|
2012-12-07 15:03:00 +01:00
|
|
|
return area_graph($flash_chart, $chart, $width, $height, array (), false,
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
array (), ui_get_full_url("images/image_problem.opaque.png"), "", "", $homeurl,
|
2012-07-18 15:25:51 +02:00
|
|
|
$water_mark,
|
2012-10-08 21:19:58 +02:00
|
|
|
$config['fontpath'], $config['font_size'], $unit, $ttl);
|
2011-12-21 14:09:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a pie graph with netflow aggregated
|
|
|
|
*/
|
2012-10-08 21:19:58 +02:00
|
|
|
function graph_netflow_aggregate_pie ($data, $aggregate, $ttl = 1, $only_image = false) {
|
2011-12-21 14:09:26 +01:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
|
|
|
|
2012-01-11 17:34:53 +01:00
|
|
|
if (empty ($data)) {
|
2012-10-08 21:19:58 +02:00
|
|
|
return fs_error_image ();
|
2012-01-11 17:34:53 +01:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-21 14:09:26 +01:00
|
|
|
$i = 0;
|
2011-12-21 16:28:01 +01:00
|
|
|
$values = array();
|
2011-12-21 17:07:15 +01:00
|
|
|
$agg = '';
|
2011-12-21 14:09:26 +01:00
|
|
|
while (isset ($data[$i])) {
|
|
|
|
$agg = $data[$i]['agg'];
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
if (!isset($values[$agg])) {
|
2011-12-21 14:09:26 +01:00
|
|
|
$values[$agg] = $data[$i]['data'];
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-12-21 14:09:26 +01:00
|
|
|
$values[$agg] += $data[$i]['data'];
|
|
|
|
}
|
|
|
|
$i++;
|
|
|
|
}
|
2012-10-08 21:19:58 +02:00
|
|
|
|
|
|
|
$flash_chart = $config['flash_charts'];
|
|
|
|
if ($only_image) {
|
|
|
|
$flash_chart = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return pie3d_graph($flash_chart, $values, 320, 200,
|
2012-10-29 12:31:38 +01:00
|
|
|
__('Other'), $config['homeurl'], $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-10-08 21:19:58 +02:00
|
|
|
$config['fontpath'], $config['font_size'], $ttl);
|
2011-12-21 14:09:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
/**
|
|
|
|
* Draw a graph of Module string data of agent
|
|
|
|
*
|
|
|
|
* @param integer id_agent_modulo Agent Module ID
|
|
|
|
* @param integer show_event show event (1 or 0)
|
|
|
|
* @param integer height graph height
|
|
|
|
* @param integer width graph width
|
|
|
|
* @param string title graph title
|
|
|
|
* @param string unit_name String of unit name
|
|
|
|
* @param integer show alerts (1 or 0)
|
|
|
|
* @param integer avg_only calcules avg only (1 or 0)
|
|
|
|
* @param integer pure Fullscreen (1 or 0)
|
|
|
|
* @param integer date date
|
|
|
|
*/
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
2011-04-19 14:11:00 +02:00
|
|
|
$width, $height , $title, $unit_name, $show_alerts, $avg_only = 0, $pure=0,
|
2012-03-08 13:32:59 +01:00
|
|
|
$date = 0, $only_image = false, $homeurl = '', $adapt_key) {
|
2011-04-19 14:11:00 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
|
|
|
|
|
|
|
// Set variables
|
2012-07-18 15:25:51 +02:00
|
|
|
if ($date == 0)
|
|
|
|
$date = get_system_time();
|
2011-04-19 14:11:00 +02:00
|
|
|
$datelimit = $date - $period;
|
|
|
|
$resolution = $config['graph_res'] * 50; //Number of points of the graph
|
|
|
|
$interval = (int) ($period / $resolution);
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$agent_name = modules_get_agentmodule_agent_name ($agent_module_id);
|
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
|
|
|
$agent_id = agents_get_agent_id ($agent_name);
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$module_name = modules_get_agentmodule_name ($agent_module_id);
|
|
|
|
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
|
|
|
$module_type = modules_get_moduletype_name ($id_module_type);
|
2011-04-19 14:11:00 +02:00
|
|
|
$uncompressed_module = is_module_uncompressed ($module_type);
|
|
|
|
if ($uncompressed_module) {
|
|
|
|
$avg_only = 1;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Get event data (contains alert data too)
|
|
|
|
if ($show_events == 1 || $show_alerts == 1) {
|
2011-04-20 18:57:06 +02:00
|
|
|
$events = db_get_all_rows_filter ('tevento',
|
2011-04-19 14:11:00 +02:00
|
|
|
array ('id_agentmodule' => $agent_module_id,
|
|
|
|
"utimestamp > $datelimit",
|
|
|
|
"utimestamp < $date",
|
|
|
|
'order' => 'utimestamp ASC'),
|
|
|
|
array ('evento', 'utimestamp', 'event_type'));
|
|
|
|
if ($events === false) {
|
|
|
|
$events = array ();
|
|
|
|
}
|
|
|
|
}
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Get module data
|
2011-04-20 18:57:06 +02:00
|
|
|
$data = db_get_all_rows_filter ('tagente_datos_string',
|
2011-04-19 14:11:00 +02:00
|
|
|
array ('id_agente_modulo' => $agent_module_id,
|
|
|
|
"utimestamp > $datelimit",
|
|
|
|
"utimestamp < $date",
|
|
|
|
'order' => 'utimestamp ASC'),
|
|
|
|
array ('datos', 'utimestamp'));
|
|
|
|
if ($data === false) {
|
|
|
|
$data = array ();
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Uncompressed module data
|
|
|
|
if ($uncompressed_module) {
|
|
|
|
$min_necessary = 1;
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Compressed module data
|
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Get previous data
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$previous_data = modules_get_previous_data ($agent_module_id, $datelimit, 1);
|
2011-04-19 14:11:00 +02:00
|
|
|
if ($previous_data !== false) {
|
|
|
|
$previous_data['utimestamp'] = $datelimit;
|
|
|
|
array_unshift ($data, $previous_data);
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Get next data
|
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.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.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
|
|
|
$nextData = modules_get_next_data ($agent_module_id, $date, 1);
|
2011-04-19 14:11:00 +02:00
|
|
|
if ($nextData !== false) {
|
|
|
|
array_push ($data, $nextData);
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else if (count ($data) > 0) {
|
2011-04-19 14:11:00 +02:00
|
|
|
// Propagate the last known data to the end of the interval
|
|
|
|
$nextData = array_pop ($data);
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
$nextData['utimestamp'] = $date;
|
|
|
|
array_push ($data, $nextData);
|
|
|
|
}
|
|
|
|
|
|
|
|
$min_necessary = 2;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Check available data
|
|
|
|
if (count ($data) < $min_necessary) {
|
|
|
|
if (!$graphic_type) {
|
2011-07-19 11:28:09 +02:00
|
|
|
return fs_error_image ();
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
graphic_error ();
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Data iterator
|
|
|
|
$j = 0;
|
|
|
|
|
|
|
|
// Event iterator
|
|
|
|
$k = 0;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Set initial conditions
|
|
|
|
$chart = array();
|
|
|
|
if ($data[0]['utimestamp'] == $datelimit) {
|
|
|
|
$previous_data = 1;
|
|
|
|
$j++;
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-04-19 14:11:00 +02:00
|
|
|
$previous_data = 0;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Calculate chart data
|
|
|
|
for ($i = 0; $i < $resolution; $i++) {
|
|
|
|
$timestamp = $datelimit + ($interval * $i);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
$count = 0;
|
|
|
|
$total = 0;
|
|
|
|
// Read data that falls in the current interval
|
|
|
|
while (isset ($data[$j]) !== null && $data[$j]['utimestamp'] >= $timestamp && $data[$j]['utimestamp'] <= ($timestamp + $interval)) {
|
|
|
|
$count++;
|
|
|
|
$j++;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-11-05 12:18:52 +01:00
|
|
|
if($max_value < $count) {
|
|
|
|
$max_value = $count;
|
|
|
|
}
|
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Read events and alerts that fall in the current interval
|
|
|
|
$event_value = 0;
|
|
|
|
$alert_value = 0;
|
|
|
|
while (isset ($events[$k]) && $events[$k]['utimestamp'] >= $timestamp && $events[$k]['utimestamp'] <= ($timestamp + $interval)) {
|
|
|
|
if ($show_events == 1) {
|
|
|
|
$event_value++;
|
|
|
|
}
|
|
|
|
if ($show_alerts == 1 && substr ($events[$k]['event_type'], 0, 5) == 'alert') {
|
|
|
|
$alert_value++;
|
|
|
|
}
|
|
|
|
$k++;
|
|
|
|
}
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
// Set the title and time format
|
2012-07-18 15:25:51 +02:00
|
|
|
if ($period <= SECONDS_6HOURS) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'H:i:s';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($period < SECONDS_1DAY) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'H:i';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($period < SECONDS_15DAYS) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'M d H:i';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($period < SECONDS_1MONTH) {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'M d H\h';
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-12-22 11:08:00 +01:00
|
|
|
$time_format = 'M d H\h';
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
$timestamp_short = date($time_format, $timestamp);
|
|
|
|
$long_index[$timestamp_short] = date(
|
|
|
|
html_entity_decode($config['date_format'], ENT_QUOTES, "UTF-8"), $timestamp);
|
|
|
|
$timestamp = $timestamp_short;
|
|
|
|
/////////////////////////////////////////////////////////////////
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Data in the interval
|
2012-10-02 17:15:27 +02:00
|
|
|
//The order in chart array is very important!!!!
|
|
|
|
$chart[$timestamp]['event'] = $event_value;
|
|
|
|
$chart[$timestamp]['alert'] = $alert_value;
|
|
|
|
$chart[$timestamp]['max'] = 0;
|
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
if ($count > 0) {
|
|
|
|
$chart[$timestamp]['sum'] = $count;
|
|
|
|
$previous_data = $total;
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Compressed data
|
2011-04-19 14:11:00 +02:00
|
|
|
$chart[$timestamp]['sum'] = $previous_data;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
$chart[$timestamp]['min'] = 0;
|
|
|
|
}
|
2012-10-02 11:07:20 +02:00
|
|
|
|
|
|
|
$graph_stats = get_statwin_graph_statistics($chart);
|
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
// Fix event and alert scale
|
2012-11-05 12:18:52 +01:00
|
|
|
$event_max = 2 + (float)$max_value * 1.05;
|
2011-04-19 14:11:00 +02:00
|
|
|
foreach ($chart as $timestamp => $chart_data) {
|
|
|
|
if ($chart_data['event'] > 0) {
|
|
|
|
$chart[$timestamp]['event'] = $event_max;
|
|
|
|
}
|
|
|
|
if ($chart_data['alert'] > 0) {
|
|
|
|
$chart[$timestamp]['alert'] = $event_max;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-05 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/main.php, general/shortcut_bar.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.preview.php, include/functions_api.php,
include/functions_html.php, include/htmlawed.php, include/pchart_graph.php,
operation/events/events_list.php, operation/netflow/nf_live_view.php:
cleaned source code style.
* godmode/menu.php, godmode/agentes/manage_config_remote.php: removed the
enterprise feature that have been wrong for years.
* general/header.php: changed to load the jquery-ui and jquery javascript
library to last version.
* extensions/insert_data.php, extensions/snmp_explorer.php,
godmode/agentes/agent_manager.php, include/ajax/agent.php,
include/javascript/pandora.js, operation/agentes/exportdata.php,
operation/events/events.php: changed the unknow plugin autocomplete for
the autocomple from jquery-ui.
* include/functions_ui.php: cleaned source code style and into the function
"ui_process_page_head" added the blacklist hardwrote for to use old jquery.
* include/styles/jquery-ui-1.8.17.custom.css,
include/javascript/jquery-1.7.1.min.js,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js: added the last
version of Jquery and Jquery-ui.
Merge from the branch "pandora_4.0"
* godmode/reporting/visual_console_builder.constans.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/javascript/pandora_visual_console.js: changed the unknow
plugin autocomplete for the autocomple from jquery-ui and added function to
paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart) with the
name "progress_bubble".
* images/percentile_item.disabled.png, images/percentile_item.png: added
images for button of percentile item (new item in visual map).
* include/styles/pandora.css: added the style for the new button percentile
item.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/functions_gd.php: cleaned source code style, and added the
params to set text and color in the function "progress_bar" and added
function to paint a Bubble Chart (http://en.wikipedia.org/wiki/Bubble_chart)
with the name "progress_bubble".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-03-05 18:56:56 +01:00
|
|
|
if (empty($unit_name)) {
|
2012-02-27 17:20:28 +01:00
|
|
|
$unit = modules_get_unit($agent_module_id);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
$unit = $unit_name;
|
2011-04-19 14:11:00 +02:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
$color = array();
|
2012-10-02 17:15:27 +02:00
|
|
|
|
|
|
|
if($show_events) {
|
|
|
|
$color['event'.$series_suffix] = array('border' => '#ff0000', 'color' => '#ff0000', 'alpha' => 50);
|
|
|
|
}
|
|
|
|
if($show_alerts) {
|
|
|
|
$color['alert'.$series_suffix] = array('border' => '#ff7f00', 'color' => '#ff7f00', 'alpha' => 50);
|
|
|
|
}
|
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
$color['max'] = array('border' => '#000000', 'color' => $config['graph_color3'], 'alpha' => 50);
|
2012-10-02 17:15:27 +02:00
|
|
|
$color['sum'] = array('border' => '#000000', 'color' => $config['graph_color2'], 'alpha' => 50);
|
2011-04-19 14:11:00 +02:00
|
|
|
$color['min'] = array('border' => '#000000', 'color' => $config['graph_color1'], 'alpha' => 50);
|
|
|
|
//$color['baseline'] = array('border' => null, 'color' => '#0097BD', 'alpha' => 10);
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
$flash_chart = $config['flash_charts'];
|
|
|
|
if ($only_image) {
|
|
|
|
$flash_chart = false;
|
|
|
|
}
|
|
|
|
|
2012-10-02 11:07:20 +02:00
|
|
|
$legend = array();
|
|
|
|
|
2012-10-02 17:15:27 +02:00
|
|
|
if($show_events) {
|
|
|
|
$legend['event'] = __('Events');
|
|
|
|
}
|
|
|
|
|
|
|
|
if($show_alerts) {
|
|
|
|
$legend['alert'] = __('Alerts');
|
|
|
|
}
|
|
|
|
|
|
|
|
$legend['max'] = __('Max').': '.__('Last').': '.$graph_stats['max']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['max']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['max']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['max']['min'].' '.$unit;
|
|
|
|
$legend['sum'] = __('Data').': '.__('Last').': '.$graph_stats['sum']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['sum']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['sum']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['sum']['min'].' '.$unit;
|
|
|
|
$legend['min'] = __('Min').': '.__('Last').': '.$graph_stats['min']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['min']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['min']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['min']['min'].' '.$unit;
|
2012-10-02 11:07:20 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
|
2012-03-01 17:41:02 +01:00
|
|
|
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
|
|
|
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
|
2012-03-08 17:32:11 +01:00
|
|
|
|
|
|
|
return area_graph($flash_chart, $chart, $width, $height, $color,
|
|
|
|
$legend, array(), '', "", $unit, $homeurl,
|
2012-03-01 17:41:02 +01:00
|
|
|
$water_mark,
|
2012-03-08 17:32:11 +01:00
|
|
|
$config['fontpath'], $config['font_size'], $unit, 1, array(), array(), 0, 0, $adapt_key, true);
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
|
2012-07-18 15:25:51 +02:00
|
|
|
/**
|
|
|
|
* Print a graph with event data of module
|
|
|
|
*
|
|
|
|
* @param integer id_module Module ID
|
|
|
|
* @param integer width graph width
|
|
|
|
* @param integer height graph height
|
|
|
|
* @param integer period time period
|
|
|
|
* @param string homeurl Home url if the complete path is needed
|
|
|
|
* @param int Zoom factor over the graph
|
|
|
|
* @param string adaptation width and margin left key (could be adapter_[something] or adapted_[something])
|
2012-09-19 16:59:31 +02:00
|
|
|
* @param int date limit of the period
|
2012-07-18 15:25:51 +02:00
|
|
|
*/
|
2012-09-19 16:59:31 +02:00
|
|
|
function graphic_module_events ($id_module, $width, $height, $period = 0, $homeurl = '', $zoom = 0, $adapt_key = '', $date = false) {
|
2012-07-18 15:25:51 +02:00
|
|
|
global $config;
|
|
|
|
global $graphic_type;
|
|
|
|
|
|
|
|
$data = array ();
|
|
|
|
|
|
|
|
$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
|
|
|
|
|
|
|
|
$interval = (int) ($period / $resolution);
|
2012-09-19 16:59:31 +02:00
|
|
|
if($date === false) {
|
|
|
|
$date = get_system_time ();
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
$datelimit = $date - $period;
|
|
|
|
$periodtime = floor ($period / $interval);
|
|
|
|
$time = array ();
|
|
|
|
$data = array ();
|
|
|
|
|
|
|
|
// Set the title and time format
|
|
|
|
if ($period <= SECONDS_6HOURS) {
|
|
|
|
$time_format = 'H:i:s';
|
|
|
|
}
|
|
|
|
elseif ($period < SECONDS_1DAY) {
|
|
|
|
$time_format = 'H:i';
|
|
|
|
}
|
|
|
|
elseif ($period < SECONDS_15DAYS) {
|
|
|
|
$time_format = 'M d H:i';
|
|
|
|
}
|
|
|
|
elseif ($period < SECONDS_1MONTH) {
|
|
|
|
$time_format = 'M d H\h';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$time_format = 'M d H\h';
|
|
|
|
}
|
|
|
|
|
|
|
|
$legend = array();
|
|
|
|
for ($i = 0; $i < $interval; $i++) {
|
|
|
|
$bottom = $datelimit + ($periodtime * $i);
|
|
|
|
if (! $graphic_type) {
|
|
|
|
$name = date($time_format, $bottom);
|
|
|
|
//$name = date('H\h', $bottom);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$name = $bottom;
|
|
|
|
}
|
|
|
|
|
|
|
|
$top = $datelimit + ($periodtime * ($i + 1));
|
2012-09-19 16:59:31 +02:00
|
|
|
|
|
|
|
$events = db_get_all_rows_filter ('tevento',
|
2012-07-18 15:25:51 +02:00
|
|
|
array ('id_agentmodule' => $id_module,
|
|
|
|
'utimestamp > '.$bottom,
|
2012-09-19 16:59:31 +02:00
|
|
|
'utimestamp < '.$top), 'event_type, utimestamp');
|
|
|
|
|
|
|
|
$status = 'normal';
|
|
|
|
foreach($events as $event) {
|
|
|
|
if(empty($event['utimestamp'])) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch($event['event_type']) {
|
|
|
|
case 'going_down_normal':
|
|
|
|
case 'going_up_normal':
|
|
|
|
// The default status is normal. Do nothing
|
|
|
|
break;
|
|
|
|
case 'going_unknown':
|
|
|
|
if($status == 'normal') {
|
|
|
|
$status = 'unknown';
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'going_up_warning':
|
|
|
|
case 'going_down_warning':
|
|
|
|
if($status == 'normal' || $status == 'unknown') {
|
|
|
|
$status = 'warning';
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'going_up_critical':
|
|
|
|
case 'going_down_critical':
|
|
|
|
$status = 'critical';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$data[$cont]['utimestamp'] = $periodtime;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2012-09-19 16:59:31 +02:00
|
|
|
if (!empty($events)){
|
|
|
|
switch ($status) {
|
|
|
|
case 'warning':
|
2012-07-18 15:25:51 +02:00
|
|
|
$data[$cont]['data'] = 2;
|
|
|
|
break;
|
2012-09-19 16:59:31 +02:00
|
|
|
case 'critical':
|
2012-07-18 15:25:51 +02:00
|
|
|
$data[$cont]['data'] = 3;
|
|
|
|
break;
|
2012-09-19 16:59:31 +02:00
|
|
|
case 'unknown':
|
|
|
|
$data[$cont]['data'] = 4;
|
|
|
|
break;
|
2012-07-18 15:25:51 +02:00
|
|
|
default:
|
|
|
|
$data[$cont]['data'] = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$data[$cont]['data'] = 1;
|
|
|
|
$current_timestamp = $bottom;
|
|
|
|
}
|
2012-09-19 16:59:31 +02:00
|
|
|
|
2012-07-18 15:25:51 +02:00
|
|
|
$legend[] = date($time_format, $current_timestamp);
|
|
|
|
$cont++;
|
|
|
|
}
|
|
|
|
|
|
|
|
$pixels_between_xdata = 25;
|
|
|
|
$max_xdata_display = round($width / $pixels_between_xdata);
|
|
|
|
$ndata = count($data);
|
|
|
|
if($max_xdata_display > $ndata) {
|
|
|
|
$xdata_display = $ndata;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$xdata_display = $max_xdata_display;
|
|
|
|
}
|
|
|
|
|
|
|
|
$step = round($ndata/$xdata_display);
|
|
|
|
|
|
|
|
$colors = array(1 => '#38B800', 2 => '#FFFF00', 3 => '#FF0000', 4 => '#C3C3C3');
|
|
|
|
|
|
|
|
// Draw slicebar graph
|
|
|
|
if($config['flash_charts']) {
|
|
|
|
echo flot_slicesbar_graph($data, $period, $width, 15, $legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', $adapt_key);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo slicesbar_graph($data, $period, $width, 15, $colors, $config['fontpath'], $config['round_corner'], $homeurl);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///Functions for the LOG4X graphs
|
|
|
|
function grafico_modulo_log4x ($id_agente_modulo, $periodo, $show_event,
|
|
|
|
$width, $height , $title, $unit_name, $show_alert, $avg_only = 0, $pure=0,
|
|
|
|
$date = 0) {
|
|
|
|
|
|
|
|
grafico_modulo_log4x_trace("<pre style='text-align:left;'>");
|
|
|
|
|
|
|
|
if ($date == "")
|
|
|
|
$now = time ();
|
|
|
|
else
|
|
|
|
$now = $date;
|
|
|
|
|
|
|
|
$fechatope = $now - $periodo; // limit date
|
|
|
|
|
|
|
|
$nombre_agente = modules_get_agentmodule_agent_name ($id_agente_modulo);
|
|
|
|
$nombre_modulo = modules_get_agentmodule_name ($id_agente_modulo);
|
|
|
|
$id_agente = agents_get_agent_id ($nombre_agente);
|
|
|
|
|
|
|
|
$adjust_time = SECONDS_1MINUTE;
|
|
|
|
|
|
|
|
if ($periodo == SECONDS_1DAY)
|
|
|
|
$adjust_time = SECONDS_1HOUR;
|
|
|
|
elseif ($periodo == SECONDS_1WEEK)
|
|
|
|
$adjust_time = SECONDS_1DAY;
|
|
|
|
elseif ($periodo == SECONDS_1HOUR)
|
|
|
|
$adjust_time = SECONDS_10MINUTES;
|
|
|
|
elseif ($periodo == SECONDS_1MONTH)
|
|
|
|
$adjust_time = SECONDS_1WEEK;
|
|
|
|
else
|
|
|
|
$adjust_time = $periodo / 12.0;
|
|
|
|
|
|
|
|
$num_slices = $periodo / $adjust_time;
|
|
|
|
|
|
|
|
$fechatope_index = grafico_modulo_log4x_index($fechatope, $adjust_time);
|
|
|
|
|
|
|
|
$sql1="SELECT utimestamp, SEVERITY " .
|
2011-12-22 19:42:50 +01:00
|
|
|
" FROM tagente_datos_log4x " .
|
|
|
|
" WHERE id_agente_modulo = $id_agente_modulo AND utimestamp > $fechatope and utimestamp < $now";
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$valores = array();
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$max_count = -1;
|
|
|
|
$min_count = 9999999;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace("$sql1");
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$rows = 0;
|
|
|
|
|
|
|
|
$first = true;
|
|
|
|
while ($row = get_db_all_row_by_steps_sql($first, $result, $sql1)){
|
|
|
|
$first = false;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$rows++;
|
|
|
|
$utimestamp = $row[0];
|
|
|
|
$severity = $row[1];
|
|
|
|
$severity_num = $row[2];
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
if (!isset($valores[$severity]))
|
2012-07-18 15:25:51 +02:00
|
|
|
$valores[$severity] = array();
|
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$dest = grafico_modulo_log4x_index($utimestamp, $adjust_time);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$index = (($dest - $fechatope_index) / $adjust_time) - 1;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
if (!isset($valores[$severity][$index])) {
|
2012-07-18 15:25:51 +02:00
|
|
|
$valores[$severity][$index] = array();
|
|
|
|
$valores[$severity][$index]['pivot'] = $dest;
|
|
|
|
$valores[$severity][$index]['count'] = 0;
|
|
|
|
$valores[$severity][$index]['alerts'] = 0;
|
2011-12-22 19:42:50 +01:00
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$valores[$severity][$index]['count']++;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$max_count = max($max_count, $valores[$severity][$index]['count']);
|
|
|
|
$min_count = min($min_count, $valores[$severity][$index]['count']);
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace("$rows rows");
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
// Create graph
|
|
|
|
// *************
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
//set_error_handler("myErrorHandler");
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2011-04-19 14:11:00 +02:00
|
|
|
set_include_path(get_include_path() . PATH_SEPARATOR . getcwd() . "/../../include");
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-04-19 14:11:00 +02:00
|
|
|
require_once 'Image/Graph.php';
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$Graph =& Image_Graph::factory('graph', array($width, $height));
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
// add a TrueType font
|
|
|
|
$Font =& $Graph->addNew('font', $config['fontpath']); // C:\WINNT\Fonts\ARIAL.TTF
|
|
|
|
$Font->setSize(7);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$Graph->setFont($Font);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
|
|
|
if ($periodo == SECONDS_1DAY)
|
2011-12-22 19:42:50 +01:00
|
|
|
$title_period = $lang_label["last_day"];
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($periodo == SECONDS_1WEEK)
|
2011-12-22 19:42:50 +01:00
|
|
|
$title_period = $lang_label["last_week"];
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($periodo == SECONDS_1HOUR)
|
2011-12-22 19:42:50 +01:00
|
|
|
$title_period = $lang_label["last_hour"];
|
2012-07-18 15:25:51 +02:00
|
|
|
elseif ($periodo == SECONDS_1MONTH)
|
2011-12-22 19:42:50 +01:00
|
|
|
$title_period = $lang_label["last_month"];
|
|
|
|
else {
|
|
|
|
$suffix = $lang_label["days"];
|
2012-07-18 15:25:51 +02:00
|
|
|
$graph_extension = $periodo / SECONDS_1DAY;
|
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
if ($graph_extension < 1) {
|
2012-07-18 15:25:51 +02:00
|
|
|
$graph_extension = $periodo / SECONDS_1HOUR;
|
2011-12-22 19:42:50 +01:00
|
|
|
$suffix = $lang_label["hours"];
|
|
|
|
}
|
|
|
|
//$title_period = "Last ";
|
|
|
|
$title_period = format_numeric($graph_extension,2)." $suffix";
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$title_period = html_entity_decode($title_period);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
if ($pure == 0){
|
|
|
|
$Graph->add(
|
2012-07-18 15:25:51 +02:00
|
|
|
Image_Graph::horizontal(
|
|
|
|
Image_Graph::vertical(
|
|
|
|
Image_Graph::vertical(
|
|
|
|
$Title = Image_Graph::factory('title', array(' Pandora FMS Graph - '.strtoupper($nombre_agente)." - " .$title_period, 10)),
|
|
|
|
$Subtitle = Image_Graph::factory('title', array(' '.$title, 7)),
|
|
|
|
90
|
|
|
|
),
|
|
|
|
$Plotarea = Image_Graph::factory('plotarea', array('Image_Graph_Axis', 'Image_Graph_Axis')),
|
|
|
|
15 // If you change this, change the 0.85 below
|
|
|
|
),
|
|
|
|
Image_Graph::vertical(
|
|
|
|
$Legend = Image_Graph::factory('legend'),
|
|
|
|
$PlotareaMinMax = Image_Graph::factory('plotarea'),
|
|
|
|
65
|
|
|
|
),
|
|
|
|
85 // If you change this, change the 0.85 below
|
|
|
|
)
|
2011-12-22 19:42:50 +01:00
|
|
|
);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$Legend->setPlotarea($Plotarea);
|
|
|
|
$Title->setAlignment(IMAGE_GRAPH_ALIGN_LEFT);
|
|
|
|
$Subtitle->setAlignment(IMAGE_GRAPH_ALIGN_LEFT);
|
2012-07-18 15:25:51 +02:00
|
|
|
}
|
|
|
|
else { // Pure, without title and legends
|
2011-12-22 19:42:50 +01:00
|
|
|
$Graph->add($Plotarea = Image_Graph::factory('plotarea', array('Image_Graph_Axis', 'Image_Graph_Axis')));
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$dataset = array();
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$severities = array("FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE");
|
|
|
|
$colors = array("black", "red", "orange", "yellow", "#3300ff", 'magenta');
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$max_bubble_radius = $height * 0.6 / (count($severities) + 1); // this is the size for the max_count
|
|
|
|
$y = count($severities) - 1;
|
|
|
|
$i = 0;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
foreach($severities as $severity) {
|
|
|
|
$dataset[$i] = Image_Graph::factory('dataset');
|
|
|
|
$dataset[$i]->setName($severity);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
if (isset($valores[$severity])){
|
|
|
|
$data =& $valores[$severity];
|
|
|
|
while (list($index, $data2) = each($data)) {
|
|
|
|
$count = $data2['count'];
|
|
|
|
$pivot = $data2['pivot'];
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
//$x = $scale * $index;
|
|
|
|
$x = 100.0 * ($pivot - $fechatope) / ($now - $fechatope);
|
|
|
|
if ($x > 100) $x = 100;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$size = grafico_modulo_log4x_bubble_size($count, $max_count, $max_bubble_radius);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
// pivot is the value in the X axis
|
|
|
|
// y is the number of steps (from the bottom of the graphics) (zero based)
|
|
|
|
// x is the position of the bubble, in % from the left (0% = full left, 100% = full right)
|
|
|
|
// size is the radius of the bubble
|
|
|
|
// value is the value associated with the bubble (needed to calculate the leyend)
|
|
|
|
//
|
|
|
|
$dataset[$i]->addPoint($pivot, $y, array("x" => $x, "size" => $size, "value" => $count));
|
|
|
|
}
|
2012-06-25 15:17:05 +02:00
|
|
|
}
|
|
|
|
else {
|
2011-12-22 19:42:50 +01:00
|
|
|
// There's a problem when we have no data ...
|
|
|
|
// This was the first try.. didnt work
|
|
|
|
//$dataset[$i]->addPoint($now, -1, array("x" => 0, "size" => 0));
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$y--;
|
|
|
|
$i++;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
// create the 1st plot as smoothed area chart using the 1st dataset
|
|
|
|
$Plot =& $Plotarea->addNew('bubble', array(&$dataset));
|
|
|
|
$Plot->setFont($Font);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X);
|
|
|
|
$AxisX->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Function', 'grafico_modulo_log4x_format_x_axis'));
|
|
|
|
$AxisX->forceMinimum($fechatope);
|
|
|
|
$AxisX->forceMaximum($now);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$minIntervalWidth = $Plot->getTextWidth("88/88/8888");
|
|
|
|
$interval_x = $adjust_time;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
while (true) {
|
|
|
|
$intervalWidth = $width * 0.85 * $interval_x/ $periodo;
|
|
|
|
if ($intervalWidth >= $minIntervalWidth)
|
|
|
|
break;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$interval_x *= 2;
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$AxisX->setLabelInterval($interval_x);
|
|
|
|
$AxisX->setLabelOption("showtext",true);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
//*
|
|
|
|
$GridY2 =& $Plotarea->addNew('line_grid');
|
|
|
|
$GridY2->setLineColor('gray');
|
|
|
|
$GridY2->setFillColor('lightgray@0.05');
|
|
|
|
$GridY2->_setPrimaryAxis($AxisX);
|
|
|
|
//$GridY2->setLineStyle(Image_Graph::factory('Image_Graph_Line_Dotted', array("white", "gray", "gray", "gray")));
|
|
|
|
$GridY2->setLineStyle(Image_Graph::factory('Image_Graph_Line_Formatted', array(array("transparent", "transparent", "transparent", "gray"))));
|
|
|
|
//*/
|
|
|
|
//grafico_modulo_log4x_trace(print_r($AxisX, true));
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y);
|
|
|
|
$AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Function', 'grafico_modulo_log4x_format_y_axis'));
|
|
|
|
$AxisY->setLabelOption("showtext",true);
|
|
|
|
//$AxisY->setLabelInterval(0);
|
|
|
|
//$AxisY->showLabel(IMAGE_GRAPH_LABEL_ZERO);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
//*
|
|
|
|
$GridY2 =& $Plotarea->addNew('line_grid');
|
|
|
|
$GridY2->setLineColor('gray');
|
|
|
|
$GridY2->setFillColor('lightgray@0.05');
|
|
|
|
$GridY2->_setPrimaryAxis($AxisY);
|
|
|
|
$GridY2->setLineStyle(Image_Graph::factory('Image_Graph_Line_Formatted', array(array("transparent", "transparent", "transparent", "gray"))));
|
|
|
|
//*/
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$AxisY->forceMinimum(0);
|
|
|
|
$AxisY->forceMaximum(count($severities) + 1) ;
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
// set line colors
|
|
|
|
$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array');
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$Plot->setFillStyle($FillArray);
|
|
|
|
foreach($colors as $color)
|
2012-07-18 15:25:51 +02:00
|
|
|
$FillArray->addColor($color);
|
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$FillArray->addColor('green@0.6');
|
|
|
|
//$AxisY_Weather =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
// Show events !
|
|
|
|
if ($show_event == 1){
|
|
|
|
$Plot =& $Plotarea->addNew('Plot_Impulse', array($dataset_event));
|
|
|
|
$Plot->setLineColor( 'red' );
|
|
|
|
$Marker_event =& Image_Graph::factory('Image_Graph_Marker_Cross');
|
|
|
|
$Plot->setMarker($Marker_event);
|
|
|
|
$Marker_event->setFillColor( 'red' );
|
|
|
|
$Marker_event->setLineColor( 'red' );
|
|
|
|
$Marker_event->setSize ( 5 );
|
|
|
|
}
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$Axis =& $PlotareaMinMax->getAxis(IMAGE_GRAPH_AXIS_X);
|
|
|
|
$Axis->Hide();
|
|
|
|
$Axis =& $PlotareaMinMax->getAxis(IMAGE_GRAPH_AXIS_Y);
|
|
|
|
$Axis->Hide();
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$plotMinMax =& $PlotareaMinMax->addNew('bubble', array(&$dataset, true));
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
$Graph->done();
|
2012-07-18 15:25:51 +02:00
|
|
|
|
2011-12-22 19:42:50 +01:00
|
|
|
grafico_modulo_log4x_trace(__LINE__);
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_modulo_log4x_index($x, $interval)
|
2011-04-19 14:11:00 +02:00
|
|
|
{
|
2012-07-18 15:25:51 +02:00
|
|
|
return $x + $interval - (($x - 1) % $interval) - 1;
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_modulo_log4x_trace($str)
|
2011-04-19 14:11:00 +02:00
|
|
|
{
|
2012-07-18 15:25:51 +02:00
|
|
|
//echo "$str\n";
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_modulo_log4x_bubble_size($count, $max_count, $max_bubble_radius)
|
2011-04-19 14:11:00 +02:00
|
|
|
{
|
2012-07-18 15:25:51 +02:00
|
|
|
//Superformula de ROA
|
|
|
|
$r0 = 1.5;
|
|
|
|
$r1 = $max_bubble_radius;
|
|
|
|
$v2 = pow($max_count,1/2.0);
|
|
|
|
|
|
|
|
return $r1*pow($count,1/2.0)/($v2)+$r0;
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_modulo_log4x_format_x_axis ( $number , $decimals=2, $dec_point=".", $thousands_sep=",")
|
2011-04-19 14:11:00 +02:00
|
|
|
{
|
2012-07-18 15:25:51 +02:00
|
|
|
// $number is the unix time in the local timezone
|
|
|
|
|
|
|
|
//$dtZone = new DateTimeZone(date_default_timezone_get());
|
|
|
|
//$d = new DateTime("now", $dtZone);
|
|
|
|
//$offset = $dtZone->getOffset($d);
|
|
|
|
//$number -= $offset;
|
|
|
|
|
|
|
|
return date("d/m", $number) . "\n" . date("H:i", $number);
|
2011-04-19 14:11:00 +02:00
|
|
|
}
|
|
|
|
|
2011-07-19 11:28:09 +02:00
|
|
|
function grafico_modulo_log4x_format_y_axis ( $number , $decimals=2, $dec_point=".", $thousands_sep=",")
|
2011-04-19 14:11:00 +02:00
|
|
|
{
|
2012-07-18 15:25:51 +02:00
|
|
|
switch($number) {
|
|
|
|
case 6:
|
|
|
|
return "FATAL";
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
return "ERROR";
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
return "WARN";
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
return "INFO";
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
return "DEBUG";
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
return "TRACE";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return "";
|
2012-03-01 17:41:02 +01:00
|
|
|
}
|
2012-02-13 11:54:45 +01:00
|
|
|
}
|
2012-10-02 17:15:27 +02:00
|
|
|
?>
|