2009-10-26 17:35:34 +01:00
< ? php
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU 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-04-26 16:42:48 +02:00
global $config ;
2009-10-26 17:35:34 +01:00
//Set character encoding to UTF-8 - fixes a lot of multibyte character headaches
require_once ( 'functions_agents.php' );
2009-12-07 19:00:00 +01:00
require_once ( 'functions_modules.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_profile.php " );
include_once ( $config [ 'homedir' ] . " /include/functions.php " );
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
include_once ( $config [ 'homedir' ] . " /include/functions_ui.php " );
2012-08-10 10:33:48 +02:00
include_once ( $config [ 'homedir' ] . " /include/functions_graph.php " );
2011-09-15 15:19:11 +02:00
include_once ( $config [ 'homedir' ] . " /include/functions_events.php " );
2012-01-12 16:33:52 +01:00
include_once ( $config [ 'homedir' ] . " /include/functions_groups.php " );
2012-01-17 21:20:45 +01:00
include_once ( $config [ 'homedir' ] . " /include/functions_network_components.php " );
2012-10-02 13:11:58 +02:00
include_once ( $config [ 'homedir' ] . " /include/functions_netflow.php " );
2012-12-19 09:48:12 +01:00
include_once ( $config [ 'homedir' ] . " /include/functions_servers.php " );
2012-01-17 21:20:45 +01:00
enterprise_include_once ( 'include/functions_local_components.php' );
2009-10-26 17:35:34 +01:00
/**
* Parse the " other " parameter .
*
* @ param string $other
* @ param mixed $otherType
* @ return mixed
*/
function parseOtherParameter ( $other , $otherType ) {
2012-09-13 19:47:21 +02:00
2009-10-26 17:35:34 +01:00
switch ( $otherType ) {
case 'url_encode' :
$returnVar = array ( 'type' => 'string' , 'data' => urldecode ( $other ));
break ;
default :
if ( strpos ( $otherType , 'url_encode_separator_' ) !== false ) {
2012-01-17 13:08:53 +01:00
$separator = str_replace ( 'url_encode_separator_' , '' , $otherType );
2010-05-27 17:23:46 +02:00
$returnVar = array ( 'type' => 'array' , 'data' => explode ( $separator , $other ));
2009-10-26 17:35:34 +01:00
foreach ( $returnVar [ 'data' ] as $index => $element )
$returnVar [ 'data' ][ $index ] = urldecode ( $element );
}
else {
$returnVar = array ( 'type' => 'string' , 'data' => urldecode ( $other ));
}
break ;
}
return $returnVar ;
}
/**
*
* @ param $typeError
* @ param $returnType
* @ return unknown_type
*/
2012-04-25 20:09:05 +02:00
function returnError ( $typeError , $returnType = 'string' ) {
2009-10-26 17:35:34 +01:00
switch ( $typeError ) {
case 'no_set_no_get_no_help' :
returnData ( $returnType ,
array ( 'type' => 'string' , 'data' => __ ( 'No set or get or help operation.' )));
break ;
case 'no_exist_operation' :
returnData ( $returnType ,
2009-12-07 Pablo de la Concepcipón <pablo.concepcion@artica.es>
* include/functions_api.php, include/functions.php,
extensions/plugin_registration.php, operation/events/events.php,
operation/agentes/exportdata.php, operation/agentes/stat_win.php,
godmode/setup/setup.php, godmode/agentes/configurar_agente.php,
godmode/agentes/agent_manager.php, godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/graph_builder.php, godmode/alerts/alert_list.php: English
text strings updated to be more clear.
* include/languages/index.pot: Regenerated with updated strings
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2171 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-12-07 19:48:59 +01:00
array ( 'type' => 'string' , 'data' => __ ( 'This operation does not exist.' )));
2009-10-26 17:35:34 +01:00
break ;
case 'id_not_found' :
returnData ( $returnType ,
2009-12-07 Pablo de la Concepcipón <pablo.concepcion@artica.es>
* include/functions_api.php, include/functions.php,
extensions/plugin_registration.php, operation/events/events.php,
operation/agentes/exportdata.php, operation/agentes/stat_win.php,
godmode/setup/setup.php, godmode/agentes/configurar_agente.php,
godmode/agentes/agent_manager.php, godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/graph_builder.php, godmode/alerts/alert_list.php: English
text strings updated to be more clear.
* include/languages/index.pot: Regenerated with updated strings
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2171 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-12-07 19:48:59 +01:00
array ( 'type' => 'string' , 'data' => __ ( 'Id does not exist in BD.' )));
2009-10-26 17:35:34 +01:00
break ;
2009-10-27 10:15:21 +01:00
default :
2012-04-25 20:09:05 +02:00
returnData ( $returnType ,
array ( 'type' => 'string' , 'data' => __ ( $typeError )));
2009-10-27 10:15:21 +01:00
break ;
2009-10-26 17:35:34 +01:00
}
}
/**
*
* @ param $returnType
* @ param $data
2010-05-27 17:23:46 +02:00
* @ param $separator
*
* @ return
2009-10-26 17:35:34 +01:00
*/
function returnData ( $returnType , $data , $separator = ';' ) {
switch ( $returnType ) {
case 'string' :
2012-10-03 15:04:56 +02:00
if ( $data [ 'type' ] == 'string' ) {
2009-10-26 17:35:34 +01:00
echo $data [ 'data' ];
2012-10-03 15:04:56 +02:00
} else
2009-10-26 17:35:34 +01:00
; //TODO
break ;
case 'csv' :
case 'csv_head' :
switch ( $data [ 'type' ]) {
case 'array' :
if ( array_key_exists ( 'list_index' , $data ))
{
if ( $returnType == 'csv_head' ) {
foreach ( $data [ 'list_index' ] as $index ) {
echo $index ;
if ( end ( $data [ 'list_index' ]) == $index )
echo " \n " ;
else
echo $separator ;
}
}
foreach ( $data [ 'data' ] as $dataContent ) {
foreach ( $data [ 'list_index' ] as $index ) {
if ( array_key_exists ( $index , $dataContent ))
echo $dataContent [ $index ];
if ( end ( $data [ 'list_index' ]) == $index )
echo " \n " ;
else
echo $separator ;
}
}
}
else {
2011-09-21 22:43:24 +02:00
if ( ! empty ( $data [ 'data' ])) {
foreach ( $data [ 'data' ] as $dataContent ) {
2011-09-22 11:40:49 +02:00
$clean = array_map ( " array_apply_io_safe_output " , $dataContent );
2011-09-21 22:43:24 +02:00
echo implode ( $separator , $clean ) . " \n " ;
}
2009-10-26 17:35:34 +01:00
}
}
break ;
2012-04-25 20:09:05 +02:00
case 'string' :
echo $data [ 'data' ];
break ;
2009-10-26 17:35:34 +01:00
}
break ;
2012-10-02 13:11:58 +02:00
case 'json' :
echo json_encode ( $data );
break ;
2009-10-26 17:35:34 +01:00
}
}
2011-09-22 11:40:49 +02:00
function array_apply_io_safe_output ( $item ) {
return io_safe_output ( $item );
}
2009-10-26 17:35:34 +01:00
/**
*
* @ param $ip
* @ return unknown_type
*/
function isInACL ( $ip ) {
global $config ;
2009-10-27 09:54:59 +01:00
2009-10-26 17:35:34 +01:00
if ( in_array ( $ip , $config [ 'list_ACL_IPs_for_API' ]))
return true ;
2011-11-28 17:37:08 +01:00
// If the IP is not in the list, we check one by one, all the wildcard registers
foreach ( $config [ 'list_ACL_IPs_for_API' ] as $acl_ip ) {
2013-02-25 11:29:52 +01:00
if ( preg_match ( '/\*/' , $acl_ip )) {
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.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/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
2011-11-28 17:37:08 +01:00
// Scape for protection
$acl_ip = str_replace ( '.' , '\.' , $acl_ip );
2012-06-14 17:07:40 +02:00
// Replace wilcard by .* to do efective in regular expression
$acl_ip = str_replace ( '*' , '.*' , $acl_ip );
2011-11-28 17:37:08 +01:00
// If the string match with the beginning of the IP give it access
2013-02-25 11:29:52 +01:00
if ( preg_match ( '/' . $acl_ip . '/' , $ip )) {
2011-11-28 17:37:08 +01:00
return true ;
}
}
}
return false ;
2009-10-26 17:35:34 +01:00
}
2012-06-14 17:07:40 +02:00
// Return string OK,[version],[build]
function api_get_test () {
global $pandora_version ;
global $build_version ;
echo " OK, $pandora_version , $build_version " ;
2012-05-30 11:20:55 +02:00
}
2012-04-26 12:03:53 +02:00
//-------------------------DEFINED OPERATIONS FUNCTIONS-----------------
2012-06-14 17:07:40 +02:00
function api_get_groups ( $thrash1 , $thrash2 , $other , $returnType , $user_in_db ) {
2011-09-16 13:08:08 +02:00
if ( $other [ 'type' ] == 'string' ) {
if ( $other [ 'data' ] != '' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else { //Default values
$separator = ';' ;
}
}
else if ( $other [ 'type' ] == 'array' ) {
$separator = $other [ 'data' ][ 0 ];
}
$groups = users_get_groups ( $user_in_db , " IR " );
$data_groups = array ();
foreach ( $groups as $id => $group ) {
$data_groups [] = array ( $id , $group );
}
$data [ 'type' ] = 'array' ;
$data [ 'data' ] = $data_groups ;
returnData ( $returnType , $data , $separator );
}
2009-10-26 17:35:34 +01:00
2012-06-14 17:07:40 +02:00
function api_get_agent_module_name_last_value ( $agentName , $moduleName , $other = ';' , $returnType )
2009-10-26 17:35:34 +01:00
{
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
$idAgent = agents_get_agent_id ( $agentName );
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_messages.php,
include/functions_exportserver.php, include/functions_reporting.php,
include/functions_gis.php, include/functions_networkmap.php,
include/functions_servers.php, include/functions_api.php,
include/fgraph.php, include/functions_agents.php, include/functions_db.php,
include/functions_alerts.php, extensions/module_groups.php,
operation/incidents/incident.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/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/sla_view.php, operation/agentes/ver_agente.php,
operation/servers/view_server_detail.php, operation/menu.php,
operation/search_graphs.php, operation/snmpconsole/snmp_view.php,
operation/gis_maps/ajax.php, operation/events/events_rss.php,
operation/events/events_list.php, operation/search_alerts.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
operation/search_users.php, mobile/operation/agents/view_agents.php,
mobile/operation/events/events.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/db/db_main.php, godmode/db/db_purge.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php, godmode/users/configure_user.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.item_editor.php: changed or added in
some cases the SQL queries for to be PostgreSQL standard, and cleaned source
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 15:26:36 +01:00
switch ( $config [ " dbtype " ]) {
case " mysql " :
$sql = sprintf ( ' SELECT id_agente_modulo
FROM tagente_modulo
WHERE id_agente = % d AND nombre LIKE " %s " ' , $idAgent , $moduleName );
break ;
case " postgresql " :
2011-04-11 19:05:20 +02:00
case " oracle " :
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_messages.php,
include/functions_exportserver.php, include/functions_reporting.php,
include/functions_gis.php, include/functions_networkmap.php,
include/functions_servers.php, include/functions_api.php,
include/fgraph.php, include/functions_agents.php, include/functions_db.php,
include/functions_alerts.php, extensions/module_groups.php,
operation/incidents/incident.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/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/sla_view.php, operation/agentes/ver_agente.php,
operation/servers/view_server_detail.php, operation/menu.php,
operation/search_graphs.php, operation/snmpconsole/snmp_view.php,
operation/gis_maps/ajax.php, operation/events/events_rss.php,
operation/events/events_list.php, operation/search_alerts.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
operation/search_users.php, mobile/operation/agents/view_agents.php,
mobile/operation/events/events.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/db/db_main.php, godmode/db/db_purge.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php, godmode/users/configure_user.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.item_editor.php: changed or added in
some cases the SQL queries for to be PostgreSQL standard, and cleaned source
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 15:26:36 +01:00
$sql = sprintf ( ' SELECT id_agente_modulo
FROM tagente_modulo
WHERE id_agente = % d AND nombre LIKE \ '%s\'' , $idAgent , $moduleName );
break ;
}
2009-10-26 17:35:34 +01: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
$idModuleAgent = db_get_value_sql ( $sql );
2009-10-26 17:35:34 +01:00
if ( $idModuleAgent === false ) {
switch ( $other [ 'type' ]) {
case 'string' :
switch ( $other [ 'data' ]) {
case 'error_message' :
default :
returnError ( 'id_not_found' , $returnType );
break ;
}
break ;
case 'array' :
switch ( $other [ 'data' ][ 0 ]) {
case 'error_value' :
returnData ( $returnType , array ( 'type' => 'string' , 'data' => $other [ 'data' ][ 1 ]));
break ;
}
break ;
}
}
else {
2012-04-25 20:09:05 +02:00
get_module_last_value ( $idModuleAgent , null , $other , $returnType );
2009-10-26 17:35:34 +01:00
}
}
2012-06-14 17:07:40 +02:00
function api_get_module_last_value ( $idAgentModule , $trash1 , $other = ';' , $returnType )
2009-10-26 17:35:34 +01:00
{
$sql = sprintf ( 'SELECT datos FROM tagente_estado WHERE id_agente_modulo = %d' , $idAgentModule );
* 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_value_sql ( $sql );
2009-10-26 17:35:34 +01:00
if ( $value === false ) {
switch ( $other [ 'type' ]) {
case 'string' :
switch ( $other [ 'data' ]) {
case 'error_message' :
default :
returnError ( 'id_not_found' , $returnType );
break ;
}
break ;
case 'array' :
switch ( $other [ 'data' ][ 0 ]) {
case 'error_value' :
returnData ( $returnType , array ( 'type' => 'string' , 'data' => $other [ 'data' ][ 1 ]));
break ;
}
break ;
}
}
else {
$data = array ( 'type' => 'string' , 'data' => $value );
returnData ( $returnType , $data );
}
}
/**
*
* @ param $trash1
* @ param $trahs2
* @ param mixed $other If $other is string is only the separator ,
* but if it ' s array , $other as param is < separator > ; < replace_return > ;( < field_1 > , < field_2 >...< field_n > ) in this order
* and separator char ( after text ; ) must be diferent that separator ( and other ) url ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* return csv with fields type_row , group_id and agent_name , separate with " ; " and the return of the text replace for " "
* api . php ? op = get & op2 = tree_agents & return_type = csv & other = ; | | type_row , group_id , agent_name & other_mode = url_encode_separator_ |
*
*
* @ param $returnType
* @ return unknown_type
*/
2012-06-14 17:07:40 +02:00
function api_get_tree_agents ( $trash1 , $trahs2 , $other , $returnType )
2009-10-30 13:51:47 +01:00
{
2009-10-26 17:35:34 +01:00
if ( $other [ 'type' ] == 'array' ) {
$separator = $other [ 'data' ][ 0 ];
$returnReplace = $other [ 'data' ][ 1 ];
if ( trim ( $other [ 'data' ][ 2 ]) == '' )
$fields = false ;
else {
$fields = explode ( ',' , $other [ 'data' ][ 2 ]);
foreach ( $fields as $index => $field )
$fields [ $index ] = trim ( $field );
}
}
else {
2009-10-30 13:51:47 +01:00
if ( strlen ( $other [ 'data' ]) == 0 )
$separator = ';' ; //by default
else
$separator = $other [ 'data' ];
2009-10-26 17:35:34 +01:00
$returnReplace = ' ' ;
$fields = false ;
}
2013-03-15 07:30:26 +01:00
/** NOTE : if you want to add an output field , you have to add it to ;
1. $master_fields ( field name )
2. one of following field_column_mapping array ( a pair of field name and corresponding column designation )
e . g . To add a new field named 'agent_NEWFIELD' that comes from tagente ' s COLUMN_X , you have to add ;
1. " agent_NEW_FIELD " to $master_fields
2. " 'agent_NEW_FIELD' => 'agent_NEWFIELD as COLUMN_X' " to $agent_field_column_mapping
**/
/* all of output field names */
$master_fields = array (
'type_row' ,
'group_id' ,
'group_name' ,
'group_parent' ,
'disabled' ,
'custom_id' ,
'agent_id' ,
'agent_name' ,
'agent_direction' ,
'agent_comentary' ,
'agent_id_group' ,
'agent_last_contant' ,
'agent_mode' ,
'agent_interval' ,
'agent_id_os' ,
'agent_os_version' ,
'agent_version' ,
'agent_last_remote_contact' ,
'agent_disabled' ,
'agent_id_parent' ,
'agent_custom_id' ,
'agent_server_name' ,
'agent_cascade_protection' ,
'module_id_agent_modulo' ,
'module_id_agent' ,
'module_id_module_type' ,
'module_description' ,
'module_name' ,
'module_max' ,
'module_min' ,
'module_interval' ,
'module_tcp_port' ,
'module_tcp_send' ,
'module_tcp_rcv' ,
'module_snmp_community' ,
'module_snmp_oid' ,
'module_ip_target' ,
'module_id_module_group' ,
'module_flag' ,
'module_id_module' ,
'module_disabled' ,
'module_id_export' ,
'module_plugin_user' ,
'module_plugin_pass' ,
'module_plugin_parameter' ,
'module_id_plugin' ,
'module_post_process' ,
'module_prediction_module' ,
'module_max_timeout' ,
'module_max_retries' ,
'module_custom_id' ,
'module_history_data' ,
'module_min_warning' ,
'module_max_warning' ,
'module_str_warning' ,
'module_min_critical' ,
'module_max_critical' ,
'module_str_critical' ,
'module_min_ff_event' ,
'module_delete_pending' ,
'module_id_agent_state' ,
'module_data' ,
'module_timestamp' ,
'module_state' ,
'module_last_try' ,
'module_utimestamp' ,
'module_current_interval' ,
'module_running_by' ,
'module_last_execution_try' ,
'module_status_changes' ,
'module_last_status' ,
'alert_id_agent_module' ,
'alert_id_alert_template' ,
'alert_internal_counter' ,
'alert_last_fired' ,
'alert_last_reference' ,
'alert_times_fired' ,
'alert_disabled' ,
'alert_force_execution' ,
'alert_id_alert_action' ,
'alert_type' ,
'alert_value' ,
'alert_matches_value' ,
'alert_max_value' ,
'alert_min_value' ,
'alert_time_threshold' ,
'alert_max_alerts' ,
'alert_min_alerts' ,
'alert_time_from' ,
'alert_time_to' ,
'alert_monday' ,
'alert_tuesday' ,
'alert_wednesday' ,
'alert_thursday' ,
'alert_friday' ,
'alert_saturday' ,
'alert_sunday' ,
'alert_recovery_notify' ,
'alert_field2_recovery' ,
'alert_field3_recovery' ,
'alert_id_alert_template_module' ,
'alert_fires_min' ,
'alert_fires_max' ,
'alert_id_alert_command' ,
'alert_command' ,
'alert_internal' ,
'alert_template_modules_id' ,
'alert_templates_id' ,
'alert_template_module_actions_id' ,
'alert_actions_id' ,
'alert_commands_id' ,
'alert_templates_name' ,
'alert_actions_name' ,
'alert_commands_name' ,
'alert_templates_description' ,
'alert_commands_description' ,
'alert_template_modules_priority' ,
'alert_templates_priority' ,
'alert_templates_field1' ,
'alert_actions_field1' ,
'alert_templates_field2' ,
'alert_actions_field2' ,
'alert_templates_field3' ,
'alert_actions_field3' ,
'alert_templates_id_group' ,
'alert_actions_id_group'
);
/* agent related field mappings (output field => column designation for 'tagente') */
$agent_field_column_mapping = array (
/* agent_id is not in this list (because it is mandatory) */
/* agent_id_group is not in this list */
'agent_name' => 'nombre as agent_name' ,
'agent_direction' => 'direccion as agent_direction' ,
'agent_comentary' => 'comentarios as agent_comentary' ,
'agent_last_contant' => 'ultimo_contacto as agent_last_contant' ,
'agent_mode' => 'modo as agent_mode' ,
'agent_interval' => 'intervalo as agent_interval' ,
'agent_id_os' => 'id_os as agent_id_os' ,
'agent_os_version' => 'os_version as agent_os_version' ,
'agent_version' => 'agent_version as agent_version' ,
'agent_last_remote_contact' => 'ultimo_contacto_remoto as agent_last_remote_contact' ,
'agent_disabled' => 'disabled as agent_disabled' ,
'agent_id_parent' => 'id_parent as agent_id_parent' ,
'agent_custom_id' => 'custom_id as agent_custom_id' ,
'agent_server_name' => 'server_name as agent_server_name' ,
'agent_cascade_protection' => 'cascade_protection as agent_cascade_protection' ,
);
/* module related field mappings 1/2 (output field => column for 'tagente_modulo') */
$module_field_column_mampping = array (
/* 'module_id_agent_modulo (id_agente_modulo) is not in this list */
'module_id_agent' => 'id_agente as module_id_agent' ,
'module_id_module_type' => 'id_tipo_modulo as module_id_module_type' ,
'module_description' => 'descripcion as module_description' ,
'module_name' => 'nombre as module_name' ,
'module_max' => 'max as module_max' ,
'module_min' => 'min as module_min' ,
'module_interval' => 'module_interval' ,
'module_tcp_port' => 'tcp_port as module_tcp_port' ,
'module_tcp_send' => 'tcp_send as module_tcp_send' ,
'module_tcp_rcv' => 'tcp_rcv as module_tcp_rcv' ,
'module_snmp_community' => 'snmp_community as module_snmp_community' ,
'module_snmp_oid' => 'snmp_oid as module_snmp_oid' ,
'module_ip_target' => 'ip_target as module_ip_target' ,
'module_id_module_group' => 'id_module_group as module_id_module_group' ,
'module_flag' => 'flag as module_flag' ,
'module_id_module' => 'id_modulo as module_id_module' ,
'module_disabled' => 'disabled as module_disabled' ,
'module_id_export' => 'id_export as module_id_export' ,
'module_plugin_user' => 'plugin_user as module_plugin_user' ,
'module_plugin_pass' => 'plugin_pass as module_plugin_pass' ,
'module_plugin_parameter' => 'plugin_parameter as module_plugin_parameter' ,
'module_id_plugin' => 'id_plugin as module_id_plugin' ,
'module_post_process' => 'post_process as module_post_process' ,
'module_prediction_module' => 'prediction_module as module_prediction_module' ,
'module_max_timeout' => 'max_timeout as module_max_timeout' ,
'module_max_retries' => 'max_retries as module_max_retries' ,
'module_custom_id' => 'custom_id as module_custom_id' ,
'module_history_data' => 'history_data as module_history_data' ,
'module_min_warning' => 'min_warning as module_min_warning' ,
'module_max_warning' => 'max_warning as module_max_warning' ,
'module_str_warning' => 'str_warning as module_str_warning' ,
'module_min_critical' => 'min_critical as module_min_critical' ,
'module_max_critical' => 'max_critical as module_max_critical' ,
'module_str_critical' => 'str_critical as module_str_critical' ,
'module_min_ff_event' => 'min_ff_event as module_min_ff_event' ,
'module_delete_pending' => 'delete_pending as module_delete_pending' ,
);
/* module related field mappings 2/2 (output field => column for 'tagente_estado') */
$estado_fields_to_columns_mapping = array (
/* 'module_id_agent_modulo (id_agente_modulo) is not in this list */
'module_id_agent_state' => 'id_agente_estado as module_id_agent_state' ,
'module_data' => 'datos as module_data' ,
'module_timestamp' => 'timestamp as module_timestamp' ,
'module_state' => 'estado as module_state' ,
'module_last_try' => 'last_try as module_last_try' ,
'module_utimestamp' => 'utimestamp as module_utimestamp' ,
'module_current_interval' => 'current_interval as module_current_interval' ,
'module_running_by' => 'running_by as module_running_by' ,
'module_last_execution_try' => 'last_execution_try as module_last_execution_try' ,
'module_status_changes' => 'status_changes as module_status_changes' ,
'module_last_status' => 'last_status as module_last_status' ,
);
/* alert related field mappings (output field => column for 'talert_template_modules', ... ) */
$alert_fields_to_columns_mapping = array (
/*** 'alert_id_agent_module (id_agent_module) is not in this list ***/
'alert_template_modules_id' => 't1.id as alert_template_modules_id' ,
'alert_id_alert_template' => 't1.id_alert_template as alert_id_alert_template' ,
'alert_internal_counter' => 't1.internal_counter as alert_internal_counter' ,
'alert_last_fired' => 't1.last_fired as alert_last_fired' ,
'alert_last_reference' => 't1.last_reference as alert_last_reference' ,
'alert_times_fired' => 't1.times_fired as alert_times_fired' ,
'alert_disabled' => 't1.disabled as alert_disabled' ,
'alert_force_execution' => 't1.force_execution as alert_force_execution' ,
'alert_template_modules_priority' => 't1.priority as alert_template_modules_priority' ,
'alert_templates_id' => 't2.id as alert_templates_id' ,
'alert_type' => 't2.type as alert_type' ,
'alert_value' => 't2.value as alert_value' ,
'alert_matches_value' => 't2.matches_value as alert_matches_value' ,
'alert_max_value' => 't2.max_value as alert_max_value' ,
'alert_min_value' => 't2.min_value as alert_min_value' ,
'alert_time_threshold' => 't2.time_threshold as alert_time_threshold' ,
'alert_max_alerts' => 't2.max_alerts as alert_max_alerts' ,
'alert_min_alerts' => 't2.min_alerts as alert_min_alerts' ,
'alert_time_from' => 't2.time_from as alert_time_from' ,
'alert_time_to' => 't2.time_to as alert_time_to' ,
'alert_monday' => 't2.monday as alert_monday' ,
'alert_tuesday' => 't2.tuesday as alert_tuesday' ,
'alert_wednesday' => 't2.wednesday as alert_wednesday' ,
'alert_thursday' => 't2.thursday as alert_thursday' ,
'alert_friday' => 't2.friday as alert_friday' ,
'alert_saturday' => 't2.saturday as alert_saturday' ,
'alert_sunday' => 't2.sunday as alert_sunday' ,
'alert_templates_name' => 't2.name as alert_templates_name' ,
'alert_templates_description' => 't2.description as alert_templates_description' ,
'alert_templates_priority' => 't2.priority as alert_templates_priority' ,
'alert_templates_id_group' => 't2.id_group as alert_templates_id_group' ,
'alert_recovery_notify' => 't2.recovery_notify as alert_recovery_notify' ,
'alert_field2_recovery' => 't2.field2_recovery as alert_field2_recovery' ,
'alert_field3_recovery' => 't2.field3_recovery as alert_field3_recovery' ,
'alert_templates_field1' => 't2.field1 as alert_templates_field1' ,
'alert_templates_field2' => 't2.field2 as alert_templates_field2' ,
'alert_templates_field3' => 't2.field3 as alert_templates_field3' ,
'alert_template_module_actions_id' => 't3.id as alert_template_module_actions_id' ,
'alert_id_alert_action' => 't3.id_alert_action as alert_id_alert_action' ,
'alert_id_alert_template_module' => 't3.id_alert_template_module as alert_id_alert_template_module' ,
'alert_fires_min' => 't3.fires_min as alert_fires_min' ,
'alert_fires_max' => 't3.fires_max as alert_fires_max' ,
'alert_actions_id' => 't4.id as alert_actions_id' ,
'alert_actions_name' => 't4.name as alert_actions_name' ,
'alert_id_alert_command' => 't4.id_alert_command as alert_id_alert_command' ,
'alert_actions_id_group' => 't4.id_group as alert_actions_id_group' ,
'alert_actions_field1' => 't4.field1 as alert_actions_field1' ,
'alert_actions_field2' => 't4.field2 as alert_actions_field2' ,
'alert_actions_field3' => 't4.field3 as alert_actions_field3' ,
'alert_command' => 't5.command as alert_command' ,
'alert_internal' => 't5.internal as alert_internal' ,
'alert_commands_id' => 't5.id as alert_commands_id' ,
'alert_commands_name' => 't5.name as alert_commands_name' ,
'alert_commands_description' => 't5.description as alert_commands_description' ,
);
if ( $fields == false ) {
$fields = $master_fields ;
}
/** construct column list to query for tagente, tagente_modulo, tagente_estado and alert-related tables **/
{
$agent_additional_columns = " " ;
$module_additional_columns = " " ;
$estado_additional_columns = " " ;
$alert_additional_columns = " " ;
foreach ( $fields as $fld ) {
if ( array_key_exists ( $fld , $agent_field_column_mapping ) ) {
$agent_additional_columns .= ( " , " . $agent_field_column_mapping [ $fld ] );
}
if ( array_key_exists ( $fld , $module_field_column_mampping ) ) {
$module_additional_columns .= ( " , " . $module_field_column_mampping [ $fld ]);
}
if ( array_key_exists ( $fld , $estado_fields_to_columns_mapping ) ) {
$estado_additional_columns .= ( " , " . $estado_fields_to_columns_mapping [ $fld ]);
}
if ( array_key_exists ( $fld , $alert_fields_to_columns_mapping ) ) {
$alert_additional_columns .= ( " , " . $alert_fields_to_columns_mapping [ $fld ]);
}
}
}
2009-10-26 17:35:34 +01:00
$returnVar = array ();
2013-03-15 07:30:26 +01:00
$groups = db_get_all_rows_sql ( 'SELECT id_grupo as group_id, nombre as group_name, parent as group_parent, disabled, custom_id FROM tgrupo' );
2009-10-26 17:35:34 +01:00
if ( $groups === false ) $groups = array ();
$groups = str_replace ( '\n' , $returnReplace , $groups );
2013-03-15 07:30:26 +01:00
$agents = db_get_all_rows_sql ( 'SELECT id_agente as agent_id, id_grupo as agent_id_group ' . $agent_additional_columns . ' FROM tagente' );
2009-10-26 17:35:34 +01:00
if ( $agents === false ) $agents = array ();
$agents = str_replace ( '\n' , $returnReplace , $agents );
2013-03-15 07:30:26 +01:00
foreach ( $groups as & $group ) {
$group [ 'type_row' ] = 'group' ;
$returnVar [] = $group ;
foreach ( $agents as $index => & $agent ) {
if ( $agent [ 'agent_id_group' ] == $group [ 'group_id' ]) {
$agent [ 'type_row' ] = 'agent' ;
$returnVar [] = $agent ;
if ( strlen ( $module_additional_columns ) <= 0
&& strlen ( $estado_additional_columns ) <= 0
&& strlen ( $alert_additional_columns ) <= 0 )
{
continue ; /** SKIP collecting MODULES and ALERTS **/
}
* 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 *
2013-03-15 07:30:26 +01:00
FROM ( SELECT id_agente_modulo as module_id_agent_modulo ' . $module_additional_columns . '
2009-10-26 17:35:34 +01:00
FROM tagente_modulo
2013-03-15 07:30:26 +01:00
WHERE id_agente = ' . $agent[' agent_id '] . ' ) AS t1
INNER JOIN ( SELECT id_agente_modulo as module_id_agent_modulo ' . $estado_additional_columns . '
2009-10-26 17:35:34 +01:00
FROM tagente_estado
2013-03-15 07:30:26 +01:00
WHERE id_agente = ' . $agent[' agent_id '] . ' ) AS t2
ON t1 . module_id_agent_modulo = t2 . module_id_agent_modulo ' );
2009-10-26 17:35:34 +01:00
if ( $modules === false ) $modules = array ();
$modules = str_replace ( '\n' , $returnReplace , $modules );
2013-03-15 07:30:26 +01:00
foreach ( $modules as & $module ) {
$module [ 'type_row' ] = 'module' ;
$returnVar [] = $module ;
if ( strlen ( $alert_additional_columns ) <= 0 )
{
continue ; /** SKIP collecting ALERTS info **/
}
$alerts = db_get_all_rows_sql ( 'SELECT t1.id_agent_module as alert_id_agent_module ' . $alert_additional_columns . '
FROM ( SELECT * FROM talert_template_modules
WHERE id_agent_module = ' . $module[' module_id_agent_modulo '] . ' ) AS t1
INNER JOIN talert_templates AS t2
ON t1 . id_alert_template = t2 . id
LEFT JOIN talert_template_module_actions AS t3
ON t1 . id = t3 . id_alert_template_module
LEFT JOIN talert_actions AS t4
ON t3 . id_alert_action = t4 . id
LEFT JOIN talert_commands AS t5
ON t4 . id_alert_command = t5 . id ' );
2009-10-26 17:35:34 +01:00
if ( $alerts === false ) $alerts = array ();
$alerts = str_replace ( '\n' , $returnReplace , $alerts );
2013-03-15 07:30:26 +01:00
foreach ( $alerts as & $alert ) {
$alert [ 'type_row' ] = 'alert' ;
$returnVar [] = $alert ;
2009-10-26 17:35:34 +01:00
}
}
unset ( $agents [ $index ]);
}
}
}
$data = array ( 'type' => 'array' , 'data' => $returnVar );
2013-03-15 07:30:26 +01:00
$data [ 'list_index' ] = $fields ;
returnData ( $returnType , $data , $separator );
2009-10-26 17:35:34 +01:00
}
2009-12-07 19:00:00 +01:00
/**
* Create a new agent , and print the id for new agent .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param is < agent_name > ; < ip > ; < id_parent > ; < id_group > ;
2012-09-18 11:08:21 +02:00
* < cascade_protection > ; < interval_sec > ; < id_os > ; < id_server > ; < custom_id > ; < learning_mode > ; < disabled > ; < description > in this order
2009-12-07 19:00:00 +01:00
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
2012-09-18 11:08:21 +02:00
* api . php ? op = set & op2 = new_agent & other = pepito | 1.1 . 1.1 | 0 | 4 | 0 | 30 | 8 | 10 || 0 | 0 | nose % 20 nose & other_mode = url_encode_separator_ |
2009-12-07 19:00:00 +01:00
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_new_agent ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2012-03-15 03:57:16 +01:00
global $config ;
2012-04-25 20:09:05 +02:00
2009-12-07 19:00:00 +01:00
$name = $other [ 'data' ][ 0 ];
$ip = $other [ 'data' ][ 1 ];
$idParent = $other [ 'data' ][ 2 ];
$idGroup = $other [ 'data' ][ 3 ];
$cascadeProtection = $other [ 'data' ][ 4 ];
$intervalSeconds = $other [ 'data' ][ 5 ];
$idOS = $other [ 'data' ][ 6 ];
2012-09-18 11:08:21 +02:00
$idServer = $other [ 'data' ][ 7 ];
2009-12-07 19:00:00 +01:00
$customId = $other [ 'data' ][ 8 ];
$learningMode = $other [ 'data' ][ 9 ];
$disabled = $other [ 'data' ][ 10 ];
$description = $other [ 'data' ][ 11 ];
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_messages.php,
include/functions_exportserver.php, include/functions_reporting.php,
include/functions_gis.php, include/functions_networkmap.php,
include/functions_servers.php, include/functions_api.php,
include/fgraph.php, include/functions_agents.php, include/functions_db.php,
include/functions_alerts.php, extensions/module_groups.php,
operation/incidents/incident.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/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/sla_view.php, operation/agentes/ver_agente.php,
operation/servers/view_server_detail.php, operation/menu.php,
operation/search_graphs.php, operation/snmpconsole/snmp_view.php,
operation/gis_maps/ajax.php, operation/events/events_rss.php,
operation/events/events_list.php, operation/search_alerts.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
operation/search_users.php, mobile/operation/agents/view_agents.php,
mobile/operation/events/events.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/db/db_main.php, godmode/db/db_purge.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php, godmode/users/configure_user.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.item_editor.php: changed or added in
some cases the SQL queries for to be PostgreSQL standard, and cleaned source
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 15:26:36 +01:00
switch ( $config [ " dbtype " ]) {
case " mysql " :
2012-09-18 11:08:21 +02:00
$sql1 = 'SELECT name FROM tserver WHERE id_server =' . $idServer ;
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_messages.php,
include/functions_exportserver.php, include/functions_reporting.php,
include/functions_gis.php, include/functions_networkmap.php,
include/functions_servers.php, include/functions_api.php,
include/fgraph.php, include/functions_agents.php, include/functions_db.php,
include/functions_alerts.php, extensions/module_groups.php,
operation/incidents/incident.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/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/sla_view.php, operation/agentes/ver_agente.php,
operation/servers/view_server_detail.php, operation/menu.php,
operation/search_graphs.php, operation/snmpconsole/snmp_view.php,
operation/gis_maps/ajax.php, operation/events/events_rss.php,
operation/events/events_list.php, operation/search_alerts.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
operation/search_users.php, mobile/operation/agents/view_agents.php,
mobile/operation/events/events.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/db/db_main.php, godmode/db/db_purge.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php, godmode/users/configure_user.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.item_editor.php: changed or added in
some cases the SQL queries for to be PostgreSQL standard, and cleaned source
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 15:26:36 +01:00
break ;
case " postgresql " :
2011-04-11 19:05:20 +02:00
case " oracle " :
2012-09-18 11:08:21 +02:00
$sql1 = 'SELECT name FROM tserver WHERE id_server =' . $idServer ;
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_messages.php,
include/functions_exportserver.php, include/functions_reporting.php,
include/functions_gis.php, include/functions_networkmap.php,
include/functions_servers.php, include/functions_api.php,
include/fgraph.php, include/functions_agents.php, include/functions_db.php,
include/functions_alerts.php, extensions/module_groups.php,
operation/incidents/incident.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/alerts_status.php, operation/agentes/estado_agente.php,
operation/agentes/sla_view.php, operation/agentes/ver_agente.php,
operation/servers/view_server_detail.php, operation/menu.php,
operation/search_graphs.php, operation/snmpconsole/snmp_view.php,
operation/gis_maps/ajax.php, operation/events/events_rss.php,
operation/events/events_list.php, operation/search_alerts.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
operation/search_users.php, mobile/operation/agents/view_agents.php,
mobile/operation/events/events.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/db/db_main.php, godmode/db/db_purge.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php, godmode/users/configure_user.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.item_editor.php: changed or added in
some cases the SQL queries for to be PostgreSQL standard, and cleaned source
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 15:26:36 +01:00
break ;
}
2012-09-18 11:08:21 +02:00
$nameServer = db_get_value_sql ( $sql1 );
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
if ( agents_get_agent_id ( $name )) {
2009-12-07 19:00:00 +01:00
returnError ( 'agent_name_exist' , 'The name of agent yet exist in DB.' );
}
else if (( $idParent != 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
( db_get_value_sql ( 'SELECT id_agente FROM tagente WHERE id_agente = ' . $idParent ) === false )) {
2009-12-07 19:00:00 +01:00
returnError ( 'parent_agent_not_exist' , 'The agent parent don`t exist.' );
}
* 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
else if ( db_get_value_sql ( 'SELECT id_grupo FROM tgrupo WHERE id_grupo = ' . $idGroup ) === false ) {
2009-12-07 19:00:00 +01:00
returnError ( 'id_grupo_not_exist' , 'The group don`t exist.' );
}
* 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
else if ( db_get_value_sql ( 'SELECT id_os FROM tconfig_os WHERE id_os = ' . $idOS ) === false ) {
2009-12-07 19:00:00 +01:00
returnError ( 'id_os_not_exist' , 'The OS don`t exist.' );
}
* 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
else if ( db_get_value_sql ( $sql1 ) === false ) {
2009-12-07 19:00:00 +01:00
returnError ( 'server_not_exist' , 'The Pandora Server don`t exist.' );
}
else {
* 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
$idAgente = db_process_sql_insert ( 'tagente' ,
2009-12-07 19:00:00 +01:00
array ( 'nombre' => $name ,
'direccion' => $ip ,
'id_grupo' => $idGroup ,
'intervalo' => $intervalSeconds ,
'comentarios' => $description ,
'modo' => $learningMode ,
'id_os' => $idOS ,
'disabled' => $disabled ,
'cascade_protection' => $cascadeProtection ,
'server_name' => $nameServer ,
'id_parent' => $idParent ,
'custom_id' => $customId ));
returnData ( 'string' ,
array ( 'type' => 'string' , 'data' => $idAgente ));
}
}
2013-02-28 15:41:26 +01:00
/**
*
* Creates a custom field
*
* @ param string $name Custom field name
* @ param boolean $display_front Flag to display custom field in agent ' s operation view
*/
function api_set_create_custom_field ( $t1 , $t2 , $other , $returnType ) {
2013-03-04 15:41:26 +01:00
2013-02-28 15:41:26 +01:00
if ( $other [ 'type' ] == 'string' ) {
2013-03-04 15:41:26 +01:00
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else if ( $other [ 'type' ] == 'array' ) {
$name = " " ;
if ( $other [ 'data' ][ 0 ] != '' ) {
$name = $other [ 'data' ][ 0 ];
}
else {
returnError ( 'error_parameter' , 'Custom field name required' );
return ;
}
2013-02-28 15:41:26 +01:00
$display_front = 0 ;
2013-03-04 15:41:26 +01:00
if ( $other [ 'data' ][ 1 ] != '' ) {
$display_front = $other [ 'data' ][ 1 ];
}
else {
returnError ( 'error_parameter' , 'Custom field display flag required' );
return ;
}
$result = db_process_sql_insert ( 'tagent_custom_fields' ,
array ( 'name' => $name , 'display_on_front' => $display_front ));
$data [ 'type' ] = " string " ;
$data [ " data " ] = $result ;
returnData ( " string " , $data );
2013-02-28 15:41:26 +01:00
}
}
/**
*
* Returns ID of custom field zero if not exists
*
* @ param string $name Custom field name
*/
function api_get_custom_field_id ( $t1 , $t2 , $other , $returnType ) {
$name = $other [ " data " ][ 0 ];
$id = db_get_value ( 'id_field' , 'tagent_custom_fields' , 'name' , $name );
$data [ 'type' ] = " string " ;
$data [ " data " ] = $id ;
returnData ( " string " , $data );
}
2009-12-07 19:00:00 +01:00
/**
* Delete a agent with the name pass as parameter .
*
* @ param string $id Name of agent to delete .
* @ param $thrash1 Don ' t use .
* @ param $thrast2 Don ' t use .
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_delete_agent ( $id , $thrash1 , $thrast2 , $thrash3 ) {
2009-12-07 19:00:00 +01:00
$agentName = $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
$idAgent [ 0 ] = agents_get_agent_id ( $agentName );
if ( ! agents_delete_agent ( $idAgent , true ))
2009-12-07 19:00:00 +01:00
returnError ( 'error_delete' , 'Error in delete operation.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Correct Delete' )));
}
2012-01-19 18:45:59 +01:00
/**
* Get all agents , and print all the result like a csv .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
2012-01-25 16:48:20 +01:00
* @ param array $other it ' s array , $other as param are the filters available < filter_so > ; < filter_group > ; < filter_modules_states > ; < filter_name > ; < filter_policy > ; < csv_separator > in this order
2012-01-19 18:45:59 +01:00
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
2012-01-25 16:48:20 +01:00
* api . php ? op = get & op2 = all_agents & return_type = csv & other = 1 | 2 | warning | j | 2 |~& other_mode = url_encode_separator_ |
2012-01-19 18:45:59 +01:00
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_all_agents ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2012-08-17 13:39:25 +02:00
2012-01-19 18:45:59 +01:00
$where = '' ;
2012-01-25 11:33:37 +01:00
if ( isset ( $other [ 'data' ][ 0 ])){
// Filter by SO
if ( $other [ 'data' ][ 0 ] != " " ){
2012-12-31 09:01:28 +01:00
$where .= " AND tconfig_os.id_os = " . $other [ 'data' ][ 0 ];
2012-01-25 11:33:37 +01:00
}
}
2013-01-29 19:03:08 +01:00
if ( isset ( $other [ 'data' ][ 1 ])) {
2012-01-25 11:33:37 +01:00
// Filter by group
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 1 ] != " " ) {
2012-01-25 11:33:37 +01:00
$where .= " AND id_grupo = " . $other [ 'data' ][ 1 ];
}
2012-01-19 18:45:59 +01:00
}
2012-08-17 13:39:25 +02:00
if ( isset ( $other [ 'data' ][ 3 ])) {
2012-01-25 11:33:37 +01:00
// Filter by name
2012-10-26 19:37:57 +02:00
if ( $other [ 'data' ][ 3 ] != " " ) {
2012-01-25 11:33:37 +01:00
$where .= " AND nombre LIKE ('% " . $other [ 'data' ][ 3 ] . " %') " ;
2012-08-17 13:39:25 +02:00
}
2012-01-19 18:45:59 +01:00
}
2012-08-17 13:39:25 +02:00
if ( isset ( $other [ 'data' ][ 4 ])) {
2012-01-25 11:33:37 +01:00
// Filter by policy
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 4 ] != " " ) {
2012-01-25 11:33:37 +01:00
$filter_by_policy = enterprise_hook ( 'policies_get_filter_by_agent' , array ( $other [ 'data' ][ 4 ]));
if ( $filter_by_policy !== ENTERPRISE_NOT_HOOK ){
2012-08-17 13:39:25 +02:00
$where .= $filter_by_policy ;
2012-01-25 11:33:37 +01:00
}
2012-01-23 08:52:43 +01:00
}
2012-01-19 18:45:59 +01:00
}
2012-01-25 16:48:20 +01:00
if ( ! isset ( $other [ 'data' ][ 5 ]))
$separator = ';' ; //by default
else
$separator = $other [ 'data' ][ 5 ];
2012-01-25 11:33:37 +01:00
// Initialization of array
$result_agents = array ();
2012-01-19 18:45:59 +01:00
// Filter by state
2012-01-26 10:58:31 +01:00
$sql = " SELECT id_agente, nombre, direccion, comentarios, tconfig_os.name, url_address FROM tagente, tconfig_os WHERE tagente.id_os = tconfig_os.id_os AND disabled = 0 " . $where ;
2012-08-17 13:39:25 +02:00
$all_agents = db_get_all_rows_sql ( $sql );
2012-01-19 18:45:59 +01:00
// Filter by status: unknown, warning, critical, without modules
2012-01-25 11:33:37 +01:00
if ( isset ( $other [ 'data' ][ 2 ])){
if ( $other [ 'data' ][ 2 ] != " " ) {
foreach ( $all_agents as $agent ){
$filter_modules [ 'id_agente' ] = $agent [ 'id_agente' ];
$filter_modules [ 'disabled' ] = 0 ;
$filter_modules [ 'delete_pending' ] = 0 ;
$modules = db_get_all_rows_filter ( 'tagente_modulo' , $filter_modules , 'id_agente_modulo' );
$result_modules = array ();
// Skip non init modules
2012-08-17 13:39:25 +02:00
foreach ( $modules as $module ) {
2012-01-25 11:33:37 +01:00
if ( modules_get_agentmodule_is_init ( $module [ 'id_agente_modulo' ])){
$result_modules [] = $module ;
2012-08-17 13:39:25 +02:00
}
2012-01-25 11:33:37 +01:00
}
2012-08-17 13:39:25 +02:00
2012-01-25 11:33:37 +01:00
// Without modules NO_MODULES
if ( $other [ 'data' ][ 2 ] == 'no_modules' ){
if ( empty ( $result_modules ) and $other [ 'data' ][ 2 ] == 'no_modules' ){
$result_agents [] = $agent ;
}
2012-01-19 18:45:59 +01:00
}
2012-12-31 09:01:28 +01:00
// filter by NORMAL, WARNING, CRITICAL, UNKNOWN, ALERT_FIRED
2012-01-25 11:33:37 +01:00
else {
$status = agents_get_status ( $agent [ 'id_agente' ], true );
// Filter by status
2012-08-17 13:39:25 +02:00
switch ( $other [ 'data' ][ 2 ]) {
2012-01-25 11:33:37 +01:00
case 'warning' :
2012-08-17 13:39:25 +02:00
if ( $status == 2 ) {
2012-01-25 11:33:37 +01:00
$result_agents [] = $agent ;
}
2012-08-17 13:39:25 +02:00
break ;
2012-01-25 11:33:37 +01:00
case 'critical' :
2012-08-17 13:39:25 +02:00
if ( $status == 1 ) {
2012-01-25 11:33:37 +01:00
$result_agents [] = $agent ;
}
break ;
case 'unknown' :
2012-08-17 13:39:25 +02:00
if ( $status == 3 ) {
$result_agents [] = $agent ;
2012-01-25 11:33:37 +01:00
}
break ;
case 'normal' :
2012-08-17 13:39:25 +02:00
if ( $status == 0 ) {
$result_agents [] = $agent ;
2012-01-25 11:33:37 +01:00
}
2012-08-17 13:39:25 +02:00
break ;
2012-12-31 09:01:28 +01:00
case 'alert_fired' :
if ( $status == 4 ) {
$result_agents [] = $agent ;
}
break ;
2012-01-25 11:33:37 +01:00
}
2012-01-19 18:45:59 +01:00
}
}
}
2012-01-25 11:33:37 +01:00
else {
$result_agents = $all_agents ;
}
}
2012-01-19 18:45:59 +01:00
else {
$result_agents = $all_agents ;
}
2012-01-25 11:33:37 +01:00
2012-08-17 13:39:25 +02:00
if ( count ( $result_agents ) > 0 and $result_agents !== false ) {
2012-01-19 18:45:59 +01:00
$data = array ( 'type' => 'array' , 'data' => $result_agents );
2012-08-17 13:39:25 +02:00
returnData ( 'csv' , $data , $separator );
2012-01-19 18:45:59 +01:00
}
else {
2012-08-17 13:39:25 +02:00
returnError ( 'error_all_agents' , 'No agents retrieved.' );
2012-04-27 14:52:33 +02:00
}
2012-01-19 18:45:59 +01:00
}
/**
* Get modules for an agent , and print all the result like a csv .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param are the filters available < id_agent > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = get & op2 = agents_modules & return_type = csv & other = 14 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_agent_modules ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2012-08-17 13:39:25 +02:00
2012-01-19 18:45:59 +01:00
$sql = sprintf ( " SELECT id_agente, id_agente_modulo, nombre
2012-08-17 13:39:25 +02:00
FROM tagente_modulo
WHERE id_agente = % d AND disabled = 0
AND delete_pending = 0 " , $other['data'] [0]);
$all_modules = db_get_all_rows_sql ( $sql );
if ( count ( $all_modules ) > 0 and $all_modules !== false ) {
2012-01-19 18:45:59 +01:00
$data = array ( 'type' => 'array' , 'data' => $all_modules );
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
returnData ( 'csv' , $data , ';' );
2012-01-19 18:45:59 +01:00
}
else {
2012-04-27 14:52:33 +02:00
returnError ( 'error_agent_modules' , 'No modules retrieved.' );
}
2012-01-19 18:45:59 +01:00
}
/**
* Get modules for an agent , and print all the result like a csv .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param are the filters available < id_agent > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = get & op2 = group_agent & return_type = csv & other = 14 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_group_agent ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2012-08-17 13:39:25 +02:00
2012-01-19 18:45:59 +01:00
$sql = sprintf ( " SELECT groups.nombre nombre
2012-08-17 13:39:25 +02:00
FROM tagente agents , tgrupo groups
WHERE id_agente = % d AND agents . disabled = 0
AND groups . disabled = 0
AND agents . id_grupo = groups . id_grupo " , $other['data'] [0]);
$group_names = db_get_all_rows_sql ( $sql );
if ( count ( $group_names ) > 0 and $group_names !== false ) {
2012-01-19 18:45:59 +01:00
$data = array ( 'type' => 'array' , 'data' => $group_names );
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
returnData ( 'csv' , $data , ';' );
2012-01-19 18:45:59 +01:00
}
else {
2012-04-27 14:52:33 +02:00
returnError ( 'error_group_agent' , 'No groups retrieved.' );
}
2012-01-19 18:45:59 +01:00
}
/**
* Get all policies , possible filtered by agent , and print all the result like a csv .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param are the filters available < id_agent > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = get & op2 = policies & return_type = csv & other =& other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_policies ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2012-08-17 13:39:25 +02:00
2012-01-19 18:45:59 +01:00
$where = '' ;
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 0 ] != " " ) {
2012-01-19 18:45:59 +01:00
$where .= ' AND id_agent = ' . $other [ 'data' ][ 0 ];
2012-08-17 13:39:25 +02:00
$sql = sprintf ( " SELECT policy.id, name, id_agent
FROM tpolicies policy , tpolicy_agents pol_agents
WHERE policy . id = pol_agents . id % s " , $where );
}
else {
$sql = " SELECT id, name FROM tpolicies policy " ;
2012-01-19 18:45:59 +01:00
}
2012-08-17 13:39:25 +02:00
$policies = db_get_all_rows_sql ( $sql );
if ( count ( $policies ) > 0 and $policies !== false ) {
2012-01-19 18:45:59 +01:00
$data = array ( 'type' => 'array' , 'data' => $policies );
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
returnData ( 'csv' , $data , ';' );
2012-01-19 18:45:59 +01:00
}
else {
2012-04-27 14:52:33 +02:00
returnError ( 'error_get_policies' , 'No policies retrieved.' );
}
2012-01-19 18:45:59 +01:00
}
/**
* Get policy modules , possible filtered by agent , and print all the result like a csv .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param are the filters available < id_agent > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = get & op2 = policy_modules & return_type = csv & other = 2 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_policy_modules ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2012-04-27 14:52:33 +02:00
2012-01-19 18:45:59 +01:00
$where = '' ;
2012-04-27 14:52:33 +02:00
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_policy_modules' , 'Error retrieving policy modules. Id_policy cannot be left blank.' );
return ;
}
2012-04-27 14:52:33 +02:00
2012-08-17 13:39:25 +02:00
$policies = enterprise_hook ( 'policies_get_modules_api' ,
array ( $other [ 'data' ][ 0 ], $other [ 'data' ][ 1 ]));
2012-04-27 14:52:33 +02:00
2012-08-17 13:39:25 +02:00
if ( $policies === ENTERPRISE_NOT_HOOK ) {
2012-01-23 10:03:57 +01:00
returnError ( 'error_policy_modules' , 'Error retrieving policy modules.' );
2012-04-27 14:52:33 +02:00
return ;
2012-01-23 10:03:57 +01:00
}
2012-04-27 14:52:33 +02:00
2012-01-19 18:45:59 +01:00
if ( count ( $policies ) > 0 and $policies !== false ){
$data = array ( 'type' => 'array' , 'data' => $policies );
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
returnData ( 'csv' , $data , ';' );
2012-01-19 18:45:59 +01:00
}
else {
2012-04-27 14:52:33 +02:00
returnError ( 'error_policy_modules' , 'No policy modules retrieved.' );
}
2012-01-19 18:45:59 +01:00
}
2009-12-07 19:00:00 +01:00
/**
2012-01-10 18:21:46 +01:00
* Create a network module in agent . And return the id_agent_module of new module .
2009-12-07 19:00:00 +01:00
*
* @ param string $id Name of agent to add the module .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < name_module > ; < disabled > ; < id_module_type > ;
2011-07-07 Ramon Novoa <rnovoa@artica.es>
* include/functions_network_components.php,
include/functions_api.php,
include/functions_ui.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_monitores.php,
extras/pandoradb_migrate_v3.2_to_v4.0.sql,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php: Added support for
warning/critical status regexp (works with both numeric and string
data types).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-07 13:12:15 +02:00
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
2012-01-16 11:30:16 +01:00
* < history_data > ; < ip_target > ; < module_port > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
2012-01-11 14:05:58 +01:00
* < min > ; < max > ; < custom_id > ; < description > in this order
2009-12-07 19:00:00 +01:00
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
2012-01-11 14:05:58 +01:00
* api . php ? op = set & op2 = create_network_module & id = pepito & other = prueba | 0 | 7 | 1 | 10 | 15 | 0 | 16 | 18 | 0 | 15 | 0 | www . google . es | 0 || 0 | 180 | 0 | 0 | 0 | 0 | latency % 20 ping & other_mode = url_encode_separator_ |
2012-01-10 18:21:46 +01:00
*
*
2009-12-07 19:00:00 +01:00
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_create_network_module ( $id , $thrash1 , $other , $thrash3 ) {
2009-12-07 19:00:00 +01:00
$agentName = $id ;
2012-01-10 18:21:46 +01:00
2012-01-11 14:05:58 +01:00
$idAgent = agents_get_agent_id ( $agentName );
if ( ! $idAgent ){
returnError ( 'error_create_network_module' , __ ( 'Error in creation network module. Agent name doesn\'t exists.' ));
2012-01-10 18:21:46 +01:00
return ;
}
2012-01-17 13:08:53 +01:00
if ( $other [ 'data' ][ 2 ] < 6 or $other [ 'data' ][ 2 ] > 18 ){
returnError ( 'error_create_network_module' , __ ( 'Error in creation network module. Id_module_type is not correct for network modules.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2009-12-07 19:00:00 +01:00
$name = $other [ 'data' ][ 0 ];
$values = array (
'id_agente' => $idAgent ,
'disabled' => $other [ 'data' ][ 1 ],
'id_tipo_modulo' => $other [ 'data' ][ 2 ],
'id_module_group' => $other [ 'data' ][ 3 ],
'min_warning' => $other [ 'data' ][ 4 ],
'max_warning' => $other [ 'data' ][ 5 ],
2011-07-07 Ramon Novoa <rnovoa@artica.es>
* include/functions_network_components.php,
include/functions_api.php,
include/functions_ui.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_monitores.php,
extras/pandoradb_migrate_v3.2_to_v4.0.sql,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php: Added support for
warning/critical status regexp (works with both numeric and string
data types).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-07 13:12:15 +02:00
'str_warning' => $other [ 'data' ][ 6 ],
'min_critical' => $other [ 'data' ][ 7 ],
'max_critical' => $other [ 'data' ][ 8 ],
'str_critical' => $other [ 'data' ][ 9 ],
'min_ff_event' => $other [ 'data' ][ 10 ],
'history_data' => $other [ 'data' ][ 11 ],
'ip_target' => $other [ 'data' ][ 12 ],
'tcp_port' => $other [ 'data' ][ 13 ],
'snmp_community' => $other [ 'data' ][ 14 ],
'snmp_oid' => $other [ 'data' ][ 15 ],
'module_interval' => $other [ 'data' ][ 16 ],
'post_process' => $other [ 'data' ][ 17 ],
'min' => $other [ 'data' ][ 18 ],
'max' => $other [ 'data' ][ 19 ],
'custom_id' => $other [ 'data' ][ 20 ],
'descripcion' => $other [ 'data' ][ 21 ],
2012-01-11 14:05:58 +01:00
'id_modulo' => 2
2009-12-07 19:00:00 +01:00
);
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
$idModule = modules_create_agent_module ( $idAgent , $name , $values , true );
2009-12-07 19:00:00 +01:00
2011-12-02 09:52:54 +01:00
if ( is_error ( $idModule )) {
// TODO: Improve the error returning more info
returnError ( 'error_create_network_module' , __ ( 'Error in creation network module.' ));
}
else {
2009-12-07 19:00:00 +01:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $idModule ));
2011-12-02 09:52:54 +01:00
}
2009-12-07 19:00:00 +01:00
}
2012-01-16 11:30:16 +01:00
/**
* Update a network module in agent . And return a message with the result of the operation .
*
2012-01-20 13:23:17 +01:00
* @ param string $id Id of the network module to update .
2012-01-16 11:30:16 +01:00
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < id_agent > ; < disabled >
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < ip_target > ; < module_port > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
* < min > ; < max > ; < custom_id > ; < description > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
2012-01-20 13:23:17 +01:00
* api . php ? op = set & op2 = update_network_module & id = 271 & other = 156 | 0 | 2 | 10 | 15 || 16 | 18 || 7 | 0 | 127.0 . 0.1 | 0 || 0 | 300 | 30.00 | 0 | 0 | 0 | latency % 20 ping % 20 modified % 20 by % 20 the % 20 Api & other_mode = url_encode_separator_ |
2012-01-16 11:30:16 +01:00
*
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_update_network_module ( $id_module , $thrash1 , $other , $thrash3 ){
2012-04-27 14:52:33 +02:00
if ( $id_module == " " ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_update_network_module' , __ ( 'Error updating network module. Module name cannot be left blank.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
2012-01-20 13:23:17 +01:00
$check_id_module = db_get_value ( 'id_agente_modulo' , 'tagente_modulo' , 'id_agente_modulo' , $id_module );
2012-04-27 14:52:33 +02:00
if ( ! $check_id_module ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_update_network_module' , __ ( 'Error updating network module. Id_module doesn\'t exists.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
// If we want to change the module to a new agent
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 0 ] != " " ) {
2012-01-16 11:30:16 +01:00
$id_agent_old = db_get_value ( 'id_agente' , 'tagente_modulo' , 'id_agente_modulo' , $id_module );
if ( $id_agent_old != $other [ 'data' ][ 0 ]){
$id_module_exists = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'nombre' => $module_name , 'id_agente' => $other [ 'data' ][ 0 ]));
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
if ( $id_module_exists ){
returnError ( 'error_update_network_module' , __ ( 'Error updating network module. Id_module exists in the new agent.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
}
}
$network_module_fields = array ( 'id_agente' , 'disabled' , 'id_module_group' , 'min_warning' , 'max_warning' , 'str_warning' ,
'min_critical' , 'max_critical' , 'str_critical' , 'min_ff_event' , 'history_data' , 'ip_target' , 'tcp_port' , 'snmp_community' ,
'snmp_oid' , 'module_interval' , 'post_process' , 'min' , 'max' , 'custom_id' , 'descripcion' );
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
$values = array ();
$cont = 0 ;
2012-04-27 14:52:33 +02:00
foreach ( $network_module_fields as $field ) {
if ( $other [ 'data' ][ $cont ] != " " ) {
2012-01-16 11:30:16 +01:00
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
$result_update = modules_update_agent_module ( $id_module , $values );
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
if ( $result_update < 0 )
returnError ( 'error_update_network_module' , 'Error updating network module.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Network module updated.' )));
}
2012-01-10 18:21:46 +01:00
/**
* Create a plugin module in agent . And return the id_agent_module of new module .
*
* @ param string $id Name of agent to add the module .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < name_module > ; < disabled > ; < id_module_type > ;
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < ip_target > ; < tcp_port > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
2012-01-11 14:05:58 +01:00
* < min > ; < max > ; < custom_id > ; < description > ; < id_plugin > ; < plugin_user > ; < plugin_pass > ; < plugin_parameter > in this order
2012-01-10 18:21:46 +01:00
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
2012-01-11 14:05:58 +01:00
* api . php ? op = set & op2 = create_plugin_module & id = pepito & other = prueba | 0 | 1 | 2 | 0 | 0 || 0 | 0 || 0 | 0 | 127.0 . 0.1 | 0 || 0 | 300 | 0 | 0 | 0 | 0 | plugin % 20 module % 20 from % 20 api | 2 | admin | pass |- p % 20 max & other_mode = url_encode_separator_ |
2012-01-10 18:21:46 +01:00
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_create_plugin_module ( $id , $thrash1 , $other , $thrash3 ) {
2012-01-10 18:21:46 +01:00
$agentName = $id ;
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 22 ] == " " ) {
2012-01-11 14:05:58 +01:00
returnError ( 'error_create_plugin_module' , __ ( 'Error in creation plugin module. Id_plugin cannot be left blank.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-10 18:21:46 +01:00
}
$idAgent = agents_get_agent_id ( $agentName );
2012-04-27 14:52:33 +02:00
if ( ! $idAgent ) {
2012-01-11 14:05:58 +01:00
returnError ( 'error_create_plugin_module' , __ ( 'Error in creation plugin module. Agent name doesn\'t exists.' ));
return ;
2012-04-27 14:52:33 +02:00
}
2012-01-11 14:05:58 +01:00
2012-01-10 18:21:46 +01:00
$name = $other [ 'data' ][ 0 ];
$values = array (
'id_agente' => $idAgent ,
'disabled' => $other [ 'data' ][ 1 ],
'id_tipo_modulo' => $other [ 'data' ][ 2 ],
'id_module_group' => $other [ 'data' ][ 3 ],
'min_warning' => $other [ 'data' ][ 4 ],
'max_warning' => $other [ 'data' ][ 5 ],
'str_warning' => $other [ 'data' ][ 6 ],
'min_critical' => $other [ 'data' ][ 7 ],
'max_critical' => $other [ 'data' ][ 8 ],
'str_critical' => $other [ 'data' ][ 9 ],
'min_ff_event' => $other [ 'data' ][ 10 ],
'history_data' => $other [ 'data' ][ 11 ],
'ip_target' => $other [ 'data' ][ 12 ],
'tcp_port' => $other [ 'data' ][ 13 ],
'snmp_community' => $other [ 'data' ][ 14 ],
'snmp_oid' => $other [ 'data' ][ 15 ],
'module_interval' => $other [ 'data' ][ 16 ],
'post_process' => $other [ 'data' ][ 17 ],
'min' => $other [ 'data' ][ 18 ],
'max' => $other [ 'data' ][ 19 ],
'custom_id' => $other [ 'data' ][ 20 ],
'descripcion' => $other [ 'data' ][ 21 ],
2012-01-11 14:05:58 +01:00
'id_modulo' => 4 ,
'id_plugin' => $other [ 'data' ][ 22 ],
'plugin_user' => $other [ 'data' ][ 23 ],
'plugin_pass' => $other [ 'data' ][ 24 ],
'plugin_parameter' => $other [ 'data' ][ 25 ]
2012-01-10 18:21:46 +01:00
);
$idModule = modules_create_agent_module ( $idAgent , $name , $values , true );
if ( is_error ( $idModule )) {
// TODO: Improve the error returning more info
returnError ( 'error_create_plugin_module' , __ ( 'Error in creation plugin module.' ));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $idModule ));
}
}
2012-01-16 11:30:16 +01:00
/**
* Update a plugin module in agent . And return the id_agent_module of new module .
2012-01-20 13:23:17 +01:00
* @ param string $id Id of the plugin module to update .
2012-01-16 11:30:16 +01:00
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < id_agent > ; < disabled > ;
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < ip_target > ; < module_port > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
* < min > ; < max > ; < custom_id > ; < description > ; < id_plugin > ; < plugin_user > ; < plugin_pass > ; < plugin_parameter > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
2012-01-20 13:23:17 +01:00
* api . php ? op = set & op2 = update_plugin_module & id = 293 & other = 156 | 0 | 2 | 0 | 0 || 0 | 0 || 0 | 0 | 127.0 . 0.1 | 0 || 0 | 300 | 0 | 0 | 0 | 0 | plugin % 20 module % 20 from % 20 api | 2 | admin | pass |- p % 20 max & other_mode = url_encode_separator_ |
2012-01-16 11:30:16 +01:00
*
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_update_plugin_module ( $id_module , $thrash1 , $other , $thrash3 ){
2012-04-27 14:52:33 +02:00
if ( $id_module == " " ) {
2012-01-20 13:23:17 +01:00
returnError ( 'error_update_plugin_module' , __ ( 'Error updating plugin module. Id_module cannot be left blank.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
2012-01-20 13:23:17 +01:00
$check_id_module = db_get_value ( 'id_agente_modulo' , 'tagente_modulo' , 'id_agente_modulo' , $id_module );
2012-04-27 14:52:33 +02:00
if ( ! $check_id_module ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_update_plugin_module' , __ ( 'Error updating plugin module. Id_module doesn\'t exists.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
// If we want to change the module to a new agent
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 0 ] != " " ) {
2012-01-16 11:30:16 +01:00
$id_agent_old = db_get_value ( 'id_agente' , 'tagente_modulo' , 'id_agente_modulo' , $id_module );
2012-04-27 14:52:33 +02:00
if ( $id_agent_old != $other [ 'data' ][ 0 ]) {
2012-01-16 11:30:16 +01:00
$id_module_exists = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'nombre' => $module_name , 'id_agente' => $other [ 'data' ][ 0 ]));
2012-04-27 14:52:33 +02:00
if ( $id_module_exists ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_update_plugin_module' , __ ( 'Error updating plugin module. Id_module exists in the new agent.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
}
}
2012-08-17 13:39:25 +02:00
$plugin_module_fields = array ( 'id_agente' , 'disabled' , 'id_module_group' , 'min_warning' , 'max_warning' , 'str_warning' ,
2012-01-16 11:30:16 +01:00
'min_critical' , 'max_critical' , 'str_critical' , 'min_ff_event' , 'history_data' , 'ip_target' ,
'tcp_port' , 'snmp_community' , 'snmp_oid' , 'module_interval' , 'post_process' , 'min' , 'max' ,
'custom_id' , 'descripcion' , 'id_plugin' , 'plugin_user' , 'plugin_pass' , 'plugin_parameter' );
$values = array ();
$cont = 0 ;
2012-04-27 14:52:33 +02:00
foreach ( $plugin_module_fields as $field ) {
if ( $other [ 'data' ][ $cont ] != " " ) {
2012-01-16 11:30:16 +01:00
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
$result_update = modules_update_agent_module ( $id_module , $values );
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
if ( $result_update < 0 )
returnError ( 'error_update_plugin_module' , 'Error updating plugin module.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Plugin module updated.' )));
}
2012-01-11 14:05:58 +01:00
/**
* Create a data module in agent . And return the id_agent_module of new module .
* Note : Only adds database information , this function doesn ' t alter config file information .
*
* @ param string $id Name of agent to add the module .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < name_module > ; < disabled > ; < id_module_type > ;
* < description > ; < id_module_group > ; < min_value > ; < max_value > ; < post_process > ; < module_interval > ; < min_warning > ;
* < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < history_data > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = create_data_module & id = pepito & other = prueba | 0 | 1 | data % 20 module % 20 from % 20 api | 1 | 10 | 20 | 10.50 | 180 | 10 | 15 || 16 | 20 || 0 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_create_data_module ( $id , $thrash1 , $other , $thrash3 ) {
2012-01-11 14:05:58 +01:00
$agentName = $id ;
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-11 14:05:58 +01:00
returnError ( 'error_create_data_module' , __ ( 'Error in creation data module. Module_name cannot be left blank.' ));
return ;
2012-04-27 14:52:33 +02:00
}
2012-01-11 14:05:58 +01:00
$idAgent = agents_get_agent_id ( $agentName );
2012-04-27 14:52:33 +02:00
if ( ! $idAgent ) {
2012-01-11 14:05:58 +01:00
returnError ( 'error_create_data_module' , __ ( 'Error in creation data module. Agent name doesn\'t exists.' ));
return ;
2012-04-27 14:52:33 +02:00
}
2012-01-11 14:05:58 +01:00
$name = $other [ 'data' ][ 0 ];
$values = array (
'id_agente' => $idAgent ,
'disabled' => $other [ 'data' ][ 1 ],
'id_tipo_modulo' => $other [ 'data' ][ 2 ],
'descripcion' => $other [ 'data' ][ 3 ],
'id_module_group' => $other [ 'data' ][ 4 ],
'min' => $other [ 'data' ][ 5 ],
'max' => $other [ 'data' ][ 6 ],
'post_process' => $other [ 'data' ][ 7 ],
'module_interval' => $other [ 'data' ][ 8 ],
'min_warning' => $other [ 'data' ][ 9 ],
'max_warning' => $other [ 'data' ][ 10 ],
'str_warning' => $other [ 'data' ][ 11 ],
'min_critical' => $other [ 'data' ][ 12 ],
'max_critical' => $other [ 'data' ][ 13 ],
'str_critical' => $other [ 'data' ][ 14 ],
'history_data' => $other [ 'data' ][ 15 ],
'id_modulo' => 1
);
$idModule = modules_create_agent_module ( $idAgent , $name , $values , true );
if ( is_error ( $idModule )) {
// TODO: Improve the error returning more info
returnError ( 'error_create_data_module' , __ ( 'Error in creation data module.' ));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $idModule ));
}
}
2012-01-16 11:30:16 +01:00
/**
* Update a data module in agent . And return a message with the result of the operation .
*
2012-01-20 13:23:17 +01:00
* @ param string $id Id of the data module to update .
2012-01-16 11:30:16 +01:00
* @ param $thrash1 Don ' t use .
2012-01-20 13:23:17 +01:00
* @ param array $other it ' s array , $other as param is < id_agent > ; < disabled > ; < description > ;
2012-01-16 11:30:16 +01:00
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < ip_target > ; < module_port > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
2012-01-20 13:23:17 +01:00
* < min > ; < max > ; < custom_id > in this order
2012-01-16 11:30:16 +01:00
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
2012-01-20 13:23:17 +01:00
* api . php ? op = set & op2 = update_data_module & id = 170 & other = 44 | 0 | data % 20 module % 20 modified % 20 from % 20 API | 6 | 0 | 0 | 50.00 | 300 | 10 | 15 || 16 | 18 || 0 & other_mode = url_encode_separator_ |
2012-01-16 11:30:16 +01:00
*
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_update_data_module ( $id_module , $thrash1 , $other , $thrash3 ){
2012-04-27 14:52:33 +02:00
if ( $id_module == " " ) {
2012-01-20 13:23:17 +01:00
returnError ( 'error_update_data_module' , __ ( 'Error updating data module. Id_module cannot be left blank.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
2012-01-20 13:23:17 +01:00
$check_id_module = db_get_value ( 'id_agente_modulo' , 'tagente_modulo' , 'id_agente_modulo' , $id_module );
2012-04-27 14:52:33 +02:00
if ( ! $check_id_module ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_update_data_module' , __ ( 'Error updating data module. Id_module doesn\'t exists.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
// If we want to change the module to a new agent
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 0 ] != " " ) {
2012-01-16 11:30:16 +01:00
$id_agent_old = db_get_value ( 'id_agente' , 'tagente_modulo' , 'id_agente_modulo' , $id_module );
2012-04-27 14:52:33 +02:00
if ( $id_agent_old != $other [ 'data' ][ 0 ]) {
2012-01-16 11:30:16 +01:00
$id_module_exists = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'nombre' => $module_name , 'id_agente' => $other [ 'data' ][ 0 ]));
2012-04-27 14:52:33 +02:00
if ( $id_module_exists ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_update_data_module' , __ ( 'Error updating data module. Id_module exists in the new agent.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
}
}
$data_module_fields = array ( 'id_agente' , 'disabled' , 'descripcion' , 'id_module_group' , 'min' , 'max' ,
'post_process' , 'module_interval' , 'min_warning' , 'max_warning' , 'str_warning' , 'min_critical' , 'max_critical' , 'str_critical' ,
2012-04-27 14:52:33 +02:00
'history_data' );
2012-01-16 11:30:16 +01:00
$values = array ();
$cont = 0 ;
2012-04-27 14:52:33 +02:00
foreach ( $data_module_fields as $field ) {
2012-01-16 11:30:16 +01:00
if ( $other [ 'data' ][ $cont ] != " " ){
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
$result_update = modules_update_agent_module ( $id_module , $values );
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
if ( $result_update < 0 )
returnError ( 'error_update_data_module' , 'Error updating data module.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Data module updated.' )));
}
2012-01-11 14:05:58 +01:00
/**
* Create a SNMP module in agent . And return the id_agent_module of new module .
*
* @ param string $id Name of agent to add the module .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < name_module > ; < disabled > ; < id_module_type > ;
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < ip_target > ; < module_port > ; < snmp_version > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
* < min > ; < max > ; < custom_id > ; < description > ; < snmp3_priv_method > ; < snmp3_priv_pass > ; < snmp3_sec_level > ; < snmp3_auth_method > ;
* < snmp3_auth_user > ; < snmp3_auth_pass > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example 1 ( snmp v : 3 , snmp3_priv_method : AES , passw | authNoPriv | MD5 | pepito_user | example_priv_passw )
*
* api . php ? op = set & op2 = create_snmp_module & id = pepito & other = prueba | 0 | 15 | 1 | 10 | 15 || 16 | 18 || 15 | 0 | 127.0 . 0.1 | 60 | 3 | public |. 1.3 . 6.1 . 2.1 . 1.1 . 0 | 180 | 0 | 0 | 0 | 0 | SNMP % 20 module % 20 from % 20 API | AES | example_priv_passw | authNoPriv | MD5 | pepito_user | example_auth_passw & other_mode = url_encode_separator_ |
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
*
2012-01-11 14:05:58 +01:00
* example 2 ( snmp v : 1 )
*
* api . php ? op = set & op2 = create_snmp_module & id = pepito1 & other = prueba2 | 0 | 15 | 1 | 10 | 15 || 16 | 18 || 15 | 0 | 127.0 . 0.1 | 60 | 1 | public |. 1.3 . 6.1 . 2.1 . 1.1 . 0 | 180 | 0 | 0 | 0 | 0 | SNMP module from API & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_create_snmp_module ( $id , $thrash1 , $other , $thrash3 ) {
2012-01-11 14:05:58 +01:00
$agentName = $id ;
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-11 14:05:58 +01:00
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module. Module_name cannot be left blank.' ));
return ;
}
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 2 ] < 15 or $other [ 'data' ][ 3 ] > 17 ) {
2012-01-11 14:05:58 +01:00
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module. Invalid id_module_type for a SNMP module.' ));
2012-04-27 14:52:33 +02:00
return ;
}
2012-01-11 14:05:58 +01:00
$idAgent = agents_get_agent_id ( $agentName );
2012-04-27 14:52:33 +02:00
if ( ! $idAgent ) {
2012-01-11 14:05:58 +01:00
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module. Agent name doesn\'t exists.' ));
return ;
2012-04-27 14:52:33 +02:00
}
2012-01-11 14:05:58 +01:00
$name = $other [ 'data' ][ 0 ];
2012-04-27 14:52:33 +02:00
2012-01-11 14:05:58 +01:00
# SNMP version 3
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 14 ] == " 3 " ) {
2012-01-11 14:05:58 +01:00
if ( $other [ 'data' ][ 23 ] != " AES " and $other [ 'data' ][ 23 ] != " DES " ){
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module. snmp3_priv_method doesn\'t exists. Set it to \'AES\' or \'DES\'. ' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-11 14:05:58 +01:00
}
if ( $other [ 'data' ][ 25 ] != " authNoPriv " and $other [ 'data' ][ 25 ] != " authPriv " and $other [ 'data' ][ 25 ] != " noAuthNoPriv " ){
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module. snmp3_sec_level doesn\'t exists. Set it to \'authNoPriv\' or \'authPriv\' or \'noAuthNoPriv\'. ' ));
2012-04-27 14:52:33 +02:00
return ;
}
2012-01-11 14:05:58 +01:00
if ( $other [ 'data' ][ 26 ] != " MD5 " and $other [ 'data' ][ 26 ] != " SHA " ){
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module. snmp3_auth_method doesn\'t exists. Set it to \'MD5\' or \'SHA\'. ' ));
2012-04-27 14:52:33 +02:00
return ;
}
2012-01-11 14:05:58 +01:00
$values = array (
'id_agente' => $idAgent ,
'disabled' => $other [ 'data' ][ 1 ],
'id_tipo_modulo' => $other [ 'data' ][ 2 ],
'id_module_group' => $other [ 'data' ][ 3 ],
'min_warning' => $other [ 'data' ][ 4 ],
'max_warning' => $other [ 'data' ][ 5 ],
'str_warning' => $other [ 'data' ][ 6 ],
'min_critical' => $other [ 'data' ][ 7 ],
'max_critical' => $other [ 'data' ][ 8 ],
'str_critical' => $other [ 'data' ][ 9 ],
2012-04-27 14:52:33 +02:00
'min_ff_event' => $other [ 'data' ][ 10 ],
'history_data' => $other [ 'data' ][ 11 ],
2012-01-11 14:05:58 +01:00
'ip_target' => $other [ 'data' ][ 12 ],
2012-04-27 14:52:33 +02:00
'tcp_port' => $other [ 'data' ][ 13 ],
'tcp_send' => $other [ 'data' ][ 14 ],
'snmp_community' => $other [ 'data' ][ 15 ],
2012-01-11 14:05:58 +01:00
'snmp_oid' => $other [ 'data' ][ 16 ],
'module_interval' => $other [ 'data' ][ 17 ],
'post_process' => $other [ 'data' ][ 18 ],
'min' => $other [ 'data' ][ 19 ],
2012-04-27 14:52:33 +02:00
'max' => $other [ 'data' ][ 20 ],
2012-01-11 14:05:58 +01:00
'custom_id' => $other [ 'data' ][ 21 ],
'descripcion' => $other [ 'data' ][ 22 ],
'id_modulo' => 2 ,
'custom_string_1' => $other [ 'data' ][ 23 ],
'custom_string_2' => $other [ 'data' ][ 24 ],
'custom_string_3' => $other [ 'data' ][ 25 ],
'plugin_parameter' => $other [ 'data' ][ 26 ],
'plugin_user' => $other [ 'data' ][ 27 ],
'plugin_pass' => $other [ 'data' ][ 28 ]
2012-04-27 14:52:33 +02:00
);
2012-01-11 14:05:58 +01:00
}
else {
$values = array (
'id_agente' => $idAgent ,
'disabled' => $other [ 'data' ][ 1 ],
'id_tipo_modulo' => $other [ 'data' ][ 2 ],
'id_module_group' => $other [ 'data' ][ 3 ],
'min_warning' => $other [ 'data' ][ 4 ],
'max_warning' => $other [ 'data' ][ 5 ],
'str_warning' => $other [ 'data' ][ 6 ],
'min_critical' => $other [ 'data' ][ 7 ],
'max_critical' => $other [ 'data' ][ 8 ],
'str_critical' => $other [ 'data' ][ 9 ],
2012-04-27 14:52:33 +02:00
'min_ff_event' => $other [ 'data' ][ 10 ],
'history_data' => $other [ 'data' ][ 11 ],
2012-01-11 14:05:58 +01:00
'ip_target' => $other [ 'data' ][ 12 ],
2012-04-27 14:52:33 +02:00
'tcp_port' => $other [ 'data' ][ 13 ],
'tcp_send' => $other [ 'data' ][ 14 ],
'snmp_community' => $other [ 'data' ][ 15 ],
2012-01-11 14:05:58 +01:00
'snmp_oid' => $other [ 'data' ][ 16 ],
'module_interval' => $other [ 'data' ][ 17 ],
'post_process' => $other [ 'data' ][ 18 ],
'min' => $other [ 'data' ][ 19 ],
'max' => $other [ 'data' ][ 20 ],
'custom_id' => $other [ 'data' ][ 21 ],
'descripcion' => $other [ 'data' ][ 22 ],
'id_modulo' => 2
2012-04-27 14:52:33 +02:00
);
2012-01-11 14:05:58 +01:00
}
2012-04-27 14:52:33 +02:00
2012-01-11 14:05:58 +01:00
$idModule = modules_create_agent_module ( $idAgent , $name , $values , true );
if ( is_error ( $idModule )) {
// TODO: Improve the error returning more info
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module.' ));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $idModule ));
}
}
2012-01-10 18:21:46 +01:00
2012-01-16 11:30:16 +01:00
/**
* Update a SNMP module in agent . And return a message with the result of the operation .
*
2012-01-20 13:23:17 +01:00
* @ param string $id Id of module to update .
2012-01-16 11:30:16 +01:00
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < id_agent > ; < disabled > ;
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < ip_target > ; < module_port > ; < snmp_version > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
* < min > ; < max > ; < custom_id > ; < description > ; < snmp3_priv_method > ; < snmp3_priv_pass > ; < snmp3_sec_level > ; < snmp3_auth_method > ;
* < snmp3_auth_user > ; < snmp3_auth_pass > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example ( update snmp v : 3 , snmp3_priv_method : AES , passw | authNoPriv | MD5 | pepito_user | example_priv_passw )
*
* api . php ? op = set & op2 = update_snmp_module & id = example_snmp_module_name & other = 44 | 0 | 6 | 20 | 25 || 26 | 30 || 15 | 1 | 127.0 . 0.1 | 60 | 3 | public |. 1.3 . 6.1 . 2.1 . 1.1 . 0 | 180 | 50.00 | 10 | 60 | 0 | SNMP % 20 module % 20 modified % 20 by % 20 API | AES | example_priv_passw | authNoPriv | MD5 | pepito_user | example_auth_passw & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_update_snmp_module ( $id_module , $thrash1 , $other , $thrash3 ) {
2012-01-16 11:30:16 +01:00
2012-04-27 14:52:33 +02:00
if ( $id_module == " " ) {
2012-01-20 13:23:17 +01:00
returnError ( 'error_update_snmp_module' , __ ( 'Error updating SNMP module. Id_module cannot be left blank.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
2012-01-20 13:23:17 +01:00
$check_id_module = db_get_value ( 'id_agente_modulo' , 'tagente_modulo' , 'id_agente_modulo' , $id_module );
2012-04-27 14:52:33 +02:00
if ( ! $check_id_module ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_update_snmp_module' , __ ( 'Error updating SNMP module. Id_module doesn\'t exists.' ));
2012-04-27 14:52:33 +02:00
return ;
}
2012-01-17 13:08:53 +01:00
2012-01-16 11:30:16 +01:00
// If we want to change the module to a new agent
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 0 ] != " " ) {
2012-01-16 11:30:16 +01:00
$id_agent_old = db_get_value ( 'id_agente' , 'tagente_modulo' , 'id_agente_modulo' , $id_module );
2012-04-27 14:52:33 +02:00
if ( $id_agent_old != $other [ 'data' ][ 0 ]) {
2012-01-16 11:30:16 +01:00
$id_module_exists = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'nombre' => $module_name , 'id_agente' => $other [ 'data' ][ 0 ]));
2012-04-27 14:52:33 +02:00
if ( $id_module_exists ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_update_snmp_module' , __ ( 'Error updating SNMP module. Id_module exists in the new agent.' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
}
}
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
# SNMP version 3
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 13 ] == " 3 " ) {
2012-01-16 11:30:16 +01:00
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 22 ] != " AES " and $other [ 'data' ][ 22 ] != " DES " ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module. snmp3_priv_method doesn\'t exists. Set it to \'AES\' or \'DES\'. ' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
if ( $other [ 'data' ][ 24 ] != " authNoPriv " and $other [ 'data' ][ 24 ] != " authPriv " and $other [ 'data' ][ 24 ] != " noAuthNoPriv " ){
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module. snmp3_sec_level doesn\'t exists. Set it to \'authNoPriv\' or \'authPriv\' or \'noAuthNoPriv\'. ' ));
2012-04-27 14:52:33 +02:00
return ;
}
2012-01-16 11:30:16 +01:00
2012-04-27 14:52:33 +02:00
if ( $other [ 'data' ][ 25 ] != " MD5 " and $other [ 'data' ][ 25 ] != " SHA " ) {
2012-01-16 11:30:16 +01:00
returnError ( 'error_create_snmp_module' , __ ( 'Error in creation SNMP module. snmp3_auth_method doesn\'t exists. Set it to \'MD5\' or \'SHA\'. ' ));
2012-04-27 14:52:33 +02:00
return ;
2012-01-16 11:30:16 +01:00
}
$snmp_module_fields = array ( 'id_agente' , 'disabled' , 'id_module_group' , 'min_warning' , 'max_warning' , 'str_warning' ,
'min_critical' , 'max_critical' , 'str_critical' , 'min_ff_event' , 'history_data' , 'ip_target' , 'tcp_port' , 'tcp_send' ,
'snmp_community' , 'snmp_oid' , 'module_interval' , 'post_process' , 'min' , 'max' , 'custom_id' , 'descripcion' , 'custom_string_1' ,
'custom_string_2' , 'custom_string_3' , 'plugin_parameter' , 'plugin_user' , 'plugin_pass' );
}
else {
$snmp_module_fields = array ( 'id_agente' , 'disabled' , 'id_module_group' , 'min_warning' , 'max_warning' , 'str_warning' ,
'min_critical' , 'max_critical' , 'str_critical' , 'min_ff_event' , 'history_data' , 'ip_target' , 'tcp_port' , 'tcp_send' ,
'snmp_community' , 'snmp_oid' , 'module_interval' , 'post_process' , 'min' , 'max' , 'custom_id' , 'descripcion' );
2012-04-27 14:52:33 +02:00
}
2012-01-16 11:30:16 +01:00
$values = array ();
$cont = 0 ;
foreach ( $snmp_module_fields as $field ){
if ( $other [ 'data' ][ $cont ] != " " ){
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
$result_update = modules_update_agent_module ( $id_module , $values );
2012-04-27 14:52:33 +02:00
2012-01-16 11:30:16 +01:00
if ( $result_update < 0 )
returnError ( 'error_update_snmp_module' , 'Error updating SNMP module.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'SNMP module updated.' )));
}
2012-01-12 16:33:52 +01:00
/**
2012-01-17 21:20:45 +01:00
* Create new network component .
2012-01-12 16:33:52 +01:00
*
2012-01-17 21:20:45 +01:00
* @ param $id string Name of the network component .
2012-01-12 16:33:52 +01:00
* @ param $thrash1 Don ' t use .
2012-01-17 21:20:45 +01:00
* @ param array $other it ' s array , $other as param is < network_component_type > ; < description > ;
* < module_interval > ; < max_value > ; < min_value > ; < snmp_community > ; < id_module_group > ; < max_timeout > ;
* < history_data > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ;
2012-10-29 Ramon Novoa <rnovoa@artica.es>
* include/functions_reporting.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_api.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/menu.php,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/servers/plugin.php,
godmode/menu.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: Added support for
custom timeout and retries to remote modules.
* operation/netflow/nf_reporting.php,
operation/netflow/nf_view.php,
godmode/netflow/nf_report_item.php,
godmode/netflow/nf_report.php,
godmode/netflow/nf_report_form.php,
godmode/netflow/nf.php: Deleted from repository. Netflow reports are
now integrated into custom reports.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7103 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-10-29 11:13:49 +01:00
* < ff_threshold > ; < post_process > ; < network_component_group > ; < max_retries > in this
2012-01-12 16:33:52 +01:00
* order and separator char ( after text ; ) and separator ( pass in param
* othermode as othermode = url_encode_separator_ < separator > )
* example :
*
2012-01-17 21:20:45 +01:00
* api . php ? op = set & op2 = new_network_component & id = example_network_component_name & other = 7 | network % 20 component % 20 created % 20 by % 20 Api | 300 | 30 | 10 | public | 3 || 1 | 10 | 20 | str | 21 | 30 | str1 | 10 | 50.00 | 12 & other_mode = url_encode_separator_ |
2012-01-12 16:33:52 +01:00
*
* @ param $thrash2 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_new_network_component ( $id , $thrash1 , $other , $thrash2 ) {
2012-01-12 16:33:52 +01:00
2012-08-17 13:39:25 +02:00
if ( $id == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_network_component' , __ ( 'Error creating network component. Network component name cannot be left blank.' ));
2012-08-17 13:39:25 +02:00
return ;
2012-01-17 21:20:45 +01:00
}
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 0 ] < 6 or $other [ 'data' ][ 0 ] > 18 ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_network_component' , __ ( 'Error creating network component. Incorrect value for Network component type field.' ));
2012-08-17 13:39:25 +02:00
return ;
2012-01-17 21:20:45 +01:00
}
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 17 ] == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_network_component' , __ ( 'Error creating network component. Network component group cannot be left blank.' ));
2012-08-17 13:39:25 +02:00
return ;
}
2012-01-17 21:20:45 +01:00
$values = array (
2012-08-17 13:39:25 +02:00
'description' => $other [ 'data' ][ 1 ],
'module_interval' => $other [ 'data' ][ 2 ],
'max' => $other [ 'data' ][ 3 ],
'min' => $other [ 'data' ][ 4 ],
'snmp_community' => $other [ 'data' ][ 5 ],
'id_module_group' => $other [ 'data' ][ 6 ],
'id_modulo' => 2 ,
'max_timeout' => $other [ 'data' ][ 7 ],
'history_data' => $other [ 'data' ][ 8 ],
'min_warning' => $other [ 'data' ][ 9 ],
'max_warning' => $other [ 'data' ][ 10 ],
'str_warning' => $other [ 'data' ][ 11 ],
'min_critical' => $other [ 'data' ][ 12 ],
'max_critical' => $other [ 'data' ][ 13 ],
'str_critical' => $other [ 'data' ][ 14 ],
'min_ff_event' => $other [ 'data' ][ 15 ],
2012-10-29 Ramon Novoa <rnovoa@artica.es>
* include/functions_reporting.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_api.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/menu.php,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/servers/plugin.php,
godmode/menu.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: Added support for
custom timeout and retries to remote modules.
* operation/netflow/nf_reporting.php,
operation/netflow/nf_view.php,
godmode/netflow/nf_report_item.php,
godmode/netflow/nf_report.php,
godmode/netflow/nf_report_form.php,
godmode/netflow/nf.php: Deleted from repository. Netflow reports are
now integrated into custom reports.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7103 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-10-29 11:13:49 +01:00
'post_process' => $other [ 'data' ][ 16 ],
'max_retries' => $other [ 'data' ][ 17 ],
);
2012-01-17 21:20:45 +01:00
$name_check = db_get_value ( 'name' , 'tnetwork_component' , 'name' , $id );
2012-08-17 13:39:25 +02:00
if ( $name_check !== false ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_network_component' , __ ( 'Error creating network component. This network component already exists.' ));
2012-08-17 13:39:25 +02:00
return ;
2012-01-17 21:20:45 +01:00
}
$id = network_components_create_network_component ( $id , $other [ 'data' ][ 0 ], $other [ 'data' ][ 17 ], $values );
2012-08-17 13:39:25 +02:00
2012-01-17 21:20:45 +01:00
if ( ! $id )
returnError ( 'error_set_new_network_component' , 'Error creating network component.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $id ));
}
/**
* Create new plugin component .
*
* @ param $id string Name of the plugin component .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < plugin_component_type > ; < description > ;
* < module_interval > ; < max_value > ; < min_value > ; < module_port > ; < id_module_group > ; < id_plugin > ; < max_timeout > ;
* < history_data > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ;
2012-10-29 Ramon Novoa <rnovoa@artica.es>
* include/functions_reporting.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_api.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/menu.php,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/servers/plugin.php,
godmode/menu.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: Added support for
custom timeout and retries to remote modules.
* operation/netflow/nf_reporting.php,
operation/netflow/nf_view.php,
godmode/netflow/nf_report_item.php,
godmode/netflow/nf_report.php,
godmode/netflow/nf_report_form.php,
godmode/netflow/nf.php: Deleted from repository. Netflow reports are
now integrated into custom reports.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7103 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-10-29 11:13:49 +01:00
* < ff_threshold > ; < post_process > ; < plugin_component_group > ; < max_retries > in this
2012-01-17 21:20:45 +01:00
* order and separator char ( after text ; ) and separator ( pass in param
* othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = new_plugin_component & id = example_plugin_component_name & other = 2 | plugin % 20 component % 20 created % 20 by % 20 Api | 300 | 30 | 10 | 66 | 3 | 2 | example_user | example_pass |- p % 20 max || 1 | 10 | 20 | str | 21 | 30 | str1 | 10 | 50.00 | 12 & other_mode = url_encode_separator_ |
*
* @ param $thrash2 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_new_plugin_component ( $id , $thrash1 , $other , $thrash2 ) {
2012-08-17 13:39:25 +02:00
if ( $id == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_plugin_component' , __ ( 'Error creating plugin component. Plugin component name cannot be left blank.' ));
2012-08-17 13:39:25 +02:00
return ;
2012-01-17 21:20:45 +01:00
}
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 7 ] == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_plugin_component' , __ ( 'Error creating plugin component. Incorrect value for Id plugin.' ));
2012-08-17 13:39:25 +02:00
return ;
2012-01-17 21:20:45 +01:00
}
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 21 ] == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_plugin_component' , __ ( 'Error creating plugin component. Plugin component group cannot be left blank.' ));
2012-08-17 13:39:25 +02:00
return ;
}
2012-01-17 21:20:45 +01:00
$values = array (
2012-08-17 13:39:25 +02:00
'description' => $other [ 'data' ][ 1 ],
'module_interval' => $other [ 'data' ][ 2 ],
'max' => $other [ 'data' ][ 3 ],
'min' => $other [ 'data' ][ 4 ],
'tcp_port' => $other [ 'data' ][ 5 ],
'id_module_group' => $other [ 'data' ][ 6 ],
'id_modulo' => 4 ,
'id_plugin' => $other [ 'data' ][ 7 ],
'plugin_user' => $other [ 'data' ][ 8 ],
'plugin_pass' => $other [ 'data' ][ 9 ],
'plugin_parameter' => $other [ 'data' ][ 10 ],
'max_timeout' => $other [ 'data' ][ 11 ],
'history_data' => $other [ 'data' ][ 12 ],
'min_warning' => $other [ 'data' ][ 13 ],
'max_warning' => $other [ 'data' ][ 14 ],
'str_warning' => $other [ 'data' ][ 15 ],
'min_critical' => $other [ 'data' ][ 16 ],
'max_critical' => $other [ 'data' ][ 17 ],
'str_critical' => $other [ 'data' ][ 18 ],
'min_ff_event' => $other [ 'data' ][ 19 ],
2012-10-29 Ramon Novoa <rnovoa@artica.es>
* include/functions_reporting.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_api.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/menu.php,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/servers/plugin.php,
godmode/menu.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: Added support for
custom timeout and retries to remote modules.
* operation/netflow/nf_reporting.php,
operation/netflow/nf_view.php,
godmode/netflow/nf_report_item.php,
godmode/netflow/nf_report.php,
godmode/netflow/nf_report_form.php,
godmode/netflow/nf.php: Deleted from repository. Netflow reports are
now integrated into custom reports.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7103 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-10-29 11:13:49 +01:00
'post_process' => $other [ 'data' ][ 20 ],
'max_retries' => $other [ 'data' ][ 11 ]);
2012-01-17 21:20:45 +01:00
$name_check = db_get_value ( 'name' , 'tnetwork_component' , 'name' , $id );
2012-08-17 13:39:25 +02:00
if ( $name_check !== false ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_plugin_component' , __ ( 'Error creating plugin component. This plugin component already exists.' ));
2012-08-17 13:39:25 +02:00
return ;
2012-01-17 21:20:45 +01:00
}
$id = network_components_create_network_component ( $id , $other [ 'data' ][ 0 ], $other [ 'data' ][ 21 ], $values );
2012-08-17 13:39:25 +02:00
2012-01-17 21:20:45 +01:00
if ( ! $id )
returnError ( 'error_set_new_plugin_component' , 'Error creating plugin component.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $id ));
}
/**
* Create new SNMP component .
*
* @ param $id string Name of the SNMP component .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < snmp_component_type > ; < description > ;
* < module_interval > ; < max_value > ; < min_value > ; < id_module_group > ; < max_timeout > ;
* < history_data > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ;
* < ff_threshold > ; < post_process > ; < snmp_version > ; < snmp_oid > ; < snmp_community > ;
2012-10-29 Ramon Novoa <rnovoa@artica.es>
* include/functions_reporting.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_api.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/menu.php,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/servers/plugin.php,
godmode/menu.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: Added support for
custom timeout and retries to remote modules.
* operation/netflow/nf_reporting.php,
operation/netflow/nf_view.php,
godmode/netflow/nf_report_item.php,
godmode/netflow/nf_report.php,
godmode/netflow/nf_report_form.php,
godmode/netflow/nf.php: Deleted from repository. Netflow reports are
now integrated into custom reports.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7103 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-10-29 11:13:49 +01:00
* < snmp3_auth_user > ; < snmp3_auth_pass > ; < module_port > ; < snmp3_privacy_method > ; < snmp3_privacy_pass > ; < snmp3_auth_method > ; < snmp3_security_level > ; < snmp_component_group > ; < max_retries > in this
2012-01-17 21:20:45 +01:00
* order and separator char ( after text ; ) and separator ( pass in param
* othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = new_snmp_component & id = example_snmp_component_name & other = 16 | SNMP % 20 component % 20 created % 20 by % 20 Api | 300 | 30 | 10 | 3 || 1 | 10 | 20 | str | 21 | 30 | str1 | 15 | 50.00 | 3 |. 1.3 . 6.1 . 2.1 . 2.2 . 1.8 . 2 | public | example_auth_user | example_auth_pass | 66 | AES | example_priv_pass | MD5 | authNoPriv | 12 & other_mode = url_encode_separator_ |
*
* @ param $thrash2 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_new_snmp_component ( $id , $thrash1 , $other , $thrash2 ) {
2012-08-17 13:39:25 +02:00
if ( $id == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_snmp_component' , __ ( 'Error creating SNMP component. SNMP component name cannot be left blank.' ));
2012-08-17 13:39:25 +02:00
return ;
2012-01-17 21:20:45 +01:00
}
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 0 ] < 15 or $other [ 'data' ][ 0 ] > 17 ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_snmp_component' , __ ( 'Error creating SNMP component. Incorrect value for Snmp component type field.' ));
2012-08-17 13:39:25 +02:00
return ;
2012-01-17 21:20:45 +01:00
}
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 25 ] == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_snmp_component' , __ ( 'Error creating SNMP component. Snmp component group cannot be left blank.' ));
2012-08-17 13:39:25 +02:00
return ;
}
2012-01-17 21:20:45 +01:00
# SNMP version 3
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 16 ] == " 3 " ) {
2012-01-17 21:20:45 +01:00
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 22 ] != " AES " and $other [ 'data' ][ 22 ] != " DES " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_snmp_component' , __ ( 'Error creating SNMP component. snmp3_priv_method doesn\'t exists. Set it to \'AES\' or \'DES\'. ' ));
return ;
}
if ( $other [ 'data' ][ 25 ] != " authNoPriv " and $other [ 'data' ][ 25 ] != " authPriv " and $other [ 'data' ][ 25 ] != " noAuthNoPriv " ){
returnError ( 'error_set_new_snmp_component' , __ ( 'Error creating SNMP component. snmp3_sec_level doesn\'t exists. Set it to \'authNoPriv\' or \'authPriv\' or \'noAuthNoPriv\'. ' ));
2012-08-17 13:39:25 +02:00
return ;
}
2012-01-17 21:20:45 +01:00
2012-08-17 13:39:25 +02:00
if ( $other [ 'data' ][ 24 ] != " MD5 " and $other [ 'data' ][ 24 ] != " SHA " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_snmp_component' , __ ( 'Error creating SNMP component. snmp3_auth_method doesn\'t exists. Set it to \'MD5\' or \'SHA\'. ' ));
2012-08-17 13:39:25 +02:00
return ;
}
2012-01-17 21:20:45 +01:00
$values = array (
'description' => $other [ 'data' ][ 1 ],
'module_interval' => $other [ 'data' ][ 2 ],
'max' => $other [ 'data' ][ 3 ],
'min' => $other [ 'data' ][ 4 ],
'id_module_group' => $other [ 'data' ][ 5 ],
2012-10-29 Ramon Novoa <rnovoa@artica.es>
* include/functions_reporting.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_api.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/menu.php,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/servers/plugin.php,
godmode/menu.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: Added support for
custom timeout and retries to remote modules.
* operation/netflow/nf_reporting.php,
operation/netflow/nf_view.php,
godmode/netflow/nf_report_item.php,
godmode/netflow/nf_report.php,
godmode/netflow/nf_report_form.php,
godmode/netflow/nf.php: Deleted from repository. Netflow reports are
now integrated into custom reports.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7103 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-10-29 11:13:49 +01:00
'max_timeout' => $other [ 'data' ][ 6 ],
2012-01-17 21:20:45 +01:00
'history_data' => $other [ 'data' ][ 7 ],
'min_warning' => $other [ 'data' ][ 8 ],
'max_warning' => $other [ 'data' ][ 9 ],
'str_warning' => $other [ 'data' ][ 10 ],
'min_critical' => $other [ 'data' ][ 11 ],
'max_critical' => $other [ 'data' ][ 12 ],
'str_critical' => $other [ 'data' ][ 13 ],
'min_ff_event' => $other [ 'data' ][ 14 ],
'post_process' => $other [ 'data' ][ 15 ],
'tcp_send' => $other [ 'data' ][ 16 ],
'snmp_oid' => $other [ 'data' ][ 17 ],
'snmp_community' => $other [ 'data' ][ 18 ],
'plugin_user' => $other [ 'data' ][ 19 ], // snmp3_auth_user
'plugin_pass' => $other [ 'data' ][ 20 ], // snmp3_auth_pass
'tcp_port' => $other [ 'data' ][ 21 ],
'id_modulo' => 2 ,
'custom_string_1' => $other [ 'data' ][ 22 ], // snmp3_privacy_method
'custom_string_2' => $other [ 'data' ][ 23 ], // snmp3_privacy_pass
'plugin_parameter' => $other [ 'data' ][ 24 ], // snmp3_auth_method
'custom_string_3' => $other [ 'data' ][ 25 ], // snmp3_security_level
2012-10-29 Ramon Novoa <rnovoa@artica.es>
* include/functions_reporting.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_api.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/menu.php,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/servers/plugin.php,
godmode/menu.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: Added support for
custom timeout and retries to remote modules.
* operation/netflow/nf_reporting.php,
operation/netflow/nf_view.php,
godmode/netflow/nf_report_item.php,
godmode/netflow/nf_report.php,
godmode/netflow/nf_report_form.php,
godmode/netflow/nf.php: Deleted from repository. Netflow reports are
now integrated into custom reports.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7103 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-10-29 11:13:49 +01:00
'max_retries' => $other [ 'data' ][ 26 ],
2012-01-17 21:20:45 +01:00
);
}
else {
$values = array (
'description' => $other [ 'data' ][ 1 ],
'module_interval' => $other [ 'data' ][ 2 ],
'max' => $other [ 'data' ][ 3 ],
'min' => $other [ 'data' ][ 4 ],
'id_module_group' => $other [ 'data' ][ 5 ],
'max_timeout' => $other [ 'data' ][ 6 ],
'history_data' => $other [ 'data' ][ 7 ],
'min_warning' => $other [ 'data' ][ 8 ],
'max_warning' => $other [ 'data' ][ 9 ],
'str_warning' => $other [ 'data' ][ 10 ],
'min_critical' => $other [ 'data' ][ 11 ],
'max_critical' => $other [ 'data' ][ 12 ],
'str_critical' => $other [ 'data' ][ 13 ],
'min_ff_event' => $other [ 'data' ][ 14 ],
'post_process' => $other [ 'data' ][ 15 ],
'tcp_send' => $other [ 'data' ][ 16 ],
'snmp_oid' => $other [ 'data' ][ 17 ],
'snmp_community' => $other [ 'data' ][ 18 ],
'plugin_user' => '' ,
'plugin_pass' => '' ,
'tcp_port' => $other [ 'data' ][ 21 ],
2012-11-12 15:53:33 +01:00
'id_modulo' => 2 ,
2012-10-29 Ramon Novoa <rnovoa@artica.es>
* include/functions_reporting.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_api.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/menu.php,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/servers/plugin.php,
godmode/menu.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: Added support for
custom timeout and retries to remote modules.
* operation/netflow/nf_reporting.php,
operation/netflow/nf_view.php,
godmode/netflow/nf_report_item.php,
godmode/netflow/nf_report.php,
godmode/netflow/nf_report_form.php,
godmode/netflow/nf.php: Deleted from repository. Netflow reports are
now integrated into custom reports.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7103 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-10-29 11:13:49 +01:00
'max_retries' => $other [ 'data' ][ 22 ],
2012-01-17 21:20:45 +01:00
);
}
$name_check = db_get_value ( 'name' , 'tnetwork_component' , 'name' , $id );
if ( $name_check !== false ){
returnError ( 'error_set_new_snmp_component' , __ ( 'Error creating SNMP component. This SNMP component already exists.' ));
return ;
}
$id = network_components_create_network_component ( $id , $other [ 'data' ][ 0 ], $other [ 'data' ][ 25 ], $values );
2012-01-12 16:33:52 +01:00
2012-01-17 21:20:45 +01:00
if ( ! $id )
returnError ( 'error_set_new_snmp_component' , 'Error creating SNMP component.' );
2012-01-12 16:33:52 +01:00
else
2012-01-17 21:20:45 +01:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $id ));
}
/**
* Create new local ( data ) component .
*
* @ param $id string Name of the local component .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < description > ; < id_os > ;
* < local_component_group > ; < configuration_data > in this
* order and separator char ( after text ; ) and separator ( pass in param
* othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = new_local_component & id = example_local_component_name & other = local % 20 component % 20 created % 20 by % 20 Api ~ 5 ~ 12 ~ module_begin % 0 dmodule_name % 20 example_local_component_name % 0 dmodule_type % 20 generic_data % 0 dmodule_exec % 20 ps % 20 |% 20 grep % 20 pid % 20 |% 20 wc % 20 - l % 0 dmodule_interval % 202 % 0 dmodule_end & other_mode = url_encode_separator_ ~
*
* @ param $thrash2 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_new_local_component ( $id , $thrash1 , $other , $thrash2 ) {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( $id == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_local_component' , __ ( 'Error creating local component. Local component name cannot be left blank.' ));
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
return ;
2012-01-17 21:20:45 +01:00
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( $other [ 'data' ][ 1 ] == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_local_component' , __ ( 'Error creating local component. Local component group cannot be left blank.' ));
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
return ;
}
2012-01-17 21:20:45 +01:00
$values = array (
'description' => $other [ 'data' ][ 0 ],
'id_network_component_group' => $other [ 'data' ][ 1 ]
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
);
2012-01-17 21:20:45 +01:00
$name_check = enterprise_hook ( 'local_components_get_local_components' , array ( array ( 'name' => $id ), 'name' ));
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-17 21:20:45 +01:00
if ( $name_check === ENTERPRISE_NOT_HOOK ) {
returnError ( 'error_set_new_local_component' , __ ( 'Error creating local component.' ));
return ;
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( $name_check !== false ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_set_new_local_component' , __ ( 'Error creating local component. This local component already exists.' ));
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
return ;
2012-01-17 21:20:45 +01:00
}
$id = enterprise_hook ( 'local_components_create_local_component' , array ( $id , $other [ 'data' ][ 3 ], $other [ 'data' ][ 1 ], $values ));
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-17 21:20:45 +01:00
if ( ! $id )
returnError ( 'error_set_new_local_component' , 'Error creating local component.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $id ));
2012-01-12 16:33:52 +01:00
}
2012-01-19 18:45:59 +01:00
/**
* Get module data value from all agents filter by module name . And return id_agents , agent_name and module value .
*
* @ param $id string Name of the module .
* @ param $thrash1 Don ' t use .
* @ param array $other Don ' t use .
* example :
*
* api . php ? op = get & op2 = module_value_all_agents & id = example_module_name
*
* @ param $thrash2 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_module_value_all_agents ( $id , $thrash1 , $other , $thrash2 ) {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( $id == " " ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_get_module_value_all_agents' , __ ( 'Error getting module value from all agents. Module name cannot be left blank.' ));
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-19 18:45:59 +01:00
$id_module = db_get_value ( 'id_agente_modulo' , 'tagente_modulo' , 'nombre' , $id );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( $id_module === false ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_get_module_value_all_agents' , __ ( 'Error getting module value from all agents. Module name doesn\'t exists.' ));
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-19 18:45:59 +01:00
$sql = sprintf ( " SELECT agent.id_agente, agent.nombre, module_state.datos FROM tagente agent, tagente_modulo module, tagente_estado module_state WHERE agent.id_agente = module.id_agente AND module.id_agente_modulo=module_state.id_agente_modulo AND module.nombre = '%s' " , $id );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-19 18:45:59 +01:00
$module_values = db_get_all_rows_sql ( $sql );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( ! $module_values ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_get_module_value_all_agents' , 'Error getting module values from all agents.' );
}
else {
$data = array ( 'type' => 'array' , 'data' => $module_values );
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
returnData ( 'csv' , $data , ';' );
2012-01-19 18:45:59 +01:00
}
}
2012-01-10 18:21:46 +01:00
/**
* Create an alert template . And return the id of new template .
*
2012-01-11 14:05:58 +01:00
* @ param string $id Name of alert template to add .
2012-01-10 18:21:46 +01:00
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < type > ; < description > ; < id_alert_action > ;
* < field1 > ; < field2 > ; < field3 > ; < value > ; < matches_value > ; < max_value > ; < min_value > ; < time_threshold > ;
* < max_alerts > ; < min_alerts > ; < time_from > ; < time_to > ; < monday > ; < tuesday > ; < wednesday > ;
* < thursday > ; < friday > ; < saturday > ; < sunday > ; < recovery_notify > ; < field2_recovery > ; < field3_recovery > ; < priority > ; < id_group > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example 1 ( condition : regexp =~ / pp / , action : Mail to XXX , max_alert : 10 , min_alert : 0 , priority : WARNING , group : databases ) :
* api . php ? op = set & op2 = create_alert_template & id = pepito & other = regex | template % 20 based % 20 in % 20 regexp | 1 |||| pp | 1 |||| 10 | 0 ||||||||||||| 3 & other_mode = url_encode_separator_ |
*
* example 2 ( condition : value is not between 5 and 10 , max_value : 10.00 , min_value : 5.00 , time_from : 00 : 00 : 00 , time_to : 15 : 00 : 00 , priority : CRITICAL , group : Servers ) :
* api . php ? op = set & op2 = create_alert_template & id = template_min_max & other = max_min | template % 20 based % 20 in % 20 range | NULL |||||| 10 | 5 |||| 00 : 00 : 00 | 15 : 00 : 00 ||||||||||| 4 | 2 & other_mode = url_encode_separator_ |
2012-01-11 14:05:58 +01:00
*
2012-01-10 18:21:46 +01:00
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_create_alert_template ( $name , $thrash1 , $other , $thrash3 ) {
2012-01-10 18:21:46 +01:00
if ( $name == " " ) {
returnError ( 'error_create_alert_template' , __ ( 'Error creating alert template. Template name cannot be left blank.' ));
return ;
}
$template_name = $name ;
$type = $other [ 'data' ][ 0 ];
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( $other [ 'data' ][ 2 ] != " " ) {
2012-01-10 18:21:46 +01:00
$values = array (
'description' => $other [ 'data' ][ 1 ],
'id_alert_action' => $other [ 'data' ][ 2 ],
'field1' => $other [ 'data' ][ 3 ],
'field2' => $other [ 'data' ][ 4 ],
'field3' => $other [ 'data' ][ 5 ],
'value' => $other [ 'data' ][ 6 ],
'matches_value' => $other [ 'data' ][ 7 ],
'max_value' => $other [ 'data' ][ 8 ],
'min_value' => $other [ 'data' ][ 9 ],
'time_threshold' => $other [ 'data' ][ 10 ],
'max_alerts' => $other [ 'data' ][ 11 ],
'min_alerts' => $other [ 'data' ][ 12 ],
'time_from' => $other [ 'data' ][ 13 ],
'time_to' => $other [ 'data' ][ 14 ],
'monday' => $other [ 'data' ][ 15 ],
'tuesday' => $other [ 'data' ][ 16 ],
'wednesday' => $other [ 'data' ][ 17 ],
'thursday' => $other [ 'data' ][ 18 ],
'friday' => $other [ 'data' ][ 19 ],
'saturday' => $other [ 'data' ][ 20 ],
'sunday' => $other [ 'data' ][ 21 ],
'recovery_notify' => $other [ 'data' ][ 22 ],
'field2_recovery' => $other [ 'data' ][ 23 ],
'field3_recovery' => $other [ 'data' ][ 24 ],
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
'priority' => $other [ 'data' ][ 25 ],
'id_group' => $other [ 'data' ][ 26 ]
2012-01-10 18:21:46 +01:00
);
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
}
else {
2012-01-10 18:21:46 +01:00
$values = array (
'description' => $other [ 'data' ][ 1 ],
'field1' => $other [ 'data' ][ 3 ],
'field2' => $other [ 'data' ][ 4 ],
'field3' => $other [ 'data' ][ 5 ],
'value' => $other [ 'data' ][ 6 ],
'matches_value' => $other [ 'data' ][ 7 ],
'max_value' => $other [ 'data' ][ 8 ],
'min_value' => $other [ 'data' ][ 9 ],
'time_threshold' => $other [ 'data' ][ 10 ],
'max_alerts' => $other [ 'data' ][ 11 ],
'min_alerts' => $other [ 'data' ][ 12 ],
'time_from' => $other [ 'data' ][ 13 ],
'time_to' => $other [ 'data' ][ 14 ],
'monday' => $other [ 'data' ][ 15 ],
'tuesday' => $other [ 'data' ][ 16 ],
'wednesday' => $other [ 'data' ][ 17 ],
'thursday' => $other [ 'data' ][ 18 ],
'friday' => $other [ 'data' ][ 19 ],
'saturday' => $other [ 'data' ][ 20 ],
'sunday' => $other [ 'data' ][ 21 ],
'recovery_notify' => $other [ 'data' ][ 22 ],
'field2_recovery' => $other [ 'data' ][ 23 ],
'field3_recovery' => $other [ 'data' ][ 24 ],
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
'priority' => $other [ 'data' ][ 25 ],
'id_group' => $other [ 'data' ][ 26 ]
);
2012-01-10 18:21:46 +01:00
}
$id_template = alerts_create_alert_template ( $template_name , $type , $values );
if ( is_error ( $id_template )) {
// TODO: Improve the error returning more info
returnError ( 'error_create_alert_template' , __ ( 'Error creating alert template.' ));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $id_template ));
}
}
2012-01-12 16:33:52 +01:00
/**
* Update an alert template . And return a message with the result of the operation .
*
* @ param string $id_template Id of the template to update .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < template_name > ; < type > ; < description > ; < id_alert_action > ;
* < field1 > ; < field2 > ; < field3 > ; < value > ; < matches_value > ; < max_value > ; < min_value > ; < time_threshold > ;
* < max_alerts > ; < min_alerts > ; < time_from > ; < time_to > ; < monday > ; < tuesday > ; < wednesday > ;
* < thursday > ; < friday > ; < saturday > ; < sunday > ; < recovery_notify > ; < field2_recovery > ; < field3_recovery > ; < priority > ; < id_group > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
*
* example :
*
* api . php ? op = set & op2 = update_alert_template & id = 38 & other = example_template_with_changed_name | onchange | changing % 20 from % 20 min_max % 20 to % 20 onchange |||||| 1 |||| 5 | 1 ||| 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | field % 20 recovery % 20 example % 201 | field % 20 recovery % 20 example % 202 | 1 | 8 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_update_alert_template ( $id_template , $thrash1 , $other , $thrash3 ) {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-12 16:33:52 +01:00
if ( $id_template == " " ) {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
returnError ( 'error_update_alert_template' ,
__ ( 'Error updating alert template. Id_template cannot be left blank.' ));
2012-01-12 16:33:52 +01:00
return ;
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-12 16:33:52 +01:00
$result_template = alerts_get_alert_template_name ( $id_template );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( ! $result_template ) {
returnError ( 'error_update_alert_template' ,
__ ( 'Error updating alert template. Id_template doesn\'t exists.' ));
2012-01-12 16:33:52 +01:00
return ;
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
$fields_template = array ( 'name' , 'type' , 'description' ,
'id_alert_action' , 'field1' , 'field2' , 'field3' , 'value' ,
'matches_value' , 'max_value' , 'min_value' , 'time_threshold' ,
'max_alerts' , 'min_alerts' , 'time_from' , 'time_to' , 'monday' ,
'tuesday' , 'wednesday' , 'thursday' , 'friday' , 'saturday' ,
'sunday' , 'recovery_notify' , 'field2_recovery' ,
'field3_recovery' , 'priority' , 'id_group' );
2012-01-12 16:33:52 +01:00
$cont = 0 ;
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
foreach ( $fields_template as $field ) {
if ( $other [ 'data' ][ $cont ] != " " ) {
2012-01-12 16:33:52 +01:00
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-12 16:33:52 +01:00
$id_template = alerts_update_alert_template ( $id_template , $values );
if ( is_error ( $id_template )) {
// TODO: Improve the error returning more info
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
returnError ( 'error_create_alert_template' ,
__ ( 'Error updating alert template.' ));
2012-01-12 16:33:52 +01:00
}
else {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
returnData ( 'string' ,
array ( 'type' => 'string' ,
'data' => __ ( 'Correct updating of alert template' )));
2012-01-12 16:33:52 +01:00
}
}
/**
* Delete an alert template . And return a message with the result of the operation .
*
* @ param string $id_template Id of the template to delete .
* @ param $thrash1 Don ' t use .
* @ param array $other Don ' t use
*
* example :
*
* api . php ? op = set & op2 = delete_alert_template & id = 38
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_delete_alert_template ( $id_template , $thrash1 , $other , $thrash3 ) {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-12 16:33:52 +01:00
if ( $id_template == " " ) {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
returnError ( 'error_delete_alert_template' ,
__ ( 'Error deleting alert template. Id_template cannot be left blank.' ));
2012-01-12 16:33:52 +01:00
return ;
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-01-12 16:33:52 +01:00
$result = alerts_delete_alert_template ( $id_template );
if ( $result == 0 ) {
// TODO: Improve the error returning more info
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
returnError ( 'error_create_alert_template' ,
__ ( 'Error deleting alert template.' ));
2012-01-12 16:33:52 +01:00
}
else {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
returnData ( 'string' , array ( 'type' => 'string' ,
'data' => __ ( 'Correct deleting of alert template.' )));
2012-01-12 16:33:52 +01:00
}
}
2012-02-14 07:32:58 +01:00
/**
* Get all alert tamplates , and print all the result like a csv .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , but only < csv_separator > is available .
* example :
*
* api . php ? op = get & op2 = all_alert_templates & return_type = csv & other = ;
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_all_alert_templates ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-02-14 07:32:58 +01:00
if ( ! isset ( $other [ 'data' ][ 0 ]))
$separator = ';' ; // by default
else
$separator = $other [ 'data' ][ 0 ];
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-02-14 07:32:58 +01:00
$filter_templates = false ;
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-02-14 07:32:58 +01:00
$template = alerts_get_alert_templates ();
if ( $template !== false ) {
$data [ 'type' ] = 'array' ;
$data [ 'data' ] = $template ;
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-02-14 07:32:58 +01:00
if ( ! $template ) {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
returnError ( 'error_get_all_alert_templates' ,
__ ( 'Error getting all alert templates.' ));
2012-02-14 07:32:58 +01:00
}
else {
2012-04-02 09:14:42 +02:00
returnData ( 'csv' , $data , $separator );
2012-02-14 07:32:58 +01:00
}
}
2012-02-06 06:53:39 +01:00
/**
* Get an alert tamplate , and print the result like a csv .
*
* @ param string $id_template Id of the template to get .
* @ param $thrash1 Don ' t use .
* @ param array $other Don ' t use
*
* example :
*
* api . php ? op = get & op2 = alert_template & id = 25
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_get_alert_template ( $id_template , $thrash1 , $other , $thrash3 ) {
2012-02-02 14:17:23 +01:00
$filter_templates = false ;
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-02-02 14:17:23 +01:00
if ( $id_template != " " ) {
$result_template = alerts_get_alert_template_name ( $id_template );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-02-02 14:17:23 +01:00
if ( ! $result_template ){
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
returnError ( 'error_get_alert_template' ,
__ ( 'Error getting alert template. Id_template doesn\'t exists.' ));
2012-02-02 14:17:23 +01:00
return ;
}
$filter_templates = array ( 'id' => $id_template );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
}
$template = alerts_get_alert_templates ( $filter_templates ,
array ( 'id' , 'name' , 'description' , 'id_alert_action' , 'type' , 'id_group' ));
2012-02-02 14:17:23 +01:00
2013-01-29 19:03:08 +01:00
if ( $template !== false ) {
2012-02-02 14:17:23 +01:00
$data [ 'type' ] = 'array' ;
2013-01-29 19:03:08 +01:00
$data [ 'data' ] = $template ;
}
2012-02-02 14:17:23 +01:00
if ( ! $template ) {
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
returnError ( 'error_get_alert_template' ,
__ ( 'Error getting alert template.' ));
2012-02-02 14:17:23 +01:00
}
else {
returnData ( 'csv' , $data , ';' );
}
}
2012-04-02 09:14:42 +02:00
/**
* Get module groups , and print all the result like a csv .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , but only < csv_separator > is available .
* example :
*
* api . php ? op = get & op2 = module_groups & return_type = csv & other = ;
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_module_groups ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( ! isset ( $other [ 'data' ][ 0 ]))
$separator = ';' ; // by default
else
$separator = $other [ 'data' ][ 0 ];
$filter = false ;
2012-04-02 09:14:42 +02:00
$module_groups = @ db_get_all_rows_filter ( 'tmodule_group' , $filter );
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $module_groups !== false ) {
$data [ 'type' ] = 'array' ;
$data [ 'data' ] = $module_groups ;
}
if ( ! $module_groups ) {
returnError ( 'error_get_module_groups' , __ ( 'Error getting module groups.' ));
}
else {
returnData ( 'csv' , $data , $separator );
}
2012-04-02 09:14:42 +02:00
}
/**
* Get plugins , and print all the result like a csv .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , but only < csv_separator > is available .
* example :
*
* api . php ? op = get & op2 = plugins & return_type = csv & other = ;
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_plugins ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( ! isset ( $other [ 'data' ][ 0 ]))
$separator = ';' ; // by default
else
$separator = $other [ 'data' ][ 0 ];
$filter = false ;
$plugins = @ db_get_all_rows_filter ( 'tplugin' , $filter );
if ( $plugins !== false ) {
$data [ 'type' ] = 'array' ;
$data [ 'data' ] = $plugins ;
}
if ( ! $plugins ) {
returnError ( 'error_get_plugins' , __ ( 'Error getting plugins.' ));
}
else {
returnData ( 'csv' , $data , $separator );
}
2012-04-02 09:14:42 +02:00
}
2012-05-17 15:41:54 +02:00
/**
* Create a network module from a network component . And return the id of new module .
*
* @ param string $agent_name The name of the agent where the module will be created
* @ param string $component_name The name of the network component
* @ param $thrash1 Don ' t use
* @ param $thrash2 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_create_network_module_from_component ( $agent_name , $component_name , $thrash1 , $thrash2 ) {
2012-05-17 15:41:54 +02:00
$agent_id = agents_get_agent_id ( $agent_name );
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( ! $agent_id ) {
2012-05-17 15:41:54 +02:00
returnError ( 'error_network_module_from_component' , __ ( 'Error creating module from network component. Agent doesn\'t exists.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-05-17 15:41:54 +02:00
}
$component = db_get_row ( 'tnetwork_component' , 'name' , $component_name );
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( ! $component ) {
2012-05-17 15:41:54 +02:00
returnError ( 'error_network_module_from_component' , __ ( 'Error creating module from network component. Network component doesn\'t exists.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-05-17 15:41:54 +02:00
}
// Adapt fields to module structure
unset ( $component [ 'id_nc' ]);
unset ( $component [ 'id_group' ]);
$component [ 'id_tipo_modulo' ] = $component [ 'type' ];
unset ( $component [ 'type' ]);
$component [ 'descripcion' ] = $component [ 'description' ];
unset ( $component [ 'description' ]);
unset ( $component [ 'name' ]);
$component [ 'ip_target' ] = agents_get_address ( $agent_id );
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
2012-05-17 15:41:54 +02:00
// Create module
$module_id = modules_create_agent_module ( $agent_id , $component_name , $component , true );
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( ! $module_id ) {
2012-05-17 15:41:54 +02:00
returnError ( 'error_network_module_from_component' , __ ( 'Error creating module from network component. Error creating module.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-05-17 15:41:54 +02:00
}
return $module_id ;
}
2012-01-12 16:33:52 +01:00
/**
* Assign a module to an alert template . And return the id of new relationship .
*
* @ param string $id_template Name of alert template to add .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < id_module > ; < id_agent > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = create_module_template & id = 1 & other = 1 | 10 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_create_module_template ( $id , $thrash1 , $other , $thrash3 ) {
2012-01-19 18:45:59 +01:00
if ( $id == " " ) {
2012-01-12 16:33:52 +01:00
returnError ( 'error_module_to_template' , __ ( 'Error assigning module to template. Id_template cannot be left blank.' ));
return ;
}
if ( $other [ 'data' ][ 0 ] == " " ){
returnError ( 'error_module_to_template' , __ ( 'Error assigning module to template. Id_module cannot be left blank.' ));
return ;
}
2013-02-25 14:21:24 +01:00
if ( $other [ 'data' ][ 1 ] == " " ) {
2012-01-12 16:33:52 +01:00
returnError ( 'error_module_to_template' , __ ( 'Error assigning module to template. Id_agent cannot be left blank.' ));
return ;
}
2012-01-19 18:45:59 +01:00
$result_template = alerts_get_alert_template ( $id );
2013-02-25 14:21:24 +01:00
2012-01-12 16:33:52 +01:00
if ( ! $result_template ){
returnError ( 'error_module_to_template' , __ ( 'Error assigning module to template. Id_template doensn\'t exists.' ));
return ;
2013-02-25 14:21:24 +01:00
}
2012-01-12 16:33:52 +01:00
$id_module = $other [ 'data' ][ 0 ];
$id_agent = $other [ 'data' ][ 1 ];
$result_agent = agents_get_name ( $id_agent );
2013-02-25 14:21:24 +01:00
if ( ! $result_agent ) {
2012-01-12 16:33:52 +01:00
returnError ( 'error_module_to_template' , __ ( 'Error assigning module to template. Id_agent doesn\'t exists.' ));
2013-02-25 14:21:24 +01:00
return ;
2012-01-12 16:33:52 +01:00
}
2013-02-25 14:21:24 +01:00
2012-01-12 16:33:52 +01:00
$result_module = db_get_value ( 'nombre' , 'tagente_modulo' , 'id_agente_modulo' , ( int ) $id_module );
2013-02-25 14:21:24 +01:00
if ( ! $result_module ) {
2012-01-12 16:33:52 +01:00
returnError ( 'error_module_to_template' , __ ( 'Error assigning module to template. Id_module doesn\'t exists.' ));
2013-02-25 14:21:24 +01:00
return ;
2012-01-12 16:33:52 +01:00
}
2012-01-19 18:45:59 +01:00
$id_template_module = alerts_create_alert_agent_module ( $id_module , $id );
2012-01-12 16:33:52 +01:00
if ( is_error ( $id_template_module )) {
// TODO: Improve the error returning more info
returnError ( 'error_module_to_template' , __ ( 'Error assigning module to template.' ));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $id_template_module ));
}
}
/**
* Delete an module assigned to a template . And return a message with the result of the operation .
*
* @ param string $id Id of the relationship between module and template ( talert_template_modules ) to delete .
* @ param $thrash1 Don ' t use .
* @ param array $other Don ' t use
*
* example :
*
* api . php ? op = set & op2 = delete_module_template & id = 38
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_delete_module_template ( $id , $thrash1 , $other , $thrash3 ) {
2013-02-25 14:21:24 +01:00
2012-01-12 16:33:52 +01:00
if ( $id == " " ) {
returnError ( 'error_delete_module_template' , __ ( 'Error deleting module template. Id_module_template cannot be left blank.' ));
return ;
}
2013-02-25 14:21:24 +01:00
2012-01-12 16:33:52 +01:00
$result_module_template = alerts_get_alert_agent_module ( $id );
2013-02-25 14:21:24 +01:00
if ( ! $result_module_template ) {
2012-01-12 16:33:52 +01:00
returnError ( 'error_delete_module_template' , __ ( 'Error deleting module template. Id_module_template doesn\'t exists.' ));
2013-02-25 14:21:24 +01:00
return ;
2012-01-12 16:33:52 +01:00
}
$result = alerts_delete_alert_agent_module ( $id );
2013-02-25 14:21:24 +01:00
2012-01-12 16:33:52 +01:00
if ( $result == 0 ) {
// TODO: Improve the error returning more info
returnError ( 'error_delete_module_template' , __ ( 'Error deleting module template.' ));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Correct deleting of module template.' )));
}
}
2012-01-19 18:45:59 +01:00
/**
* Validate all alerts . And return a message with the result of the operation .
*
* @ param string Don ' t use .
* @ param $thrash1 Don ' t use .
* @ param array $other Don ' t use
*
* example :
*
* api . php ? op = set & op2 = validate_all_alerts
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_validate_all_alerts ( $id , $thrash1 , $other , $thrash3 ) {
2013-02-25 14:21:24 +01:00
2012-01-19 18:45:59 +01:00
// Return all groups
$allGroups = db_get_all_rows_filter ( 'tgrupo' , array (), 'id_grupo' );
$groups = array ();
foreach ( $allGroups as $row ) {
$groups [] = $row [ 'id_grupo' ];
}
// Added group All
$groups [] = 0 ;
$id_groups = implode ( ',' , $groups );
2013-02-25 14:21:24 +01:00
2012-01-19 18:45:59 +01:00
$sql = sprintf ( " SELECT id_agente
FROM tagente
WHERE id_grupo IN ( % s ) AND disabled = 0 " ,
$id_groups );
2013-02-25 14:21:24 +01:00
2012-01-19 18:45:59 +01:00
$id_agents = array ();
$result_agents = array ();
2013-02-25 14:21:24 +01:00
2012-01-19 18:45:59 +01:00
$id_agents = db_get_all_rows_sql ( $sql );
foreach ( $id_agents as $id_agent ){
$result_agents [] = $id_agent [ 'id_agente' ];
}
2013-02-25 14:21:24 +01:00
2012-01-19 18:45:59 +01:00
$agents_string = implode ( ',' , $result_agents );
$sql = sprintf ( " SELECT talert_template_modules.id
2013-02-25 14:21:24 +01:00
FROM talert_template_modules
INNER JOIN tagente_modulo t2
ON talert_template_modules . id_agent_module = t2 . id_agente_modulo
INNER JOIN tagente t3
ON t2 . id_agente = t3 . id_agente
INNER JOIN talert_templates t4
ON talert_template_modules . id_alert_template = t4 . id
WHERE id_agent_module in ( % s ) " , $agents_string );
2012-01-19 18:45:59 +01:00
$alerts = db_get_all_rows_sql ( $sql );
$total_alerts = count ( $alerts );
$count_results = 0 ;
2013-01-29 19:03:08 +01:00
foreach ( $alerts as $alert ) {
2012-01-19 18:45:59 +01:00
$result = alerts_validate_alert_agent_module ( $alert [ 'id' ], true );
2013-01-29 19:03:08 +01:00
if ( $result ) {
2012-01-19 18:45:59 +01:00
$count_results ++ ;
}
}
2013-01-29 19:03:08 +01:00
2012-01-19 18:45:59 +01:00
if ( $total_alerts > $count_results ){
$errors = $total_alerts - $count_results ;
returnError ( 'error_validate_all_alerts' , __ ( 'Error validate all alerts. Failed ' . $errors . '.' ));
}
2013-02-25 14:21:24 +01:00
else {
2012-01-19 18:45:59 +01:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Correct validating of all alerts.' )));
}
}
/**
* Validate all policy alerts . And return a message with the result of the operation .
*
* @ param string Don ' t use .
* @ param $thrash1 Don ' t use .
* @ param array $other Don ' t use
*
* example :
*
* api . php ? op = set & op2 = validate_all_policy_alerts
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_validate_all_policy_alerts ( $id , $thrash1 , $other , $thrash3 ) {
2013-02-25 14:21:24 +01:00
2012-01-19 18:45:59 +01:00
# Get all policies
$policies = enterprise_hook ( 'policies_get_policies' , array ( false , false , false , true ));
2013-02-25 14:21:24 +01:00
2012-01-19 18:45:59 +01:00
if ( $duplicated === ENTERPRISE_NOT_HOOK ) {
returnError ( 'error_validate_all_policy_alerts' , __ ( 'Error validating all alert policies.' ));
2013-02-25 14:21:24 +01:00
return ;
}
2012-01-19 18:45:59 +01:00
// Count of valid results
$total_alerts = 0 ;
$count_results = 0 ;
// Check all policies
2013-02-25 14:21:24 +01:00
foreach ( $policies as $policy ) {
2012-01-19 18:45:59 +01:00
$policy_alerts = array ();
2012-07-03 12:11:20 +02:00
$policy_alerts = enterprise_hook ( 'policies_get_alerts' , array ( $policy [ 'id' ], false , false ));
2013-02-25 14:21:24 +01:00
2012-01-19 18:45:59 +01:00
// Number of alerts in this policy
if ( $policy_alerts != false ){
$partial_alerts = count ( $policy_alerts );
// Added alerts of this policy to the total
$total_alerts = $total_alerts + $partial_alerts ;
}
$result_pol_alerts = array ();
foreach ( $policy_alerts as $policy_alert ){
$result_pol_alerts [] = $policy_alert [ 'id' ];
}
2012-12-17 17:50:38 +01:00
2012-01-19 18:45:59 +01:00
$id_pol_alerts = implode ( ',' , $result_pol_alerts );
2012-12-17 17:50:38 +01:00
2012-01-19 18:45:59 +01:00
// If the policy has alerts
2013-02-25 14:21:24 +01:00
if ( count ( $result_pol_alerts ) != 0 ) {
$sql = sprintf ( " SELECT id
2012-01-19 18:45:59 +01:00
FROM talert_template_modules
WHERE id_policy_alerts IN ( % s ) " ,
$id_pol_alerts );
2012-12-17 17:50:38 +01:00
$id_alerts = db_get_all_rows_sql ( $sql );
2012-01-19 18:45:59 +01:00
$result_alerts = array ();
2013-02-25 14:21:24 +01:00
foreach ( $id_alerts as $id_alert ) {
2012-01-19 18:45:59 +01:00
$result_alerts [] = $id_alert [ 'id' ];
2012-12-17 17:50:38 +01:00
}
2012-01-19 18:45:59 +01:00
// Validate alerts of these modules
2013-01-29 19:03:08 +01:00
foreach ( $result_alerts as $result_alert ) {
2012-01-19 18:45:59 +01:00
$result = alerts_validate_alert_agent_module ( $result_alert , true );
2012-12-17 17:50:38 +01:00
if ( $result ) {
2012-01-19 18:45:59 +01:00
$count_results ++ ;
}
2012-12-17 17:50:38 +01:00
}
2012-01-19 18:45:59 +01:00
}
}
// Check results
2013-02-25 14:21:24 +01:00
if ( $total_alerts > $count_results ) {
$errors = $total_alerts - $count_results ;
2012-01-19 18:45:59 +01:00
returnError ( 'error_validate_all_alerts' , __ ( 'Error validate all policy alerts. Failed ' . $errors . '.' ));
2012-12-17 17:50:38 +01:00
}
2012-01-19 18:45:59 +01:00
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Correct validating of all policy alerts.' )));
}
}
2012-01-17 13:08:53 +01:00
/**
* Stop a schedule downtime . And return a message with the result of the operation .
*
* @ param string $id Id of the downtime to stop .
* @ param $thrash1 Don ' t use .
* @ param array $other Don ' t use
*
* example :
*
* api . php ? op = set & op2 = stop_downtime & id = 38
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_stop_downtime ( $id , $thrash1 , $other , $thrash3 ) {
2013-01-29 19:03:08 +01:00
if ( $id == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_stop_downtime' , __ ( 'Error stopping downtime. Id_downtime cannot be left blank.' ));
return ;
}
$date_stop = date ( " Y-m-j " , get_system_time ());
$time_stop = date ( " h:iA " , get_system_time ());
$date_time_stop = strtotime ( $date_stop . ' ' . $time_stop );
2013-01-29 19:03:08 +01:00
2012-01-17 13:08:53 +01:00
$values = array ();
$values [ 'date_to' ] = $date_time_stop ;
$result_update = db_process_sql_update ( 'tplanned_downtime' , $values , array ( 'id' => $id ));
if ( $result_update < 0 )
returnError ( 'error_stop_downtime' , 'Error stopping downtime.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Downtime stopped.' )));
}
/**
* Add agent to a policy . And return a message with the result of the operation .
*
* @ param string $id Id of the target policy .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < id_agent > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example :
*
* api . php ? op = set & op2 = add_agent_policy & id = 1 & other = 167 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_add_agent_policy ( $id , $thrash1 , $other , $thrash3 ) {
2012-10-26 19:37:57 +02:00
if ( $id == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_agent_policy' , __ ( 'Error adding agent to policy. Id_policy cannot be left blank.' ));
2012-10-26 19:37:57 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2012-10-26 19:37:57 +02:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_agent_policy' , __ ( 'Error adding agent to policy. Id_agent cannot be left blank.' ));
2012-10-26 19:37:57 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
// Check if the agent exists
$result_agent = db_get_value ( 'id_agente' , 'tagente' , 'id_agente' , ( int ) $other [ 'data' ][ 0 ]);
2012-10-26 19:37:57 +02:00
if ( ! $result_agent ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_agent_policy' , __ ( 'Error adding agent to policy. Id_agent doesn\'t exists.' ));
2012-10-26 19:37:57 +02:00
return ;
}
2012-01-17 13:08:53 +01:00
// Check if the agent is already in the policy
2012-07-03 12:11:20 +02:00
$id_agent_policy = enterprise_hook ( 'policies_get_agents' , array ( $id , array ( 'id_agent' => $other [ 'data' ][ 0 ]), 'id' ));
2012-10-26 19:37:57 +02:00
2012-01-17 13:08:53 +01:00
if ( $id_agent_policy === ENTERPRISE_NOT_HOOK ) {
returnError ( 'error_add_agent_policy' , __ ( 'Error adding agent to policy.' ));
2012-10-26 19:37:57 +02:00
return ;
}
2012-01-17 13:08:53 +01:00
2012-10-26 19:37:57 +02:00
if ( $id_agent_policy === false ) {
2012-01-17 13:08:53 +01:00
$success = enterprise_hook ( 'policies_create_agent' , array ( $other [ 'data' ][ 0 ], $id , true ));
2012-10-26 19:37:57 +02:00
}
2012-01-17 13:08:53 +01:00
else {
returnError ( 'error_add_agent_policy' , __ ( 'Error adding agent to policy. The agent is already in the policy.' ));
2012-10-26 19:37:57 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2012-10-26 19:37:57 +02:00
2012-01-17 13:08:53 +01:00
if ( $success )
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $success ));
else
returnError ( 'error_add_agent_policy' , 'Error adding agent to policy.' );
}
/**
* Add data module to policy . And return id from new module .
*
* @ param string $id Id of the target policy .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < module_name > ; < id_module_type > ; < description > ;
* < id_module_group > ; < min > ; < max > ; < post_process > ; < module_interval > ; < min_warning > ; < max_warning > ; < str_warning > ;
* < min_critical > ; < max_critical > ; < str_critical > ; < history_data > ; < configuration_data > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example :
*
* api . php ? op = set & op2 = add_data_module_policy & id = 1 & other = data_module_policy_example_name ~ 2 ~ data % 20 module % 20 created % 20 by % 20 Api ~ 2 ~ 0 ~ 0 ~ 50.00 ~ 10 ~ 20 ~ 180 ~~ 21 ~ 35 ~~ 1 ~ module_begin % 0 dmodule_name % 20 pandora_process % 0 dmodule_type % 20 generic_data % 0 dmodule_exec % 20 ps % 20 aux % 20 |% 20 grep % 20 pandora % 20 |% 20 wc % 20 - l % 0 dmodule_end & other_mode = url_encode_separator_ ~
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_add_data_module_policy ( $id , $thrash1 , $other , $thrash3 ) {
2013-02-25 14:21:24 +01:00
if ( $id == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_data_module_policy' , __ ( 'Error adding data module to policy. Id_policy cannot be left blank.' ));
2013-02-25 14:21:24 +01:00
return ;
2012-01-17 13:08:53 +01:00
}
2013-02-25 14:21:24 +01:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_data_module_policy' , __ ( 'Error adding data module to policy. Module_name cannot be left blank.' ));
2013-02-25 14:21:24 +01:00
return ;
2012-01-17 13:08:53 +01:00
}
// Check if the module is already in the policy
2012-07-03 12:11:20 +02:00
$name_module_policy = enterprise_hook ( 'policies_get_modules' , array ( $id , array ( 'name' => $other [ 'data' ][ 0 ]), 'name' ));
2013-02-25 14:21:24 +01:00
2012-01-17 13:08:53 +01:00
if ( $name_module_policy === ENTERPRISE_NOT_HOOK ) {
returnError ( 'error_add_data_module_policy' , __ ( 'Error adding data module to policy.' ));
2013-02-25 14:21:24 +01:00
return ;
}
2012-01-17 13:08:53 +01:00
$values = array ();
$values [ 'id_tipo_modulo' ] = $other [ 'data' ][ 1 ];
$values [ 'description' ] = $other [ 'data' ][ 2 ];
$values [ 'id_module_group' ] = $other [ 'data' ][ 3 ];
$values [ 'min' ] = $other [ 'data' ][ 4 ];
$values [ 'max' ] = $other [ 'data' ][ 5 ];
$values [ 'post_process' ] = $other [ 'data' ][ 6 ];
$values [ 'module_interval' ] = $other [ 'data' ][ 7 ];
$values [ 'min_warning' ] = $other [ 'data' ][ 8 ];
$values [ 'max_warning' ] = $other [ 'data' ][ 9 ];
$values [ 'str_warning' ] = $other [ 'data' ][ 10 ];
$values [ 'min_critical' ] = $other [ 'data' ][ 11 ];
$values [ 'max_critical' ] = $other [ 'data' ][ 12 ];
$values [ 'str_critical' ] = $other [ 'data' ][ 13 ];
$values [ 'history_data' ] = $other [ 'data' ][ 14 ];
$values [ 'configuration_data' ] = $other [ 'data' ][ 15 ];
2013-02-25 14:21:24 +01:00
if ( $name_module_policy !== false ) {
if ( $name_module_policy [ 0 ][ 'name' ] == $other [ 'data' ][ 0 ]) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_data_module_policy' , __ ( 'Error adding data module to policy. The module is already in the policy.' ));
2013-02-25 14:21:24 +01:00
return ;
2012-01-17 13:08:53 +01:00
}
}
2013-02-25 14:21:24 +01:00
2012-07-03 12:11:20 +02:00
$success = enterprise_hook ( 'policies_create_module' , array ( $other [ 'data' ][ 0 ], $id , 1 , $values , false ));
2012-01-17 13:08:53 +01:00
if ( $success )
//returnData('string', array('type' => 'string', 'data' => __('Data module added to policy. Is necessary to apply the policy in order to changes take effect.')));
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $success ));
else
returnError ( 'error_add_data_module_policy' , 'Error adding data module to policy.' );
2013-02-25 14:21:24 +01:00
2012-01-17 13:08:53 +01:00
}
/**
2012-01-19 18:45:59 +01:00
* Update data module in policy . And return id from new module .
*
* @ param string $id Id of the target policy module .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < id_policy_module > ; < description > ;
* < id_module_group > ; < min > ; < max > ; < post_process > ; < module_interval > ; < min_warning > ; < max_warning > ; < str_warning > ;
* < min_critical > ; < max_critical > ; < str_critical > ; < history_data > ; < configuration_data > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example :
*
* api . php ? op = set & op2 = update_data_module_policy & id = 1 & other = 10 ~ data % 20 module % 20 updated % 20 by % 20 Api ~ 2 ~ 0 ~ 0 ~ 50.00 ~ 10 ~ 20 ~ 180 ~~ 21 ~ 35 ~~ 1 ~ module_begin % 0 dmodule_name % 20 pandora_process % 0 dmodule_type % 20 generic_data % 0 dmodule_exec % 20 ps % 20 aux % 20 |% 20 grep % 20 pandora % 20 |% 20 wc % 20 - l % 0 dmodule_end & other_mode = url_encode_separator_ ~
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_update_data_module_policy ( $id , $thrash1 , $other , $thrash3 ) {
2013-02-25 14:21:24 +01:00
if ( $id == " " ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_update_data_module_policy' , __ ( 'Error updating data module in policy. Id_policy cannot be left blank.' ));
2013-02-25 14:21:24 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-25 14:21:24 +01:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_update_data_module_policy' , __ ( 'Error updating data module in policy. Id_policy_module cannot be left blank.' ));
2013-02-25 14:21:24 +01:00
return ;
}
2012-01-19 18:45:59 +01:00
// Check if the module exists
2012-07-03 12:11:20 +02:00
$module_policy = enterprise_hook ( 'policies_get_modules' , array ( $id , array ( 'id' => $other [ 'data' ][ 0 ]), 'id_module' ));
2013-02-25 14:21:24 +01:00
2012-01-19 18:45:59 +01:00
if ( $module_policy === false ) {
returnError ( 'error_update_data_module_policy' , __ ( 'Error updating data module in policy. Module doesn\'t exists.' ));
2013-02-25 14:21:24 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-25 14:21:24 +01:00
if ( $module_policy [ 0 ][ 'id_module' ] != 1 ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_update_network_module_policy' , __ ( 'Error updating network module in policy. Module type is not network type.' ));
2013-02-25 14:21:24 +01:00
return ;
}
2012-01-19 18:45:59 +01:00
$fields_data_module = array ( 'id' , 'description' , 'id_module_group' , 'min' , 'max' , 'post_process' , 'module_interval' ,
'min_warning' , 'max_warning' , 'str_warning' , 'min_critical' , 'max_critical' , 'str_critical' ,
'history_data' , 'configuration_data' );
$cont = 0 ;
foreach ( $fields_data_module as $field ){
if ( $other [ 'data' ][ $cont ] != " " and $field != 'id' ){
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
$result_update = enterprise_hook ( 'policies_update_module' , array ( $other [ 'data' ][ 0 ], $values , false ));
if ( $result_update < 0 )
returnError ( 'error_update_data_module_policy' , 'Error updating policy module.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Data policy module updated.' )));
}
/**
* Add network module to policy . And return a result message .
2012-01-17 13:08:53 +01:00
*
* @ param string $id Id of the target policy .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < module_name > ; < id_module_type > ; < description > ;
* < id_module_group > ; < min > ; < max > ; < post_process > ; < module_interval > ; < min_warning > ; < max_warning > ; < str_warning > ;
* < min_critical > ; < max_critical > ; < str_critical > ; < history_data > ; < time_threshold > ; < disabled > ; < module_port > ;
* < snmp_community > ; < snmp_oid > ; < custom_id > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example :
*
* api . php ? op = set & op2 = add_network_module_policy & id = 1 & other = network_module_policy_example_name | 6 | network % 20 module % 20 created % 20 by % 20 Api | 2 | 0 | 0 | 50.00 | 180 | 10 | 20 || 21 | 35 || 1 | 15 | 0 | 66 ||| 0 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_add_network_module_policy ( $id , $thrash1 , $other , $thrash3 ) {
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $id == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_network_data_module_policy' , __ ( 'Error adding network module to policy. Id_policy cannot be left blank.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_network_data_module_policy' , __ ( 'Error adding network module to policy. Module_name cannot be left blank.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 1 ] < 6 or $other [ 'data' ][ 1 ] > 18 ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_network_data_module_policy' , __ ( 'Error adding network module to policy. Id_module_type is not correct for network modules.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
}
2012-01-17 13:08:53 +01:00
// Check if the module is already in the policy
2012-07-03 12:11:20 +02:00
$name_module_policy = enterprise_hook ( 'policies_get_modules' , array ( $id , array ( 'name' => $other [ 'data' ][ 0 ]), 'name' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
2012-01-17 13:08:53 +01:00
if ( $name_module_policy === ENTERPRISE_NOT_HOOK ) {
returnError ( 'error_network_data_module_policy' , __ ( 'Error adding network module to policy.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
}
2012-01-17 13:08:53 +01:00
$values = array ();
$values [ 'id_tipo_modulo' ] = $other [ 'data' ][ 1 ];
$values [ 'description' ] = $other [ 'data' ][ 2 ];
$values [ 'id_module_group' ] = $other [ 'data' ][ 3 ];
$values [ 'min' ] = $other [ 'data' ][ 4 ];
$values [ 'max' ] = $other [ 'data' ][ 5 ];
$values [ 'post_process' ] = $other [ 'data' ][ 6 ];
$values [ 'module_interval' ] = $other [ 'data' ][ 7 ];
$values [ 'min_warning' ] = $other [ 'data' ][ 8 ];
$values [ 'max_warning' ] = $other [ 'data' ][ 9 ];
$values [ 'str_warning' ] = $other [ 'data' ][ 10 ];
$values [ 'min_critical' ] = $other [ 'data' ][ 11 ];
$values [ 'max_critical' ] = $other [ 'data' ][ 12 ];
$values [ 'str_critical' ] = $other [ 'data' ][ 13 ];
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
$values [ 'history_data' ] = $other [ 'data' ][ 14 ];
$values [ 'min_ff_event' ] = $other [ 'data' ][ 15 ];
$values [ 'disabled' ] = $other [ 'data' ][ 16 ];
$values [ 'tcp_port' ] = $other [ 'data' ][ 17 ];
$values [ 'snmp_community' ] = $other [ 'data' ][ 18 ];
$values [ 'snmp_oid' ] = $other [ 'data' ][ 19 ];
$values [ 'custom_id' ] = $other [ 'data' ][ 20 ];
if ( $name_module_policy !== false ) {
2012-01-17 13:08:53 +01:00
if ( $name_module_policy [ 0 ][ 'name' ] == $other [ 'data' ][ 0 ]){
returnError ( 'error_network_data_module_policy' , __ ( 'Error adding network module to policy. The module is already in the policy.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
2012-07-03 12:11:20 +02:00
$success = enterprise_hook ( 'policies_create_module' , array ( $other [ 'data' ][ 0 ], $id , 2 , $values , false ));
2012-01-17 13:08:53 +01:00
if ( $success )
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $success ));
else
returnError ( 'error_add_network_module_policy' , 'Error adding network module to policy.' );
2012-01-19 18:45:59 +01:00
}
/**
* Update network module in policy . And return a result message .
*
* @ param string $id Id of the target policy module .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < id_policy_module > ; < description > ;
* < id_module_group > ; < min > ; < max > ; < post_process > ; < module_interval > ; < min_warning > ; < max_warning > ; < str_warning > ;
* < min_critical > ; < max_critical > ; < str_critical > ; < history_data > ; < time_threshold > ; < disabled > ; < module_port > ;
* < snmp_community > ; < snmp_oid > ; < custom_id > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example :
*
* api . php ? op = set & op2 = update_network_module_policy & id = 1 & other = 14 | network % 20 module % 20 updated % 20 by % 20 Api | 2 | 0 | 0 | 150.00 | 300 | 10 | 20 || 21 | 35 || 1 | 15 | 0 | 66 ||| 0 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_update_network_module_policy ( $id , $thrash1 , $other , $thrash3 ) {
2013-02-27 10:51:48 +01:00
if ( $id == " " ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_update_network_module_policy' , __ ( 'Error updating network module in policy. Id_policy cannot be left blank.' ));
2013-02-27 10:51:48 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-27 11:22:51 +01:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_update_network_module_policy' , __ ( 'Error updating network module in policy. Id_policy_module cannot be left blank.' ));
2013-02-27 11:22:51 +01:00
return ;
}
2012-01-19 18:45:59 +01:00
// Check if the module exists
2012-07-03 12:11:20 +02:00
$module_policy = enterprise_hook ( 'policies_get_modules' , array ( $id , array ( 'id' => $other [ 'data' ][ 0 ]), 'id_module' ));
2013-02-27 11:22:51 +01:00
2012-01-19 18:45:59 +01:00
if ( $module_policy === false ) {
returnError ( 'error_update_network_module_policy' , __ ( 'Error updating network module in policy. Module doesn\'t exists.' ));
2013-02-27 11:22:51 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-27 11:22:51 +01:00
if ( $module_policy [ 0 ][ 'id_module' ] != 2 ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_update_network_module_policy' , __ ( 'Error updating network module in policy. Module type is not network type.' ));
2013-02-27 11:22:51 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-27 11:22:51 +01:00
$fields_network_module = array ( 'id' , 'description' ,
'id_module_group' , 'min' , 'max' , 'post_process' ,
'module_interval' , 'min_warning' , 'max_warning' , 'str_warning' ,
'min_critical' , 'max_critical' , 'str_critical' , 'history_data' ,
'min_ff_event' , 'disabled' , 'tcp_port' , 'snmp_community' ,
'snmp_oid' , 'custom_id' );
2012-01-19 18:45:59 +01:00
$cont = 0 ;
2013-02-27 11:22:51 +01:00
foreach ( $fields_network_module as $field ) {
if ( $other [ 'data' ][ $cont ] != " " and $field != 'id' ) {
2012-01-19 18:45:59 +01:00
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
2013-02-27 11:22:51 +01:00
2012-01-19 18:45:59 +01:00
$result_update = enterprise_hook ( 'policies_update_module' , array ( $other [ 'data' ][ 0 ], $values , false ));
if ( $result_update < 0 )
returnError ( 'error_update_network_module_policy' , 'Error updating policy module.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Network policy module updated.' )));
2012-01-17 13:08:53 +01:00
}
/**
* Add plugin module to policy . And return id from new module .
*
* @ param string $id Id of the target policy .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < name_module > ; < disabled > ; < id_module_type > ;
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < module_port > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
* < min > ; < max > ; < custom_id > ; < description > ; < id_plugin > ; < plugin_user > ; < plugin_pass > ; < plugin_parameter > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = add_plugin_module_policy & id = 1 & other = example % 20 plugin % 20 module % 20 name | 0 | 1 | 2 | 0 | 0 || 0 | 0 || 15 | 0 | 66 ||| 300 | 50.00 | 0 | 0 | 0 | plugin % 20 module % 20 from % 20 api | 2 | admin | pass |- p % 20 max & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_add_plugin_module_policy ( $id , $thrash1 , $other , $thrash3 ) {
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $id == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_plugin_module_policy' , __ ( 'Error adding plugin module to policy. Id_policy cannot be left blank.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_plugin_module_policy' , __ ( 'Error adding plugin module to policy. Module_name cannot be left blank.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 22 ] == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_plugin_module_policy' , __ ( 'Error adding plugin module to policy. Id_plugin cannot be left blank.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
// Check if the module is already in the policy
2012-07-03 12:11:20 +02:00
$name_module_policy = enterprise_hook ( 'policies_get_modules' , array ( $id , array ( 'name' => $other [ 'data' ][ 0 ]), 'name' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
2012-01-17 13:08:53 +01:00
if ( $name_module_policy === ENTERPRISE_NOT_HOOK ) {
returnError ( 'error_add_plugin_module_policy' , __ ( 'Error adding plugin module to policy.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
}
2012-01-17 13:08:53 +01:00
$values = array ();
$values [ 'disabled' ] = $other [ 'data' ][ 1 ];
$values [ 'id_tipo_modulo' ] = $other [ 'data' ][ 2 ];
$values [ 'id_module_group' ] = $other [ 'data' ][ 3 ];
$values [ 'min_warning' ] = $other [ 'data' ][ 4 ];
$values [ 'max_warning' ] = $other [ 'data' ][ 5 ];
$values [ 'str_warning' ] = $other [ 'data' ][ 6 ];
$values [ 'min_critical' ] = $other [ 'data' ][ 7 ];
$values [ 'max_critical' ] = $other [ 'data' ][ 8 ];
$values [ 'str_critical' ] = $other [ 'data' ][ 9 ];
$values [ 'min_ff_event' ] = $other [ 'data' ][ 10 ];
$values [ 'history_data' ] = $other [ 'data' ][ 11 ];
$values [ 'tcp_port' ] = $other [ 'data' ][ 12 ];
$values [ 'snmp_community' ] = $other [ 'data' ][ 13 ];
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
$values [ 'snmp_oid' ] = $other [ 'data' ][ 14 ];
$values [ 'module_interval' ] = $other [ 'data' ][ 15 ];
$values [ 'post_process' ] = $other [ 'data' ][ 16 ];
$values [ 'min' ] = $other [ 'data' ][ 17 ];
$values [ 'max' ] = $other [ 'data' ][ 18 ];
$values [ 'custom_id' ] = $other [ 'data' ][ 19 ];
$values [ 'description' ] = $other [ 'data' ][ 20 ];
$values [ 'id_plugin' ] = $other [ 'data' ][ 21 ];
$values [ 'plugin_user' ] = $other [ 'data' ][ 22 ];
$values [ 'plugin_pass' ] = $other [ 'data' ][ 23 ];
$values [ 'plugin_parameter' ] = $other [ 'data' ][ 24 ];
if ( $name_module_policy !== false ) {
if ( $name_module_policy [ 0 ][ 'name' ] == $other [ 'data' ][ 0 ]) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_plugin_module_policy' , __ ( 'Error adding plugin module to policy. The module is already in the policy.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
$success = enterprise_hook ( 'policies_create_module' , array ( $other [ 'data' ][ 0 ], $id , 4 , $values , false ));
2012-01-17 13:08:53 +01:00
if ( $success )
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $success ));
else
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
returnError ( 'error_add_plugin_module_policy' , 'Error adding plugin module to policy.' );
2012-01-17 13:08:53 +01:00
}
2012-01-19 18:45:59 +01:00
/**
* Update plugin module in policy . And return a result message .
*
* @ param string $id Id of the target policy module .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < id_policy_module > ; < disabled > ;
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < module_port > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
* < min > ; < max > ; < custom_id > ; < description > ; < id_plugin > ; < plugin_user > ; < plugin_pass > ; < plugin_parameter > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example :
*
* api . php ? op = set & op2 = update_plugin_module_policy & id = 1 & other = 23 | 0 | 1 | 0 | 0 || 0 | 0 || 15 | 0 | 166 ||| 180 | 150.00 | 0 | 0 | 0 | plugin % 20 module % 20 updated % 20 from % 20 api | 2 | example_user | pass |- p % 20 min & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_update_plugin_module_policy ( $id , $thrash1 , $other , $thrash3 ) {
2013-02-28 10:46:39 +01:00
if ( $id == " " ) {
returnError ( 'error_update_plugin_module_policy' ,
__ ( 'Error updating plugin module in policy. Id_policy cannot be left blank.' ));
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-28 10:46:39 +01:00
if ( $other [ 'data' ][ 0 ] == " " ) {
returnError ( 'error_update_plugin_module_policy' ,
__ ( 'Error updating plugin module in policy. Id_policy_module cannot be left blank.' ));
return ;
}
2012-01-19 18:45:59 +01:00
// Check if the module exists
2012-07-03 12:11:20 +02:00
$module_policy = enterprise_hook ( 'policies_get_modules' , array ( $id , array ( 'id' => $other [ 'data' ][ 0 ]), 'id_module' ));
2013-02-28 10:46:39 +01:00
2012-01-19 18:45:59 +01:00
if ( $module_policy === false ) {
2013-02-28 10:46:39 +01:00
returnError ( 'error_updating_plugin_module_policy' ,
__ ( 'Error updating plugin module in policy. Module doesn\'t exists.' ));
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-28 10:46:39 +01:00
if ( $module_policy [ 0 ][ 'id_module' ] != 4 ) {
returnError ( 'error_updating_plugin_module_policy' ,
__ ( 'Error updating plugin module in policy. Module type is not network type.' ));
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-28 10:46:39 +01:00
$fields_plugin_module = array ( 'id' , 'disabled' , 'id_module_group' ,
'min_warning' , 'max_warning' , 'str_warning' , 'min_critical' ,
'max_critical' , 'str_critical' , 'min_ff_event' , 'history_data' ,
'tcp_port' , 'snmp_community' , 'snmp_oid' , 'module_interval' ,
'post_process' , 'min' , 'max' , 'custom_id' , 'description' ,
'id_plugin' , 'plugin_user' , 'plugin_pass' , 'plugin_parameter' );
2012-01-19 18:45:59 +01:00
$cont = 0 ;
2013-02-28 10:46:39 +01:00
foreach ( $fields_plugin_module as $field ) {
if ( $other [ 'data' ][ $cont ] != " " and $field != 'id' ) {
2012-01-19 18:45:59 +01:00
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
2013-02-28 10:46:39 +01:00
$result_update = enterprise_hook ( 'policies_update_module' ,
array ( $other [ 'data' ][ 0 ], $values , false ));
2012-01-19 18:45:59 +01:00
if ( $result_update < 0 )
returnError ( 'error_update_plugin_module_policy' , 'Error updating policy module.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Plugin policy module updated.' )));
}
2012-07-31 12:24:01 +02:00
/**
* Add module data configuration into agent configuration file
*
* @ param string $id_agent Id of the agent
* @ param string $module_name
* @ param array $configuration_data is an array . The data in it is the new configuration data of the module
* @ param $thrash3 Don ' t use
*
* Call example :
*
* api . php ? op = set & op2 = add_module_in_conf & user = admin & pass = pandora & id = 9043 & id2 = example_name & other = bW9kdWxlX2JlZ2luCm1vZHVsZV9uYW1lIGV4YW1wbGVfbmFtZQptb2R1bGVfdHlwZSBnZW5lcmljX2RhdGEKbW9kdWxlX2V4ZWMgZWNobyAxOwptb2R1bGVfZW5k
*
2012-08-02 13:38:31 +02:00
* @ return string 0 when success , - 1 when error , - 2 if already exist
2012-07-31 12:24:01 +02:00
*/
function api_set_add_module_in_conf ( $id_agent , $module_name , $configuration_data , $thrash3 ) {
$new_configuration_data = base64_decode ( $configuration_data [ 'data' ]);
// Check if exist a current module with the same name in the conf file
$old_configuration_data = config_agents_get_module_from_conf ( $id_agent , io_safe_output ( $module_name ));
// If exists a module with same name, abort
if ( ! empty ( $old_configuration_data )) {
2012-08-02 13:38:31 +02:00
returnError ( 'error_adding_module_conf' , '-2' );
2012-07-31 12:24:01 +02:00
exit ;
}
2012-07-31 17:58:35 +02:00
$result = enterprise_hook ( 'config_agents_add_module_in_conf' , array ( $id_agent , $new_configuration_data ));
if ( $result && $result !== ENTERPRISE_NOT_HOOK ) {
2012-08-02 11:19:05 +02:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => '0' ));
2012-07-31 12:24:01 +02:00
}
else {
2012-08-02 11:19:05 +02:00
returnError ( 'error_adding_module_conf' , '-1' );
2012-07-31 12:24:01 +02:00
}
}
2012-07-31 17:58:35 +02:00
/**
* Get module data configuration from agent configuration file
*
* @ param string $id_agent Id of the agent
* @ param string $module_name
* @ param $thrash2 Don ' t use
* @ param $thrash3 Don ' t use
*
* Call example :
*
* api . php ? op = get & op2 = module_from_conf & user = admin & pass = pandora & id = 9043 & id2 = example_name
*
2012-08-02 12:46:43 +02:00
* @ return string Module data when success , empty when error
2012-07-31 17:58:35 +02:00
*/
2013-01-29 19:03:08 +01:00
function api_get_module_from_conf ( $id_agent , $module_name , $thrash2 , $thrash3 ) {
2012-07-31 18:28:15 +02:00
$result = enterprise_hook ( 'config_agents_get_module_from_conf' , array ( $id_agent , io_safe_output ( $module_name )));
2013-01-29 19:03:08 +01:00
if ( $result !== ENTERPRISE_NOT_HOOK ) {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $result ));
2012-07-31 17:58:35 +02:00
}
else {
2012-08-02 12:46:43 +02:00
returnError ( 'error_adding_module_conf' , '' );
2012-07-31 17:58:35 +02:00
}
}
2012-07-31 12:24:01 +02:00
/**
* Delete module data configuration from agent configuration file
*
* @ param string $id_agent Id of the agent
* @ param string $module_name
* @ param $thrash2 Don ' t use
* @ param $thrash3 Don ' t use
*
* Call example :
*
* api . php ? op = set & op2 = delete_module_in_conf & user = admin & pass = pandora & id = 9043 & id2 = example_name
*
2012-08-02 11:19:05 +02:00
* @ return string 0 when success , - 1 when error
2012-07-31 12:24:01 +02:00
*/
function api_set_delete_module_in_conf ( $id_agent , $module_name , $thrash2 , $thrash3 ) {
$result = config_agents_delete_module_in_conf ( $id_agent , $module_name );
2012-07-31 17:58:35 +02:00
$result = enterprise_hook ( 'config_agents_delete_module_in_conf' , array ( $id_agent , $module_name ));
2013-01-29 19:03:08 +01:00
2012-07-31 17:58:35 +02:00
if ( $result && $result !== ENTERPRISE_NOT_HOOK ) {
2012-08-02 11:19:05 +02:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => '0' ));
2012-07-31 12:24:01 +02:00
}
else {
2012-08-02 11:19:05 +02:00
returnError ( 'error_deleting_module_conf' , '-1' );
2012-07-31 12:24:01 +02:00
}
}
/**
* Update module data configuration from agent configuration file
*
* @ param string $id_agent Id of the agent
* @ param string $module_name
* @ param array $configuration_data is an array . The data in it is the new configuration data of the module
* @ param $thrash3 Don ' t use
*
* Call example :
*
* api . php ? op = set & op2 = update_module_in_conf & user = admin & pass = pandora & id = 9043 & id2 = example_name & other = bW9kdWxlX2JlZ2luCm1vZHVsZV9uYW1lIGV4YW1wbGVfbmFtZQptb2R1bGVfdHlwZSBnZW5lcmljX2RhdGEKbW9kdWxlX2V4ZWMgZWNobyAxOwptb2R1bGVfZW5k
*
2012-08-02 13:38:31 +02:00
* @ return string 0 when success , 1 when no changes , - 1 when error , - 2 if doesnt exist
2012-07-31 12:24:01 +02:00
*/
function api_set_update_module_in_conf ( $id_agent , $module_name , $configuration_data_serialized , $thrash3 ) {
$new_configuration_data = base64_decode ( $configuration_data_serialized [ 'data' ]);
// Get current configuration
$old_configuration_data = config_agents_get_module_from_conf ( $id_agent , io_safe_output ( $module_name ));
// If not exists
if ( empty ( $old_configuration_data )) {
2012-08-02 13:38:31 +02:00
returnError ( 'error_editing_module_conf' , '-2' );
2012-07-31 12:24:01 +02:00
exit ;
}
// If current configuration and new configuration are equal, abort
if ( $new_configuration_data == $old_configuration_data ) {
2012-08-02 13:38:31 +02:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => '1' ));
2012-07-31 12:24:01 +02:00
exit ;
}
2012-07-31 17:58:35 +02:00
$result = enterprise_hook ( 'config_agents_update_module_in_conf' , array ( $id_agent , $old_configuration_data , $new_configuration_data ));
if ( $result && $result !== ENTERPRISE_NOT_HOOK ) {
2012-08-02 13:38:31 +02:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => '0' ));
2012-07-31 12:24:01 +02:00
}
else {
2012-08-02 13:38:31 +02:00
returnError ( 'error_editing_module_conf' , '-1' );
2012-07-31 12:24:01 +02:00
}
2012-07-31 12:34:33 +02:00
}
2012-07-31 12:24:01 +02:00
2012-01-17 13:08:53 +01:00
/**
* Add SNMP module to policy . And return id from new module .
*
* @ param string $id Id of the target policy .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < name_module > ; < disabled > ; < id_module_type > ;
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < module_port > ; < snmp_version > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
* < min > ; < max > ; < custom_id > ; < description > ; < snmp3_priv_method > ; < snmp3_priv_pass > ; < snmp3_sec_level > ; < snmp3_auth_method > ;
* < snmp3_auth_user > ; < snmp3_auth_pass > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = add_snmp_module_policy & id = 1 & other = example % 20 SNMP % 20 module % 20 name | 0 | 15 | 2 | 0 | 0 || 0 | 0 || 15 | 1 | 66 | 3 | public |. 1.3 . 6.1 . 2.1 . 1.1 . 0 | 180 | 50.00 | 10 | 60 | 0 | SNMP % 20 module % 20 modified % 20 by % 20 API | AES | example_priv_passw | authNoPriv | MD5 | pepito_user | example_auth_passw & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_add_snmp_module_policy ( $id , $thrash1 , $other , $thrash3 ) {
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $id == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_snmp_module_policy' , __ ( 'Error adding SNMP module to policy. Id_policy cannot be left blank.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_snmp_module_policy' , __ ( 'Error adding SNMP module to policy. Module_name cannot be left blank.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
// Check if the module is already in the policy
2012-07-03 12:11:20 +02:00
$name_module_policy = enterprise_hook ( 'policies_get_modules' , array ( $id , array ( 'name' => $other [ 'data' ][ 0 ]), 'name' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
2012-01-17 13:08:53 +01:00
if ( $name_module_policy === ENTERPRISE_NOT_HOOK ) {
returnError ( 'error_add_snmp_module_policy' , __ ( 'Error adding SNMP module to policy.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 2 ] < 15 or $other [ 'data' ][ 2 ] > 18 ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_snmp_module_policy' , __ ( 'Error adding SNMP module to policy. Id_module_type is not correct for SNMP modules.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
}
2012-01-17 13:08:53 +01:00
# SNMP version 3
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 13 ] == " 3 " ) {
2012-01-17 13:08:53 +01:00
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 22 ] != " AES " and $other [ 'data' ][ 22 ] != " DES " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_snmp_module_policy' , __ ( 'Error in creation SNMP module. snmp3_priv_method doesn\'t exists. Set it to \'AES\' or \'DES\'. ' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 24 ] != " authNoPriv " and $other [ 'data' ][ 24 ] != " authPriv " and $other [ 'data' ][ 24 ] != " noAuthNoPriv " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_snmp_module_policy' , __ ( 'Error in creation SNMP module. snmp3_sec_level doesn\'t exists. Set it to \'authNoPriv\' or \'authPriv\' or \'noAuthNoPriv\'. ' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
}
2012-01-17 13:08:53 +01:00
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
if ( $other [ 'data' ][ 25 ] != " MD5 " and $other [ 'data' ][ 25 ] != " SHA " ) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_snmp_module_policy' , __ ( 'Error in creation SNMP module. snmp3_auth_method doesn\'t exists. Set it to \'MD5\' or \'SHA\'. ' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
}
2012-01-17 13:08:53 +01:00
$values = array (
'disabled' => $other [ 'data' ][ 1 ],
'id_tipo_modulo' => $other [ 'data' ][ 2 ],
'id_module_group' => $other [ 'data' ][ 3 ],
'min_warning' => $other [ 'data' ][ 4 ],
'max_warning' => $other [ 'data' ][ 5 ],
'str_warning' => $other [ 'data' ][ 6 ],
'min_critical' => $other [ 'data' ][ 7 ],
'max_critical' => $other [ 'data' ][ 8 ],
'str_critical' => $other [ 'data' ][ 9 ],
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
'min_ff_event' => $other [ 'data' ][ 10 ],
'history_data' => $other [ 'data' ][ 11 ],
'tcp_port' => $other [ 'data' ][ 12 ],
'tcp_send' => $other [ 'data' ][ 13 ],
'snmp_community' => $other [ 'data' ][ 14 ],
2012-01-17 13:08:53 +01:00
'snmp_oid' => $other [ 'data' ][ 15 ],
'module_interval' => $other [ 'data' ][ 16 ],
'post_process' => $other [ 'data' ][ 17 ],
'min' => $other [ 'data' ][ 18 ],
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
'max' => $other [ 'data' ][ 19 ],
2012-01-17 13:08:53 +01:00
'custom_id' => $other [ 'data' ][ 20 ],
'description' => $other [ 'data' ][ 21 ],
'custom_string_1' => $other [ 'data' ][ 22 ],
'custom_string_2' => $other [ 'data' ][ 23 ],
'custom_string_3' => $other [ 'data' ][ 24 ],
'plugin_parameter' => $other [ 'data' ][ 25 ],
'plugin_user' => $other [ 'data' ][ 26 ],
'plugin_pass' => $other [ 'data' ][ 27 ]
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
);
2012-01-17 13:08:53 +01:00
}
else {
$values = array (
'disabled' => $other [ 'data' ][ 1 ],
'id_tipo_modulo' => $other [ 'data' ][ 2 ],
'id_module_group' => $other [ 'data' ][ 3 ],
'min_warning' => $other [ 'data' ][ 4 ],
'max_warning' => $other [ 'data' ][ 5 ],
'str_warning' => $other [ 'data' ][ 6 ],
'min_critical' => $other [ 'data' ][ 7 ],
'max_critical' => $other [ 'data' ][ 8 ],
'str_critical' => $other [ 'data' ][ 9 ],
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
'min_ff_event' => $other [ 'data' ][ 10 ],
'history_data' => $other [ 'data' ][ 11 ],
'tcp_port' => $other [ 'data' ][ 12 ],
'tcp_send' => $other [ 'data' ][ 13 ],
'snmp_community' => $other [ 'data' ][ 14 ],
2012-01-17 13:08:53 +01:00
'snmp_oid' => $other [ 'data' ][ 15 ],
'module_interval' => $other [ 'data' ][ 16 ],
'post_process' => $other [ 'data' ][ 17 ],
'min' => $other [ 'data' ][ 18 ],
'max' => $other [ 'data' ][ 19 ],
'custom_id' => $other [ 'data' ][ 20 ],
'description' => $other [ 'data' ][ 21 ]
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
);
}
if ( $name_module_policy !== false ) {
if ( $name_module_policy [ 0 ][ 'name' ] == $other [ 'data' ][ 0 ]) {
2012-01-17 13:08:53 +01:00
returnError ( 'error_add_snmp_module_policy' , __ ( 'Error adding SNMP module to policy. The module is already in the policy.' ));
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
return ;
2012-01-17 13:08:53 +01:00
}
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
$success = enterprise_hook ( 'policies_create_module' , array ( $other [ 'data' ][ 0 ], $id , 2 , $values , false ));
2012-01-17 13:08:53 +01:00
if ( $success )
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $success ));
else
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
returnError ( 'error_add_snmp_module_policy' , 'Error adding SNMP module to policy.' );
2012-01-17 13:08:53 +01:00
}
2012-01-10 18:21:46 +01:00
2012-01-19 18:45:59 +01:00
/**
* Update SNMP module in policy . And return a result message .
*
* @ param string $id Id of the target policy module .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < id_policy_module > ; < disabled > ;
* < id_module_group > ; < min_warning > ; < max_warning > ; < str_warning > ; < min_critical > ; < max_critical > ; < str_critical > ; < ff_threshold > ;
* < history_data > ; < module_port > ; < snmp_version > ; < snmp_community > ; < snmp_oid > ; < module_interval > ; < post_process > ;
* < min > ; < max > ; < custom_id > ; < description > ; < snmp3_priv_method > ; < snmp3_priv_pass > ; < snmp3_sec_level > ; < snmp3_auth_method > ;
* < snmp3_auth_user > ; < snmp3_auth_pass > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example :
*
* api . php ? op = set & op2 = update_snmp_module_policy & id = 1 & other = 14 | 0 | 2 | 0 | 0 || 0 | 0 || 30 | 1 | 66 | 3 | nonpublic |. 1.3 . 6.1 . 2.1 . 1.1 . 0 | 300 | 150.00 | 10 | 60 | 0 | SNMP % 20 module % 20 updated % 20 by % 20 API | DES | example_priv_passw | authPriv | MD5 | pepito_user | example_auth_passw & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_update_snmp_module_policy ( $id , $thrash1 , $other , $thrash3 ) {
2013-02-28 10:46:39 +01:00
if ( $id == " " ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_update_snmp_module_policy' , __ ( 'Error updating SNMP module in policy. Id_policy cannot be left blank.' ));
2013-02-28 10:46:39 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-28 10:46:39 +01:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_update_snmp_module_policy' , __ ( 'Error updating SNMP module in policy. Id_policy_module cannot be left blank.' ));
2013-02-28 10:46:39 +01:00
return ;
}
2012-01-19 18:45:59 +01:00
// Check if the module exists
2012-07-03 12:11:20 +02:00
$module_policy = enterprise_hook ( 'policies_get_modules' , array ( $id , array ( 'id' => $other [ 'data' ][ 0 ]), 'id_module' ));
2013-02-28 10:46:39 +01:00
2012-01-19 18:45:59 +01:00
if ( $module_policy === false ) {
returnError ( 'error_update_snmp_module_policy' , __ ( 'Error updating SNMP module in policy. Module doesn\'t exists.' ));
2013-02-28 10:46:39 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
2013-02-28 10:46:39 +01:00
if ( $module_policy [ 0 ][ 'id_module' ] != 2 ) {
2012-01-19 18:45:59 +01:00
returnError ( 'error_update_snmp_module_policy' , __ ( 'Error updating SNMP module in policy. Module type is not SNMP type.' ));
2013-02-28 10:46:39 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
# SNMP version 3
2013-01-29 19:03:08 +01:00
if ( $other [ 'data' ][ 12 ] == " 3 " ) {
2012-01-19 18:45:59 +01:00
if ( $other [ 'data' ][ 21 ] != " AES " and $other [ 'data' ][ 21 ] != " DES " ){
returnError ( 'error_update_snmp_module_policy' , __ ( 'Error updating SNMP module. snmp3_priv_method doesn\'t exists. Set it to \'AES\' or \'DES\'. ' ));
2013-01-29 19:03:08 +01:00
return ;
2012-01-19 18:45:59 +01:00
}
if ( $other [ 'data' ][ 23 ] != " authNoPriv " and $other [ 'data' ][ 23 ] != " authPriv " and $other [ 'data' ][ 23 ] != " noAuthNoPriv " ){
returnError ( 'error_update_snmp_module_policy' , __ ( 'Error updating SNMP module. snmp3_sec_level doesn\'t exists. Set it to \'authNoPriv\' or \'authPriv\' or \'noAuthNoPriv\'. ' ));
2013-01-29 19:03:08 +01:00
return ;
}
2012-01-19 18:45:59 +01:00
if ( $other [ 'data' ][ 24 ] != " MD5 " and $other [ 'data' ][ 24 ] != " SHA " ){
returnError ( 'error_update_snmp_module_policy' , __ ( 'Error updating SNMP module. snmp3_auth_method doesn\'t exists. Set it to \'MD5\' or \'SHA\'. ' ));
2013-01-29 19:03:08 +01:00
return ;
}
2012-01-19 18:45:59 +01:00
$fields_snmp_module = array ( 'id' , 'disabled' , 'id_module_group' , 'min_warning' , 'max_warning' , 'str_warning' , 'min_critical' ,
2013-01-29 19:03:08 +01:00
'max_critical' , 'str_critical' , 'min_ff_event' , 'history_data' , 'tcp_port' , 'tcp_send' , 'snmp_community' ,
'snmp_oid' , 'module_interval' , 'post_process' , 'min' , 'max' , 'custom_id' , 'description' , 'custom_string_1' ,
'custom_string_2' , 'custom_string_3' , 'plugin_parameter' , 'plugin_user' , 'plugin_pass' );
2012-01-19 18:45:59 +01:00
}
2013-01-29 19:03:08 +01:00
else {
2012-01-19 18:45:59 +01:00
$fields_snmp_module = array ( 'id' , 'disabled' , 'id_module_group' , 'min_warning' , 'max_warning' , 'str_warning' , 'min_critical' ,
2013-01-29 19:03:08 +01:00
'max_critical' , 'str_critical' , 'min_ff_event' , 'history_data' , 'tcp_port' , 'tcp_send' , 'snmp_community' ,
'snmp_oid' , 'module_interval' , 'post_process' , 'min' , 'max' , 'custom_id' , 'description' );
}
2012-01-19 18:45:59 +01:00
$cont = 0 ;
2013-02-28 10:46:39 +01:00
foreach ( $fields_snmp_module as $field ) {
if ( $other [ 'data' ][ $cont ] != " " and $field != 'id' ) {
2012-01-19 18:45:59 +01:00
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
2013-01-29 19:03:08 +01:00
2012-01-19 18:45:59 +01:00
$result_update = enterprise_hook ( 'policies_update_module' , array ( $other [ 'data' ][ 0 ], $values , false ));
if ( $result_update < 0 )
returnError ( 'error_update_snmp_module_policy' , 'Error updating policy module.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'SNMP policy module updated.' )));
}
2012-01-17 21:20:45 +01:00
/**
* Apply policy . And return id from the applying operation .
*
* @ param string $id Id of the target policy .
* @ param $thrash1 Don ' t use .
* @ param array $other Don ' t use
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = apply_policy & id = 1
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_apply_policy ( $id , $thrash1 , $other , $thrash3 ) {
2012-10-26 19:37:57 +02:00
if ( $id == " " ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_apply_policy' , __ ( 'Error applying policy. Id_policy cannot be left blank.' ));
return ;
}
2012-10-26 19:37:57 +02:00
2012-01-17 21:20:45 +01:00
# Check if this operation is duplicated
$duplicated = enterprise_hook ( 'policies_get_policy_queue_status' , array ( $id ));
if ( $duplicated === ENTERPRISE_NOT_HOOK ) {
// We want to return a value
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 ( $other == " return " ) {
2012-01-17 21:20:45 +01:00
return - 1 ;
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-01-17 21:20:45 +01:00
returnError ( 'error_apply_policy' , __ ( 'Error applying policy.' ));
return ;
2012-10-26 19:37:57 +02:00
}
2012-01-17 21:20:45 +01:00
}
2012-10-26 19:37:57 +02:00
2012-01-17 21:20:45 +01:00
if ( $duplicated == STATUS_IN_QUEUE_APPLYING or $duplicated == STATUS_IN_QUEUE_IN ){
// We want to return a value
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 ( $other == " return " ) {
2012-01-17 21:20:45 +01:00
return - 1 ;
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-10-26 19:37:57 +02:00
else {
2012-01-17 21:20:45 +01:00
returnError ( 'error_apply_policy' , __ ( 'Error applying policy. This policy is already pending to apply.' ));
2012-10-26 19:37:57 +02:00
return ;
}
2012-01-17 21:20:45 +01:00
}
2012-10-26 19:37:57 +02:00
2012-01-17 21:20:45 +01:00
$id = enterprise_hook ( 'add_policy_queue_operation' , array ( $id , 0 , 'apply' ));
if ( $id === ENTERPRISE_NOT_HOOK ) {
// We want to return a value
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 ( $other == " return " ) {
2012-01-17 21:20:45 +01:00
return - 1 ;
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-10-26 19:37:57 +02:00
else {
2012-01-17 21:20:45 +01:00
returnError ( 'error_apply_policy' , __ ( 'Error applying policy.' ));
2012-10-26 19:37:57 +02:00
return ;
2012-01-17 21:20:45 +01:00
}
2012-10-26 19:37:57 +02:00
}
2012-01-17 21:20:45 +01:00
// We want to return a value
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 ( $other == " return " ) {
2012-01-17 21:20:45 +01:00
if ( $id )
return $id ;
else
2012-10-26 19:37:57 +02:00
return - 1 ;
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-01-17 21:20:45 +01:00
if ( $id )
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $id ));
else
2012-10-26 19:37:57 +02:00
returnError ( 'error_apply_policy' , 'Error applying policy.' );
2012-01-17 21:20:45 +01:00
}
}
/**
* Apply all policy in database . And return the number of policies applied .
*
* @ param string $id Don ' t use .
* @ param $thrash1 Don ' t use .
* @ param array $other Don ' t use
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = apply_all_policies
*
* @ param $thrash3 Don ' t use
*/
2012-10-26 19:37:57 +02:00
function api_set_apply_all_policies ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2012-01-17 21:20:45 +01:00
$policies = array ();
2012-10-26 19:37:57 +02:00
2012-01-17 21:20:45 +01:00
# Get all policies
$policies = enterprise_hook ( 'policies_get_policies' , array ( false , false , false , true ));
2012-10-26 19:37:57 +02:00
if ( $policies === ENTERPRISE_NOT_HOOK ) {
2012-01-17 21:20:45 +01:00
returnError ( 'error_apply_all_policy' , __ ( 'Error applying all policies.' ));
2012-10-26 19:37:57 +02:00
return ;
}
2012-01-17 21:20:45 +01:00
$num_policies = count ( $policies );
$count_results = 0 ;
2012-10-26 19:37:57 +02:00
foreach ( $policies as $policy ) {
$return_value = enterprise_hook ( 'add_policy_queue_operation' ,
array ( $policy [ 'id' ], 0 , 'apply' ));
if ( $return_value != - 1 ) {
2012-01-17 21:20:45 +01:00
$count_results ++ ;
}
}
2012-10-26 19:37:57 +02:00
if ( $num_policies > $count_results ) {
2012-01-17 21:20:45 +01:00
$errors = $num_policies - $count_results ;
returnError ( 'error_apply_policy' , 'Error applying policy. ' . $errors . ' failed. ' );
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $count_results ));
2012-10-26 19:37:57 +02:00
}
2012-01-17 21:20:45 +01:00
}
2012-01-12 16:33:52 +01:00
/**
* Create a new group . And return the id_group of the new group .
*
* @ param string $id Name of the new group .
* @ param $thrash1 Don ' t use .
2012-10-30 08:59:55 +01:00
* @ param array $other it ' s array , $other as param is < icon_name > ; < id_group_parent > ; < description > in this order
2012-01-12 16:33:52 +01:00
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example 1 ( with parent group : Servers )
*
* api . php ? op = set & op2 = create_group & id = example_group_name & other = applications | 1 & other_mode = url_encode_separator_ |
*
* example 2 ( without parent group )
*
* api . php ? op = set & op2 = create_group & id = example_group_name2 & other = computer |& other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2012-06-14 17:07:40 +02:00
function api_set_create_group ( $id , $thrash1 , $other , $thrash3 ) {
2012-01-12 16:33:52 +01:00
$group_name = $id ;
2012-10-26 19:37:57 +02:00
if ( $id == " " ) {
2012-01-12 16:33:52 +01:00
returnError ( 'error_create_group' , __ ( 'Error in group creation. Group_name cannot be left blank.' ));
2012-10-26 19:37:57 +02:00
return ;
2012-01-12 16:33:52 +01:00
}
2012-10-26 19:37:57 +02:00
if ( $other [ 'data' ][ 0 ] == " " ) {
2012-01-12 16:33:52 +01:00
returnError ( 'error_create_group' , __ ( 'Error in group creation. Icon_name cannot be left blank.' ));
return ;
2012-10-26 19:37:57 +02:00
}
if ( $other [ 'data' ][ 1 ] != " " ) {
2012-01-12 16:33:52 +01:00
$group = groups_get_group_by_id ( $other [ 'data' ][ 1 ]);
2012-10-26 19:37:57 +02:00
if ( $group == false ) {
2012-01-12 16:33:52 +01:00
returnError ( 'error_create_group' , __ ( 'Error in group creation. Id_parent_group doesn\'t exists.' ));
2012-10-26 19:37:57 +02:00
return ;
2012-01-12 16:33:52 +01:00
}
}
2012-10-26 19:37:57 +02:00
if ( $other [ 'data' ][ 1 ] != " " ) {
2012-01-12 16:33:52 +01:00
$values = array (
'icon' => $other [ 'data' ][ 0 ],
2012-10-30 08:59:55 +01:00
'parent' => $other [ 'data' ][ 1 ],
'description' => $other [ 'data' ][ 2 ]
2012-01-12 16:33:52 +01:00
);
}
else {
$values = array (
2012-10-30 08:59:55 +01:00
'icon' => $other [ 'data' ][ 0 ],
'description' => $other [ 'data' ][ 2 ]
2012-01-12 16:33:52 +01:00
);
2012-10-26 19:37:57 +02:00
}
2012-01-12 16:33:52 +01:00
$id_group = groups_create_group ( $group_name , $values );
if ( is_error ( $id_group )) {
// TODO: Improve the error returning more info
returnError ( 'error_create_group' , __ ( 'Error in group creation.' ));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $id_group ));
}
}
2012-01-10 18:21:46 +01:00
2013-01-16 13:57:11 +01:00
/**
* Create a new netflow filter . And return the id_group of the new group .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param is < filter_name > ; < group_id > ; < filter > ; < aggregate_by > ; < output_format > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
*
* Possible values of 'aggregate_by' field : dstip , dstport , none , proto , srcip , srcport
* Possible values of 'output_format' field : kilobytes , kilobytespersecond , megabytes , megabytespersecond
*
* example :
*
* api . php ? op = set & op2 = create_netflow_filter & id = Filter name & other = 9 | host 192.168 . 50.3 OR host 192.168 . 50.4 or HOST 192.168 . 50.6 | dstport | kilobytes & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use
*/
2013-01-29 19:03:08 +01:00
function api_set_create_netflow_filter ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2013-01-16 13:57:11 +01:00
if ( $other [ 'data' ][ 0 ] == " " ) {
returnError ( 'error_create_netflow_filter' , __ ( 'Error in netflow filter creation. Filter name cannot be left blank.' ));
return ;
}
2013-01-29 19:03:08 +01:00
2013-01-16 13:57:11 +01:00
if ( $other [ 'data' ][ 1 ] == " " ) {
returnError ( 'error_create_netflow_filter' , __ ( 'Error in netflow filter creation. Group id cannot be left blank.' ));
return ;
}
else {
$group = groups_get_group_by_id ( $other [ 'data' ][ 1 ]);
if ( $group == false ) {
returnError ( 'error_create_group' , __ ( 'Error in group creation. Id_parent_group doesn\'t exists.' ));
return ;
}
}
2013-01-29 19:03:08 +01:00
2013-01-16 13:57:11 +01:00
if ( $other [ 'data' ][ 2 ] == " " ) {
returnError ( 'error_create_netflow_filter' , __ ( 'Error in netflow filter creation. Filter cannot be left blank.' ));
return ;
}
2013-01-29 19:03:08 +01:00
2013-01-16 13:57:11 +01:00
if ( $other [ 'data' ][ 3 ] == " " ) {
returnError ( 'error_create_netflow_filter' , __ ( 'Error in netflow filter creation. Aggregate_by cannot be left blank.' ));
return ;
}
if ( $other [ 'data' ][ 4 ] == " " ) {
returnError ( 'error_create_netflow_filter' , __ ( 'Error in netflow filter creation. Output_format cannot be left blank.' ));
return ;
}
2013-01-29 19:03:08 +01:00
2013-01-16 13:57:11 +01:00
$values = array (
2013-01-29 19:03:08 +01:00
'id_name' => $other [ 'data' ][ 0 ],
'id_group' => $other [ 'data' ][ 1 ],
'advanced_filter' => $other [ 'data' ][ 2 ],
'aggregate' => $other [ 'data' ][ 3 ],
'output' => $other [ 'data' ][ 4 ]
2013-01-16 13:57:11 +01:00
);
// Save filter args
$values [ 'filter_args' ] = netflow_get_filter_arguments ( $values );
$id = db_process_sql_insert ( 'tnetflow_filter' , $values );
2013-01-29 19:03:08 +01:00
2013-01-16 13:57:11 +01:00
if ( $id === false ) {
returnError ( 'error_create_netflow_filter' , __ ( 'Error in netflow filter creation.' ));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $id ));
}
}
2009-12-07 19:00:00 +01:00
/**
* Get module data in CSV format .
*
* @ param integer $id The ID of module in DB .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < separator > ; < period > in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = get & op2 = module_data & id = 17 & other = ; | 604800 & other_mode = url_encode_separator_ |
*
* @ param $returnType Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_get_module_data ( $id , $thrash1 , $other , $returnType ) {
2009-12-07 19:00:00 +01:00
$separator = $other [ 'data' ][ 0 ];
$periodSeconds = $other [ 'data' ][ 1 ];
$sql = sprintf ( " SELECT utimestamp, datos
FROM tagente_datos
WHERE id_agente_modulo = % d AND utimestamp > % d
ORDER BY utimestamp DESC " , $id , get_system_time () - $periodSeconds );
$data [ 'type' ] = 'array' ;
$data [ 'list_index' ] = array ( 'utimestamp' , 'datos' );
* 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 [ 'data' ] = db_get_all_rows_sql ( $sql );
2009-12-07 19:00:00 +01:00
if ( $data === false )
returnError ( 'error_query_module_data' , 'Error in the query of module data.' );
else
returnData ( 'csv' , $data , $separator );
}
2012-08-10 10:33:48 +02:00
/**
* Return a image file of sparse graph of module data in a period time .
*
* @ param integer $id id of a module data .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < period > ; < width > ; < height > ; < label > ; < start_date > ; in this order
* and separator char ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = get & op2 = graph_module_data & id = 17 & other = 604800 | 555 | 245 | pepito | 2009 - 12 - 07 & other_mode = url_encode_separator_ |
*
* @ param $thrash2 Don ' t use .
*/
function api_get_graph_module_data ( $id , $thrash1 , $other , $thrash2 ) {
$period = $other [ 'data' ][ 0 ];
$width = $other [ 'data' ][ 1 ];
$height = $other [ 'data' ][ 2 ];
$graph_type = 'sparse' ;
$draw_alerts = 0 ;
$draw_events = 0 ;
$zoom = 1 ;
$label = $other [ 'data' ][ 3 ];
$avg_only = 0 ;
$start_date = $other [ 'data' ][ 4 ];
$date = strtotime ( $start_date );
$homeurl = '../' ;
$ttl = 1 ;
2012-08-17 13:39:25 +02:00
2012-08-10 11:04:52 +02:00
global $config ;
$config [ 'flash_charts' ] = 0 ;
2012-08-10 10:33:48 +02:00
$image = grafico_modulo_sparse ( $id , $period , $draw_events ,
$width , $height , '' , null ,
$draw_alerts , $avg_only , false ,
$date , '' , 0 , 0 , true ,
false , $homeurl , $ttl );
// Extract url of the image from img tag
preg_match ( " /src='([^']*)'/i " , $image , $match );
if ( empty ( $match [ 1 ])) {
2012-08-10 11:04:52 +02:00
echo " Error getting graph " ;
2012-08-10 10:33:48 +02:00
}
else {
header ( 'Content-type: image/png' );
header ( 'Location: ' . $match [ 1 ]);
}
}
2009-12-08 21:21:16 +01:00
/**
* Create new user .
*
* @ param string $id String username for user login in Pandora
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param is < fullname > ; < firstname > ; < lastname > ; < middlename > ;
* < email > ; < phone > ; < languages > ; < comments > in this order and separator char
* ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = new_user & id = md & other = miguel | de % 20 dios | matias | kkk | pandora | md @ md . com | 666 | es | descripcion % 20 y % 20 esas % 20 cosas & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_new_user ( $id , $thrash2 , $other , $thrash3 ) {
2009-12-08 21:21:16 +01:00
$values = array ();
$values [ 'fullname' ] = $other [ 'data' ][ 0 ];
$values [ 'firstname' ] = $other [ 'data' ][ 1 ];
$values [ 'lastname' ] = $other [ 'data' ][ 2 ];
$values [ 'middlename' ] = $other [ 'data' ][ 3 ];
$password = $other [ 'data' ][ 4 ];
$values [ 'email' ] = $other [ 'data' ][ 5 ];
$values [ 'phone' ] = $other [ 'data' ][ 6 ];
$values [ 'language' ] = $other [ 'data' ][ 7 ];
$values [ 'comments' ] = $other [ 'data' ][ 8 ];
if ( ! create_user ( $id , $password , $values ))
returnError ( 'error_create_user' , 'Error create user' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Create user.' )));
}
2012-01-12 16:33:52 +01:00
/**
* Update new user .
*
* @ param string $id String username for user login in Pandora
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param is < fullname > ; < firstname > ; < lastname > ; < middlename > ; < password > ;
* < email > ; < phone > ; < language > ; < comments > ; < is_admin > ; < block_size > ; < flash_chart > in this order and separator char
* ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = update_user & id = example_user_name & other = example_fullname || example_lastname || example_new_passwd | example_email || example_language | example % 20 comment | 1 | 30 |& other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_update_user ( $id , $thrash2 , $other , $thrash3 ) {
2012-01-12 16:33:52 +01:00
$fields_user = array ( 'fullname' , 'firstname' , 'lastname' , 'middlename' , 'password' , 'email' ,
'phone' , 'language' , 'comments' , 'is_admin' , 'block_size' , 'flash_chart' );
if ( $id == " " ) {
returnError ( 'error_update_user' , __ ( 'Error updating user. Id_user cannot be left blank.' ));
return ;
}
$result_user = users_get_user_by_id ( $id );
if ( ! $result_user ){
returnError ( 'error_update_user' , __ ( 'Error updating user. Id_user doesn\'t exists.' ));
return ;
}
$cont = 0 ;
foreach ( $fields_user as $field ){
if ( $other [ 'data' ][ $cont ] != " " and $field != " password " ){
$values [ $field ] = $other [ 'data' ][ $cont ];
}
$cont ++ ;
}
// If password field has data
if ( $other [ 'data' ][ 4 ] != " " ){
if ( ! update_user_password ( $id , $other [ 'data' ][ 4 ])){
returnError ( 'error_update_user' , __ ( 'Error updating user. Password info incorrect.' ));
return ;
}
}
if ( ! update_user ( $id , $values ))
returnError ( 'error_create_user' , 'Error updating user' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Updated user.' )));
}
/**
* Enable / disable user given an id
*
* @ param string $id String username for user login in Pandora
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param is < enable / disable value > in this order and separator char
* ( after text ; ) and separator ( pass in param othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* example 1 ( Disable user 'example_name' )
*
* api . php ? op = set & op2 = enable_disable_user & id = example_name & other = 0 & other_mode = url_encode_separator_ |
*
* example 2 ( Enable user 'example_name' )
*
* api . php ? op = set & op2 = enable_disable_user & id = example_name & other = 1 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_enable_disable_user ( $id , $thrash2 , $other , $thrash3 ) {
2012-04-26 12:03:53 +02:00
2012-01-12 16:33:52 +01:00
if ( $id == " " ){
returnError ( 'error_enable_disable_user' , 'Error enable/disable user. Id_user cannot be left blank.' );
return ;
}
2012-04-26 12:03:53 +02:00
2012-01-12 16:33:52 +01:00
if ( $other [ 'data' ][ 0 ] != " 0 " and $other [ 'data' ][ 0 ] != " 1 " ){
returnError ( 'error_enable_disable_user' , 'Error enable/disable user. Enable/disable value cannot be left blank.' );
2012-04-26 12:03:53 +02:00
return ;
2012-01-12 16:33:52 +01:00
}
if ( users_get_user_by_id ( $id ) == false ){
returnError ( 'error_enable_disable_user' , 'Error enable/disable user. The user doesn\'t exists.' );
2012-04-26 12:03:53 +02:00
return ;
2012-01-12 16:33:52 +01:00
}
2012-04-26 12:03:53 +02:00
2012-01-12 16:33:52 +01:00
$result = users_disable ( $id , $other [ 'data' ][ 0 ]);
2012-04-26 12:03:53 +02:00
2012-01-12 16:33:52 +01:00
if ( is_error ( $result )) {
// TODO: Improve the error returning more info
returnError ( 'error_create_network_module' , __ ( 'Error in user enabling/disabling.' ));
}
else {
if ( $other [ 'data' ][ 0 ] == " 0 " ){
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Enabled user.' )));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Disabled user.' )));
}
}
}
2012-04-27 14:52:33 +02:00
function otherParameter2Filter ( $other , $return_as_array = false ) {
2010-05-27 17:34:29 +02:00
$filter = array ();
2012-04-26 12:03:53 +02:00
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 1 ]) && ( $other [ 'data' ][ 1 ] != - 1 ) && ( $other [ 'data' ][ 1 ] != '' )) {
2010-05-27 17:34:29 +02:00
$filter [ 'criticity' ] = $other [ 'data' ][ 1 ];
}
$idAgent = null ;
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 2 ]) && $other [ 'data' ][ 2 ] != '' ) {
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
$idAgent = agents_get_agent_id ( $other [ 'data' ][ 2 ]);
2010-05-27 17:34:29 +02:00
$filter [ 'id_agente' ] = $idAgent ;
}
$idAgentModulo = null ;
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 3 ]) && $other [ 'data' ][ 3 ] != '' ) {
2011-09-08 18:52:46 +02:00
$filterModule = array ( 'nombre' => $other [ 'data' ][ 3 ]);
2010-05-27 17:34:29 +02:00
if ( $idAgent != null ) {
2011-09-13 02:19:03 +02:00
$filterModule [ 'id_agente' ] = $idAgent ;
2010-05-27 17:34:29 +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
$idAgentModulo = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , $filterModule );
2010-05-27 17:34:29 +02:00
if ( $idAgentModulo !== false ) {
2011-09-13 02:19:03 +02:00
$filter [ 'id_agentmodule' ] = $idAgentModulo ;
2010-05-27 17:34:29 +02:00
}
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 4 ]) && $other [ 'data' ][ 4 ] != '' ) {
* 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
$idTemplate = db_get_value_filter ( 'id' , 'talert_templates' , array ( 'name' => $other [ 'data' ][ 4 ]));
2010-05-27 17:34:29 +02:00
if ( $idTemplate !== false ) {
if ( $idAgentModulo != null ) {
* 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
$idAlert = db_get_value_filter ( 'id' , 'talert_template_modules' , array ( 'id_agent_module' => $idAgentModulo , 'id_alert_template' => $idTemplate ));
2010-05-27 17:34:29 +02:00
if ( $idAlert !== false ) {
$filter [ 'id_alert_am' ] = $idAlert ;
}
}
}
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 5 ]) && $other [ 'data' ][ 5 ] != '' ) {
2010-05-27 17:34:29 +02:00
$filter [ 'id_usuario' ] = $other [ 'data' ][ 5 ];
}
* 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
$filterString = db_format_array_where_clause_sql ( $filter );
2010-05-27 17:34:29 +02:00
if ( $filterString == '' ) {
$filterString = '1 = 1' ;
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 6 ]) && ( $other [ 'data' ][ 6 ] != '' ) && ( $other [ 'data' ][ 6 ] != - 1 )) {
2012-04-27 14:52:33 +02:00
if ( $return_as_array ) {
2011-09-12 13:28:32 +02:00
$filter [ 'utimestamp' ][ '>' ] = $other [ 'data' ][ 6 ];
}
else {
$filterString .= ' AND utimestamp >= ' . $other [ 'data' ][ 6 ];
}
2010-05-27 17:34:29 +02:00
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 7 ]) && ( $other [ 'data' ][ 7 ] != '' ) && ( $other [ 'data' ][ 7 ] != - 1 )) {
2012-04-27 14:52:33 +02:00
if ( $return_as_array ) {
2011-09-12 13:28:32 +02:00
$filter [ 'utimestamp' ][ '<' ] = $other [ 'data' ][ 7 ];
}
else {
$filterString .= ' AND utimestamp <= ' . $other [ 'data' ][ 7 ];
}
2011-09-08 18:37:58 +02:00
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 8 ]) && ( $other [ 'data' ][ 8 ] != '' )) {
2012-04-27 14:52:33 +02:00
if ( $return_as_array ) {
2011-09-26 16:29:55 +02:00
$filter [ 'estado' ] = $other [ 'data' ][ 8 ];
2011-09-12 13:28:32 +02:00
}
else {
2012-05-29 10:55:51 +02:00
$estado = ( int ) $other [ 'data' ][ 8 ];
2012-04-26 12:03:53 +02:00
if ( $estado >= 0 ) {
$filterString .= ' AND estado = ' . $estado ;
}
2011-09-12 13:28:32 +02:00
}
2011-09-08 18:37:58 +02:00
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 9 ]) && ( $other [ 'data' ][ 9 ] != '' )) {
2012-04-27 14:52:33 +02:00
if ( $return_as_array ) {
2011-09-26 16:29:55 +02:00
$filter [ 'evento' ] = $other [ 'data' ][ 9 ];
2011-09-12 13:28:32 +02:00
}
else {
2012-05-29 10:55:51 +02:00
$filterString .= ' AND evento like "%' . $other [ 'data' ][ 9 ] . '%"' ;
2011-09-12 13:28:32 +02:00
}
2010-05-27 17:34:29 +02:00
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 10 ]) && ( $other [ 'data' ][ 10 ] != '' )) {
2012-04-27 14:52:33 +02:00
if ( $return_as_array ) {
2011-09-26 16:29:55 +02:00
$filter [ 'limit' ] = $other [ 'data' ][ 10 ];
}
else {
$filterString .= ' LIMIT ' . $other [ 'data' ][ 10 ];
}
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 11 ]) && ( $other [ 'data' ][ 11 ] != '' )) {
2012-04-27 14:52:33 +02:00
if ( $return_as_array ) {
2011-09-26 16:29:55 +02:00
$filter [ 'offset' ] = $other [ 'data' ][ 11 ];
}
else {
$filterString .= ' OFFSET ' . $other [ 'data' ][ 11 ];
}
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 12 ]) && ( $other [ 'data' ][ 12 ] != '' )) {
2012-04-27 14:52:33 +02:00
if ( $return_as_array ) {
2011-09-23 22:46:33 +02:00
$filter [ 'total' ] = false ;
$filter [ 'more_criticity' ] = false ;
2011-09-26 16:29:55 +02:00
if ( $other [ 'data' ][ 12 ] == 'total' ) {
2011-09-23 22:46:33 +02:00
$filter [ 'total' ] = true ;
}
2011-09-26 16:29:55 +02:00
if ( $other [ 'data' ][ 12 ] == 'more_criticity' ) {
2011-09-23 22:46:33 +02:00
$filter [ 'more_criticity' ] = true ;
}
2011-09-21 22:43:24 +02:00
}
else {
}
}
else {
2012-04-27 14:52:33 +02:00
if ( $return_as_array ) {
2011-09-21 22:43:24 +02:00
$filter [ 'total' ] = false ;
2011-09-23 22:46:33 +02:00
$filter [ 'more_criticity' ] = false ;
2011-09-21 22:43:24 +02:00
}
else {
}
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 13 ]) && ( $other [ 'data' ][ 13 ] != '' )) {
2012-05-24 21:37:24 +02:00
if ( $return_as_array ) {
$filter [ 'id_group' ] = $other [ 'data' ][ 13 ];
}
else {
$filterString .= ' AND id_grupo =' . $other [ 'data' ][ 13 ];
}
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 14 ]) && ( $other [ 'data' ][ 14 ] != '' )) {
2012-05-24 21:37:24 +02:00
if ( $return_as_array ) {
$filter [ 'tag' ] = $other [ 'data' ][ 14 ];
}
else {
$filterString .= " AND tags LIKE '% " . $other [ 'data' ][ 14 ] . " %' " ;
}
}
2012-05-29 10:55:51 +02:00
if ( isset ( $other [ 'data' ][ 15 ]) && ( $other [ 'data' ][ 15 ] != '' )) {
if ( $return_as_array ) {
$filter [ 'event_type' ] = $other [ 'data' ][ 15 ];
}
else {
$event_type = $other [ 'data' ][ 15 ];
if ( $event_type == " not_normal " ) {
$filterString .= " AND ( event_type LIKE '%warning%'
OR event_type LIKE '%critical%' OR event_type LIKE '%unknown%' ) " ;
}
else {
$filterString .= ' AND event_type LIKE "%' . $event_type . '%"' ;
}
}
}
2012-04-27 14:52:33 +02:00
if ( $return_as_array ) {
2011-09-12 13:28:32 +02:00
return $filter ;
}
else {
return $filterString ;
}
2010-05-27 17:34:29 +02:00
}
/**
*
* @ param $id
* @ param $id2
* @ param $other
* @ param $trash1
*/
2012-06-14 17:07:40 +02:00
function api_set_new_alert_template ( $id , $id2 , $other , $trash1 ) {
2010-05-27 17:34:29 +02:00
if ( $other [ 'type' ] == 'string' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else if ( $other [ 'type' ] == '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
$idAgent = agents_get_agent_id ( $id );
2010-05-27 17:34:29 +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
$row = db_get_row_filter ( 'talert_templates' , array ( 'name' => $id2 ));
2010-05-27 17:34:29 +02:00
if ( $row === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
$idTemplate = $row [ 'id' ];
$idActionTemplate = $row [ 'id_alert_action' ];
* 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
$idAgentModule = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'id_agente' => $idAgent , 'nombre' => $other [ 'data' ][ 0 ]));
2010-05-27 17:34:29 +02:00
if ( $idAgentModule === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
$values = array (
'id_agent_module' => $idAgentModule ,
2011-10-24 03:34:38 +02:00
'id_alert_template' => $idTemplate );
2010-05-27 17:34:29 +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
$return = db_process_sql_insert ( 'talert_template_modules' , $values );
2010-05-27 17:34:29 +02:00
$data [ 'type' ] = 'string' ;
if ( $return === false ) {
$data [ 'data' ] = 0 ;
}
else {
$data [ 'data' ] = $return ;
}
returnData ( 'string' , $data );
return ;
}
}
2012-06-14 17:07:40 +02:00
function api_set_delete_module ( $id , $id2 , $other , $trash1 ) {
2010-05-27 17:34:29 +02:00
if ( $other [ 'type' ] == 'string' ) {
$simulate = false ;
if ( $other [ 'data' ] == 'simulate' ) {
$simulate = true ;
}
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
$idAgent = agents_get_agent_id ( $id );
2010-05-27 17:34:29 +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
$idAgentModule = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'id_agente' => $idAgent , 'nombre' => $id2 ));
2010-05-27 17:34:29 +02:00
if ( $idAgentModule === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
if ( ! $simulate ) {
2013-02-14 13:55:53 +01:00
$return = modules_delete_agent_module ( $idAgentModule );
2010-05-27 17:34:29 +02:00
}
else {
$return = true ;
}
$data [ 'type' ] = 'string' ;
if ( $return === false ) {
$data [ 'data' ] = 0 ;
}
else {
$data [ 'data' ] = $return ;
}
returnData ( 'string' , $data );
return ;
}
else {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
}
2012-06-14 17:07:40 +02:00
function api_set_module_data ( $id , $thrash2 , $other , $trash1 ) {
2010-09-23 13:52:07 +02:00
global $config ;
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: fixed the width by default in the function
"print_table", now there isn't a default width (before it was 80%).
* include/pchart_graph.php: fixed in the function "add_events" when tryed
to add a event out the data.
* include/fgraph.php: check the user with the mobile methods.
* include/functions_db.php: in function "check_login" check the user with
the mobile methods.
* images/status_sets/default/severity_warning_pixel.png,
images/status_sets/default/severity_normal_pixel.png,
images/status_sets/default/severity_informational_pixel.png,
images/status_sets/default/severity_maintenance_pixel.png,
images/status_sets/default/severity_critical_pixel.png: added the image
files for to show in the event mobile's page.
* mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/view_alerts.php, mobile/operation/events/events.php,
mobile/operation/servers/view_servers.php, mobile/include/user.class.php,
mobile/include/system.class.php: changed the style the some pages to show
more clearly the pages in old m$-mobiles.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3265 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 10:59:01 +02:00
if ( $other [ 'type' ] == 'array' ) {
$idAgentModule = $id ;
$data = $other [ 'data' ][ 0 ];
$time = $other [ 'data' ][ 1 ];
if ( $time == 'now' ) $time = time ();
* 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
$agentModule = db_get_row_filter ( 'tagente_modulo' , array ( 'id_agente_modulo' => $idAgentModule ));
2010-09-23 13:52:07 +02:00
if ( $agentModule === false ) {
returnError ( 'error_parameter' , 'Not found module agent.' );
}
else {
* 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
$agent = db_get_row_filter ( 'tagente' , array ( 'id_agente' => $agentModule [ 'id_agente' ]));
2010-09-23 13:52:07 +02:00
$xmlTemplate = " <?xml version='1.0' encoding='ISO-8859-1'?>
< agent_data description = '' group = '' os_name = '%s' " .
" os_version='%s' interval='%d' version='%s' timestamp='%s' agent_name='%s' timezone_offset='%d'>
< module >
< name ><! [ CDATA [ % s ]] ></ name >
< description ><! [ CDATA [ % s ]] ></ description >
< type ><! [ CDATA [ % s ]] ></ type >
< data ><! [ CDATA [ % s ]] ></ data >
</ module >
</ agent_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
$xml = sprintf ( $xmlTemplate , io_safe_output ( get_os_name ( $agent [ 'id_os' ])),
io_safe_output ( $agent [ 'os_version' ]), $agent [ 'intervalo' ],
io_safe_output ( $agent [ 'agent_version' ]), date ( 'Y/m/d h:i:s' , $time ),
io_safe_output ( $agent [ 'nombre' ]), $agent [ 'timezone_offset' ],
io_safe_output ( $agentModule [ 'nombre' ]), io_safe_output ( $agentModule [ 'descripcion' ]), modules_get_type_name ( $agentModule [ 'id_tipo_modulo' ]), $data );
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: fixed the width by default in the function
"print_table", now there isn't a default width (before it was 80%).
* include/pchart_graph.php: fixed in the function "add_events" when tryed
to add a event out the data.
* include/fgraph.php: check the user with the mobile methods.
* include/functions_db.php: in function "check_login" check the user with
the mobile methods.
* images/status_sets/default/severity_warning_pixel.png,
images/status_sets/default/severity_normal_pixel.png,
images/status_sets/default/severity_informational_pixel.png,
images/status_sets/default/severity_maintenance_pixel.png,
images/status_sets/default/severity_critical_pixel.png: added the image
files for to show in the event mobile's page.
* mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/view_alerts.php, mobile/operation/events/events.php,
mobile/operation/servers/view_servers.php, mobile/include/user.class.php,
mobile/include/system.class.php: changed the style the some pages to show
more clearly the pages in old m$-mobiles.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3265 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 10:59:01 +02:00
2010-09-23 13:52:07 +02:00
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
if ( false === @ file_put_contents ( $config [ 'remote_config' ] . '/' . io_safe_output ( $agent [ 'nombre' ]) . '.' . $time . '.data' , $xml )) {
2010-09-23 13:52:07 +02:00
returnError ( 'error_file' , 'Can save agent data xml.' );
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $xml ));
return ;
}
}
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: fixed the width by default in the function
"print_table", now there isn't a default width (before it was 80%).
* include/pchart_graph.php: fixed in the function "add_events" when tryed
to add a event out the data.
* include/fgraph.php: check the user with the mobile methods.
* include/functions_db.php: in function "check_login" check the user with
the mobile methods.
* images/status_sets/default/severity_warning_pixel.png,
images/status_sets/default/severity_normal_pixel.png,
images/status_sets/default/severity_informational_pixel.png,
images/status_sets/default/severity_maintenance_pixel.png,
images/status_sets/default/severity_critical_pixel.png: added the image
files for to show in the event mobile's page.
* mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/view_alerts.php, mobile/operation/events/events.php,
mobile/operation/servers/view_servers.php, mobile/include/user.class.php,
mobile/include/system.class.php: changed the style the some pages to show
more clearly the pages in old m$-mobiles.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3265 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 10:59:01 +02:00
}
else {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
}
2012-06-14 17:07:40 +02:00
function api_set_new_module ( $id , $id2 , $other , $trash1 ) {
2010-05-27 17:34:29 +02:00
if ( $other [ 'type' ] == 'string' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else if ( $other [ 'type' ] == 'array' ) {
$values = 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
$values [ 'id_agente' ] = agents_get_agent_id ( $id );
2010-05-27 17:34:29 +02:00
$values [ 'nombre' ] = $id2 ;
* 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
$values [ 'id_tipo_modulo' ] = db_get_value_filter ( 'id_tipo' , 'ttipo_modulo' , array ( 'nombre' => $other [ 'data' ][ 0 ]));
2010-05-27 17:34:29 +02:00
if ( $values [ 'id_tipo_modulo' ] === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
if ( $other [ 'data' ][ 1 ] == '' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
$values [ 'ip_target' ] = $other [ 'data' ][ 1 ];
if ( strstr ( $other [ 'data' ][ 0 ], 'icmp' ) === false ) {
if (( $other [ 'data' ][ 2 ] == '' ) || ( $other [ 'data' ][ 2 ] <= 0 || $other [ 'data' ][ 2 ] > 65535 )) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
$values [ 'tcp_port' ] = $other [ 'data' ][ 2 ];
}
$values [ 'descripcion' ] = $other [ 'data' ][ 3 ];
if ( $other [ 'data' ][ 4 ] != '' ) {
$values [ 'min' ] = $other [ 'data' ][ 4 ];
}
if ( $other [ 'data' ][ 5 ] != '' ) {
$values [ 'max' ] = $other [ 'data' ][ 5 ];
}
if ( $other [ 'data' ][ 6 ] != '' ) {
$values [ 'post_process' ] = $other [ 'data' ][ 6 ];
}
if ( $other [ 'data' ][ 7 ] != '' ) {
$values [ 'module_interval' ] = $other [ 'data' ][ 7 ];
}
if ( $other [ 'data' ][ 8 ] != '' ) {
$values [ 'min_warning' ] = $other [ 'data' ][ 8 ];
}
if ( $other [ 'data' ][ 9 ] != '' ) {
$values [ 'max_warning' ] = $other [ 'data' ][ 9 ];
}
2011-07-07 Ramon Novoa <rnovoa@artica.es>
* include/functions_network_components.php,
include/functions_api.php,
include/functions_ui.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_monitores.php,
extras/pandoradb_migrate_v3.2_to_v4.0.sql,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php: Added support for
warning/critical status regexp (works with both numeric and string
data types).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-07 13:12:15 +02:00
2010-05-27 17:34:29 +02:00
if ( $other [ 'data' ][ 10 ] != '' ) {
2011-07-07 Ramon Novoa <rnovoa@artica.es>
* include/functions_network_components.php,
include/functions_api.php,
include/functions_ui.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_monitores.php,
extras/pandoradb_migrate_v3.2_to_v4.0.sql,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php: Added support for
warning/critical status regexp (works with both numeric and string
data types).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-07 13:12:15 +02:00
$values [ 'str_warning' ] = $other [ 'data' ][ 10 ];
2010-05-27 17:34:29 +02:00
}
if ( $other [ 'data' ][ 11 ] != '' ) {
2011-07-07 Ramon Novoa <rnovoa@artica.es>
* include/functions_network_components.php,
include/functions_api.php,
include/functions_ui.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_monitores.php,
extras/pandoradb_migrate_v3.2_to_v4.0.sql,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php: Added support for
warning/critical status regexp (works with both numeric and string
data types).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-07 13:12:15 +02:00
$values [ 'min_critical' ] = $other [ 'data' ][ 11 ];
2010-05-27 17:34:29 +02:00
}
if ( $other [ 'data' ][ 12 ] != '' ) {
2011-07-07 Ramon Novoa <rnovoa@artica.es>
* include/functions_network_components.php,
include/functions_api.php,
include/functions_ui.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_monitores.php,
extras/pandoradb_migrate_v3.2_to_v4.0.sql,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php: Added support for
warning/critical status regexp (works with both numeric and string
data types).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-07 13:12:15 +02:00
$values [ 'max_critical' ] = $other [ 'data' ][ 12 ];
}
if ( $other [ 'data' ][ 13 ] != '' ) {
$values [ 'str_critical' ] = $other [ 'data' ][ 13 ];
}
if ( $other [ 'data' ][ 14 ] != '' ) {
$values [ 'history_data' ] = $other [ 'data' ][ 14 ];
2010-05-27 17:34:29 +02:00
}
$values [ 'id_modulo' ] = 2 ;
2013-02-14 13:55:53 +01:00
$return = modules_create_agent_module ( $values [ 'id_agente' ], $values [ 'nombre' ], $values );
2010-05-27 17:34:29 +02:00
$data [ 'type' ] = 'string' ;
if ( $return === false ) {
$data [ 'data' ] = 0 ;
}
else {
$data [ 'data' ] = $return ;
}
returnData ( 'string' , $data );
return ;
}
}
/**
*
* @ param unknown_type $id
* @ param unknown_type $id2
* @ param unknown_type $other
* @ param unknown_type $trash1
*/
2012-06-14 17:07:40 +02:00
function api_set_alert_actions ( $id , $id2 , $other , $trash1 ) {
2010-05-27 17:34:29 +02:00
if ( $other [ 'type' ] == 'string' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else if ( $other [ 'type' ] == '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
$idAgent = agents_get_agent_id ( $id );
2010-05-27 17:34:29 +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
$row = db_get_row_filter ( 'talert_templates' , array ( 'name' => $id2 ));
2010-05-27 17:34:29 +02:00
if ( $row === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
$idTemplate = $row [ 'id' ];
* 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
$idAgentModule = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'id_agente' => $idAgent , 'nombre' => $other [ 'data' ][ 0 ]));
2010-05-27 17:34:29 +02:00
if ( $idAgentModule === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
* 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
$idAlertTemplateModule = db_get_value_filter ( 'id' , 'talert_template_modules' , array ( 'id_alert_template' => $idTemplate , 'id_agent_module' => $idAgentModule ));
2010-05-27 17:34:29 +02:00
if ( $idAlertTemplateModule === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
if ( $other [ 'data' ][ 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
$idAction = db_get_value_filter ( 'id' , 'talert_actions' , array ( 'name' => $other [ 'data' ][ 1 ]));
2010-05-27 17:34:29 +02:00
if ( $idAction === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
}
else {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
$firesMin = $other [ 'data' ][ 2 ];
$firesMax = $other [ 'data' ][ 3 ];
$values = array ( 'id_alert_template_module' => $idAlertTemplateModule ,
'id_alert_action' => $idAction , 'fires_min' => $firesMin , 'fires_max' => $firesMax );
* 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
$return = db_process_sql_insert ( 'talert_template_module_actions' , $values );
2010-05-27 17:34:29 +02:00
$data [ 'type' ] = 'string' ;
if ( $return === false ) {
$data [ 'data' ] = 0 ;
}
else {
$data [ 'data' ] = $return ;
}
returnData ( 'string' , $data );
return ;
}
}
2012-06-14 17:07:40 +02:00
function api_set_new_event ( $trash1 , $trash2 , $other , $trash3 ) {
2010-05-27 17:34:29 +02:00
$simulate = false ;
$time = get_system_time ();
if ( $other [ 'type' ] == 'string' ) {
if ( $other [ 'data' ] != '' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
}
else if ( $other [ 'type' ] == 'array' ) {
$values = array ();
if (( $other [ 'data' ][ 0 ] == null ) && ( $other [ 'data' ][ 0 ] == '' )) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else {
$values [ 'evento' ] = $other [ 'data' ][ 0 ];
}
if (( $other [ 'data' ][ 1 ] == null ) && ( $other [ 'data' ][ 1 ] == '' )) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else {
$valuesAvaliable = array ( 'unknown' , 'alert_fired' , 'alert_recovered' ,
'alert_ceased' , 'alert_manual_validation' ,
'recon_host_detected' , 'system' , 'error' , 'new_agent' ,
'going_up_warning' , 'going_up_critical' , 'going_down_warning' ,
2011-06-10 14:38:59 +02:00
'going_down_normal' , 'going_down_critical' , 'going_up_normal' , 'configuration_change' );
2010-05-27 17:34:29 +02:00
if ( in_array ( $other [ 'data' ][ 1 ], $valuesAvaliable )) {
$values [ 'event_type' ] = $other [ 'data' ][ 1 ];
}
else {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
}
if (( $other [ 'data' ][ 2 ] == null ) && ( $other [ 'data' ][ 2 ] == '' )) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else {
$values [ 'estado' ] = $other [ 'data' ][ 2 ];
}
if (( $other [ 'data' ][ 3 ] == null ) && ( $other [ 'data' ][ 3 ] == '' )) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
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
$values [ 'id_agente' ] = agents_get_agent_id ( $other [ 'data' ][ 3 ]);
2010-05-27 17:34:29 +02:00
}
if (( $other [ 'data' ][ 4 ] == null ) && ( $other [ 'data' ][ 4 ] == '' )) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else {
* 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
$idAgentModule = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' ,
2010-05-27 17:34:29 +02:00
array ( 'nombre' => $other [ 'data' ][ 4 ], 'id_agente' => $values [ 'id_agente' ]));
}
if ( $idAgentModule === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else {
$values [ 'id_agentmodule' ] = $idAgentModule ;
}
if (( $other [ 'data' ][ 5 ] == null ) && ( $other [ 'data' ][ 5 ] == '' )) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else {
if ( $other [ 'data' ][ 5 ] != 'all' ) {
* 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
$idGroup = db_get_value_filter ( 'id_grupo' , 'tgrupo' , array ( 'nombre' => $other [ 'data' ][ 5 ]));
2010-05-27 17:34:29 +02:00
}
else {
$idGroup = 0 ;
}
if ( $idGroup === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else {
$values [ 'id_grupo' ] = $idGroup ;
}
}
if (( $other [ 'data' ][ 6 ] == null ) && ( $other [ 'data' ][ 6 ] == '' )) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else {
if (( $other [ 'data' ][ 6 ] >= 0 ) && ( $other [ 'data' ][ 6 ] <= 4 )) {
$values [ 'criticity' ] = $other [ 'data' ][ 6 ];
}
else {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
}
if (( $other [ 'data' ][ 7 ] == null ) && ( $other [ 'data' ][ 7 ] == '' )) {
//its optional parameter
}
else {
* 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
$idAlert = db_get_value_sql ( " SELECT t1.id
2010-05-27 17:34:29 +02:00
FROM talert_template_modules AS t1
INNER JOIN talert_templates AS t2
ON t1 . id_alert_template = t2 . id
WHERE t1 . id_agent_module = 1 AND t2 . name LIKE '" . $other[' data '][7] . "' " );
if ( $idAlert === false ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else {
$values [ 'id_alert_am' ] = $idAlert ;
}
}
}
$values [ 'timestamp' ] = date ( " Y-m-d H:i:s " , $time );
$values [ 'utimestamp' ] = $time ;
* 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
$return = db_process_sql_insert ( 'tevento' , $values );
2010-05-27 17:34:29 +02:00
$data [ 'type' ] = 'string' ;
if ( $return === false ) {
$data [ 'data' ] = 0 ;
}
else {
$data [ 'data' ] = $return ;
}
returnData ( 'string' , $data );
return ;
}
2012-06-14 17:07:40 +02:00
function api_set_event_validate_filter_pro ( $trash1 , $trash2 , $other , $trash3 ) {
2010-05-27 17:34:29 +02:00
$simulate = false ;
if ( $other [ 'type' ] == 'string' ) {
if ( $other [ 'data' ] != '' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
}
else if ( $other [ 'type' ] == 'array' ) {
$filter = array ();
if (( $other [ 'data' ][ 1 ] != null ) && ( $other [ 'data' ][ 1 ] != - 1 ) && ( $other [ 'data' ][ 1 ] != '' )) {
$filter [ 'criticity' ] = $other [ 'data' ][ 1 ];
}
if (( $other [ 'data' ][ 2 ] != null ) && ( $other [ 'data' ][ 2 ] != - 1 ) && ( $other [ 'data' ][ 2 ] != '' )) {
$filter [ 'id_agente' ] = $other [ 'data' ][ 2 ];
}
if (( $other [ 'data' ][ 3 ] != null ) && ( $other [ 'data' ][ 3 ] != - 1 ) && ( $other [ 'data' ][ 3 ] != '' )) {
$filter [ 'id_agentmodule' ] = $other [ 'data' ][ 3 ];
}
if (( $other [ 'data' ][ 4 ] != null ) && ( $other [ 'data' ][ 4 ] != - 1 ) && ( $other [ 'data' ][ 4 ] != '' )) {
$filter [ 'id_alert_am' ] = $other [ 'data' ][ 4 ];
}
if (( $other [ 'data' ][ 5 ] != null ) && ( $other [ 'data' ][ 5 ] != '' )) {
$filter [ 'id_usuario' ] = $other [ 'data' ][ 5 ];
}
* 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
$filterString = db_format_array_where_clause_sql ( $filter );
2010-05-27 17:34:29 +02:00
if ( $filterString == '' ) {
$filterString = '1 = 1' ;
}
if (( $other [ 'data' ][ 6 ] != null ) && ( $other [ 'data' ][ 6 ] != - 1 )) {
$filterString .= ' AND utimestamp > ' . $other [ 'data' ][ 6 ];
}
if (( $other [ 'data' ][ 7 ] != null ) && ( $other [ 'data' ][ 7 ] != - 1 )) {
$filterString .= 'AND utimestamp < ' . $other [ 'data' ][ 7 ];
}
}
if ( $simulate ) {
* 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
$rows = db_get_all_rows_filter ( 'tevento' , $filterString );
2010-05-27 17:34:29 +02:00
if ( $rows !== false ) {
returnData ( 'string' , count ( $rows ));
return ;
}
}
else {
* 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
returnData ( 'string' , db_process_sql_update ( 'tevento' , array ( 'estado' => 1 ), $filterString ));
2010-05-27 17:34:29 +02:00
return ;
}
}
2012-06-14 17:07:40 +02:00
function api_set_event_validate_filter ( $trash1 , $trash2 , $other , $trash3 ) {
2010-05-27 17:34:29 +02:00
$simulate = false ;
if ( $other [ 'type' ] == 'string' ) {
if ( $other [ 'data' ] != '' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
}
else if ( $other [ 'type' ] == 'array' ) {
$separator = $other [ 'data' ][ 0 ];
if (( $other [ 'data' ][ 8 ] != null ) && ( $other [ 'data' ][ 8 ] != '' )) {
if ( $other [ 'data' ][ 8 ] == 'simulate' ) {
$simulate = true ;
}
}
$filterString = otherParameter2Filter ( $other );
}
if ( $simulate ) {
* 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
$rows = db_get_all_rows_filter ( 'tevento' , $filterString );
2010-05-27 17:34:29 +02:00
if ( $rows !== false ) {
returnData ( 'string' , count ( $rows ));
return ;
}
}
else {
* 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
returnData ( 'string' , db_process_sql_update ( 'tevento' , array ( 'estado' => 1 ), $filterString ));
2010-05-27 17:34:29 +02:00
return ;
}
}
2012-06-14 17:07:40 +02:00
function api_set_validate_events ( $id_event , $trash1 , $other , $return_type , $user_in_db ) {
2011-09-25 19:26:36 +02:00
$text = $other [ 'data' ];
// Set off the standby mode when close an event
$event = events_get_event ( $id_event );
alerts_agent_module_standby ( $event [ 'id_alert_am' ], 0 );
$result = events_validate_event ( $id_event , false , $text );
if ( $result ) {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => 'Correct validation' ));
}
else {
2012-04-26 16:42:48 +02:00
returnError ( 'Error in validation operation.' );
2011-09-25 19:26:36 +02:00
}
}
2012-06-22 14:19:05 +02:00
function get_events_with_user ( $trash1 , $trash2 , $other , $returnType , $user_in_db ) {
2011-09-12 13:28:32 +02:00
global $config ;
//By default.
$status = 3 ;
$search = '' ;
$event_type = '' ;
$severity = - 1 ;
$id_agent = - 1 ;
$id_agentmodule = - 1 ;
$id_alert_am = - 1 ;
$id_event = - 1 ;
$id_user_ack = 0 ;
$event_view_hr = 0 ;
$tag = '' ;
$group_rep = 0 ;
$offset = 0 ;
$pagination = 40 ;
$utimestamp_upper = 0 ;
$utimestamp_bottom = 0 ;
$filter = otherParameter2Filter ( $other , true );
if ( isset ( $filter [ 'criticity' ]))
$severity = $filter [ 'criticity' ];
if ( isset ( $filter [ 'id_agente' ]))
$id_agent = $filter [ 'id_agente' ];
if ( isset ( $filter [ 'id_agentmodule' ]))
$id_agentmodule = $filter [ 'id_agentmodule' ];
if ( isset ( $filter [ 'id_alert_am' ]))
$id_alert_am = $filter [ 'id_alert_am' ];
if ( isset ( $filter [ 'id_usuario' ]))
$id_user_ack = $filter [ 'id_usuario' ];
2011-09-26 16:29:55 +02:00
if ( isset ( $filter [ 'estado' ]))
$status = $filter [ 'estado' ];
if ( isset ( $filter [ 'evento' ]))
$search = $filter [ 'evento' ];
2011-09-12 13:28:32 +02:00
if ( isset ( $filter [ 'limit' ]))
$pagination = $filter [ 'limit' ];
if ( isset ( $filter [ 'offset' ]))
$offset = $filter [ 'offset' ];
2012-09-13 19:47:21 +02:00
if ( isset ( $filter [ 'id_group' ])) {
2012-05-24 21:37:24 +02:00
$id_group = $filter [ 'id_group' ];
//A little hack to make the query fetch all groups and not only "All" (with id=0)
if ( $id_group == 0 )
$id_group = - 1 ;
}
if ( isset ( $filter [ 'tag' ]))
$tag = $filter [ 'tag' ];
2012-05-29 10:55:51 +02:00
if ( isset ( $filter [ 'event_type' ]))
$event_type = $filter [ 'event_type' ];
2011-09-22 21:02:46 +02:00
if ( $filter [ 'utimestamp' ]) {
if ( isset ( $filter [ 'utimestamp' ][ '>' ])) {
$utimestamp_upper = $filter [ 'utimestamp' ][ '>' ];
}
if ( isset ( $filter [ 'utimestamp' ][ '<' ])) {
$utimestamp_bottom = $filter [ 'utimestamp' ][ '<' ];
}
}
2011-09-12 13:28:32 +02:00
//TODO MOVE THIS CODE AND THE CODE IN pandora_console/operation/events/events_list.php
//to a function.
$groups = users_get_groups ( $user_in_db , " IR " );
2012-02-06 18:21:11 +01:00
$is_admin = ( bool ) db_get_value ( 'is_admin' , 'tusuario' , 'id_user' , $user_in_db );
2011-09-12 13:28:32 +02:00
2012-04-25 20:09:05 +02:00
$sql_post = '' ;
2012-02-06 18:21:11 +01:00
if ( ! empty ( $groups )) {
$sql_post = " AND id_grupo IN ( " . implode ( " , " , array_keys ( $groups )) . " ) " ;
}
else if ( $is_admin ) {
$sql_post = " AND 1 = 0 " ;
}
2011-09-12 13:28:32 +02:00
// Skip system messages if user is not PM
if ( ! check_acl ( $user_in_db , 0 , " PM " )) {
$sql_post .= " AND id_grupo != 0 " ;
}
switch ( $status ) {
case 0 :
case 1 :
case 2 :
$sql_post .= " AND estado = " . $status ;
break ;
case 3 :
$sql_post .= " AND (estado = 0 OR estado = 2) " ;
break ;
}
if ( $search != " " ) {
$sql_post .= " AND evento LIKE '% " . io_safe_input ( $search ) . " %' " ;
}
if ( $event_type != " " ) {
// If normal, warning, could be several (going_up_warning, going_down_warning... too complex
// for the user so for him is presented only "warning, critical and normal"
if ( $event_type == " warning " || $event_type == " critical " || $event_type == " normal " ) {
$sql_post .= " AND event_type LIKE '% $event_type %' " ;
}
elseif ( $event_type == " not_normal " ) {
2012-05-29 10:55:51 +02:00
$sql_post .= " AND ( event_type LIKE '%warning%'
OR event_type LIKE '%critical%' OR event_type LIKE '%unknown%' ) " ;
2011-09-12 13:28:32 +02:00
}
else {
$sql_post .= " AND event_type = ' " . $event_type . " ' " ;
}
}
if ( $severity != - 1 )
$sql_post .= " AND criticity = " . $severity ;
if ( $id_agent != - 1 )
$sql_post .= " AND id_agente = " . $id_agent ;
if ( $id_agentmodule != - 1 )
$sql_post .= " AND id_agentmodule = " . $id_agentmodule ;
if ( $id_alert_am != - 1 )
$sql_post .= " AND id_alert_am = " . $id_alert_am ;
if ( $id_event != - 1 )
2012-04-26 16:42:48 +02:00
$sql_post .= " AND id_evento = " . $id_event ;
2011-09-12 13:28:32 +02:00
if ( $id_user_ack != " 0 " )
2012-04-26 16:42:48 +02:00
$sql_post .= " AND id_usuario = ' " . $id_user_ack . " ' " ;
2011-09-12 13:28:32 +02:00
if ( $utimestamp_upper != 0 )
2012-04-26 16:42:48 +02:00
$sql_post .= " AND utimestamp >= " . $utimestamp_upper ;
2011-09-12 13:28:32 +02:00
if ( $utimestamp_bottom != 0 )
2012-04-26 16:42:48 +02:00
$sql_post .= " AND utimestamp <= " . $utimestamp_bottom ;
2011-09-12 13:28:32 +02:00
if ( $event_view_hr > 0 ) {
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
//Put hours in seconds
$unixtime = get_system_time () - ( $event_view_hr * SECONDS_1HOUR );
2012-04-26 16:42:48 +02:00
$sql_post .= " AND (utimestamp > " . $unixtime . " OR estado = 2) " ;
2011-09-12 13:28:32 +02:00
}
//Search by tag
if ( $tag != " " ) {
2012-04-26 16:42:48 +02:00
$sql_post .= " AND tags LIKE '% " . io_safe_input ( $tag ) . " %' " ;
2011-09-12 13:28:32 +02:00
}
if ( $group_rep == 0 ) {
switch ( $config [ " dbtype " ]) {
case " mysql " :
2011-09-21 22:43:24 +02:00
if ( $filter [ 'total' ]) {
$sql = " SELECT COUNT(*)
FROM tevento
2012-04-26 16:42:48 +02:00
WHERE 1 = 1 " . $sql_post ;
2011-09-21 22:43:24 +02:00
}
2011-09-23 22:46:33 +02:00
else if ( $filter [ 'more_criticity' ]) {
$sql = " SELECT criticity
FROM tevento
2012-04-26 16:42:48 +02:00
WHERE 1 = 1 " . $sql_post . " ORDER BY criticity DESC LIMIT 1 " ;
2011-09-23 22:46:33 +02:00
}
2011-09-21 22:43:24 +02:00
else {
$sql = " SELECT *,
( SELECT t1 . nombre FROM tagente AS t1 WHERE t1 . id_agente = tevento . id_agente ) AS agent_name ,
( SELECT t2 . nombre FROM tgrupo AS t2 WHERE t2 . id_grupo = tevento . id_grupo ) AS group_name ,
2012-08-31 10:44:10 +02:00
( SELECT t2 . icon FROM tgrupo AS t2 WHERE t2 . id_grupo = tevento . id_grupo ) AS group_icon ,
( SELECT tmodule . name FROM tmodule WHERE id_module IN ( SELECT tagente_modulo . id_modulo FROM tagente_modulo
WHERE tagente_modulo . id_agente_modulo = tevento . id_agentmodule )) AS module_name
2012-04-26 12:03:53 +02:00
FROM tevento
2012-04-26 16:42:48 +02:00
WHERE 1 = 1 " . $sql_post . " ORDER BY utimestamp DESC LIMIT " . $offset . " , " . $pagination ;
2011-09-21 22:43:24 +02:00
}
2011-09-12 13:28:32 +02:00
break ;
case " postgresql " :
2011-09-21 22:43:24 +02:00
//TODO TOTAL
2011-09-15 12:12:32 +02:00
$sql = " SELECT *,
( SELECT t1 . nombre FROM tagente AS t1 WHERE t1 . id_agente = tevento . id_agente ) AS agent_name ,
2011-09-15 15:19:11 +02:00
( SELECT t2 . nombre FROM tgrupo AS t2 WHERE t2 . id_grupo = tevento . id_grupo ) AS group_name ,
2012-08-31 10:44:10 +02:00
( SELECT t2 . icon FROM tgrupo AS t2 WHERE t2 . id_grupo = tevento . id_grupo ) AS group_icon ,
( SELECT tmodule . name FROM tmodule WHERE id_module IN ( SELECT tagente_modulo . id_modulo FROM tagente_modulo
WHERE tagente_modulo . id_agente_modulo = tevento . id_agentmodule )) AS module_name
2011-09-12 13:28:32 +02:00
FROM tevento
2012-04-26 16:42:48 +02:00
WHERE 1 = 1 " . $sql_post . " ORDER BY utimestamp DESC LIMIT " . $pagination . " OFFSET " . $offset ;
2011-09-12 13:28:32 +02:00
break ;
case " oracle " :
2011-09-21 22:43:24 +02:00
//TODO TOTAL
2011-09-12 13:28:32 +02:00
$set = array ();
$set [ 'limit' ] = $pagination ;
$set [ 'offset' ] = $offset ;
2011-09-15 12:12:32 +02:00
$sql = " SELECT *,
( SELECT t1 . nombre FROM tagente AS t1 WHERE t1 . id_agente = tevento . id_agente ) AS agent_name ,
2011-09-15 15:19:11 +02:00
( SELECT t2 . nombre FROM tgrupo AS t2 WHERE t2 . id_grupo = tevento . id_grupo ) AS group_name ,
2012-08-31 10:44:10 +02:00
( SELECT t2 . icon FROM tgrupo AS t2 WHERE t2 . id_grupo = tevento . id_grupo ) AS group_icon ,
( SELECT tmodule . name FROM tmodule WHERE id_module IN ( SELECT tagente_modulo . id_modulo FROM tagente_modulo
WHERE tagente_modulo . id_agente_modulo = tevento . id_agentmodule )) AS module_name
2011-09-12 13:28:32 +02:00
FROM tevento
WHERE 1 = 1 " . $sql_post . " ORDER BY utimestamp DESC " ;
$sql = oracle_recode_query ( $sql , $set );
break ;
}
}
else {
switch ( $config [ " dbtype " ]) {
case " mysql " :
db_process_sql ( 'SET group_concat_max_len = 9999999' );
$sql = " SELECT *, MAX(id_evento) AS id_evento, GROUP_CONCAT(DISTINCT user_comment SEPARATOR '') AS user_comment,
2012-04-26 12:03:53 +02:00
MIN ( estado ) AS min_estado , MAX ( estado ) AS max_estado , COUNT ( * ) AS event_rep , MAX ( utimestamp ) AS timestamp_rep
2011-09-12 13:28:32 +02:00
FROM tevento
WHERE 1 = 1 " . $sql_post . "
GROUP BY evento , id_agentmodule
ORDER BY timestamp_rep DESC LIMIT " . $offset . " , " . $pagination ;
break ;
case " postgresql " :
$sql = " SELECT *, MAX(id_evento) AS id_evento, array_to_string(array_agg(DISTINCT user_comment), '') AS user_comment,
2012-04-26 12:03:53 +02:00
MIN ( estado ) AS min_estado , MAX ( estado ) AS max_estado , COUNT ( * ) AS event_rep , MAX ( utimestamp ) AS timestamp_rep
2011-09-12 13:28:32 +02:00
FROM tevento
WHERE 1 = 1 " . $sql_post . "
GROUP BY evento , id_agentmodule
ORDER BY timestamp_rep DESC LIMIT " . $pagination . " OFFSET " . $offset ;
break ;
case " oracle " :
$set = array ();
$set [ 'limit' ] = $pagination ;
$set [ 'offset' ] = $offset ;
// TODO: Remove duplicate user comments
$sql = " SELECT a.*, b.event_rep, b.timestamp_rep
FROM ( SELECT * FROM tevento WHERE 1 = 1 " . $sql_post . " ) a ,
( SELECT MAX ( id_evento ) AS id_evento , to_char ( evento ) AS evento ,
id_agentmodule , COUNT ( * ) AS event_rep , MIN ( estado ) AS min_estado , MAX ( estado ) AS max_estado ,
LISTAGG ( user_comment , '' ) AS user_comment , MAX ( utimestamp ) AS timestamp_rep
FROM tevento
WHERE 1 = 1 " . $sql_post . "
GROUP BY to_char ( evento ), id_agentmodule ) b
WHERE a . id_evento = b . id_evento AND
to_char ( a . evento ) = to_char ( b . evento )
AND a . id_agentmodule = b . id_agentmodule " ;
$sql = oracle_recode_query ( $sql , $set );
break ;
}
}
if ( $other [ 'type' ] == 'string' ) {
if ( $other [ 'data' ] != '' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else { //Default values
$separator = ';' ;
}
}
else if ( $other [ 'type' ] == 'array' ) {
$separator = $other [ 'data' ][ 0 ];
}
2012-10-03 15:04:56 +02:00
2011-09-12 13:28:32 +02:00
$result = db_get_all_rows_sql ( $sql );
2011-09-23 22:46:33 +02:00
if (( $result !== false ) && ( ! $filter [ 'total' ]) && ( ! $filter [ 'more_criticity' ])) {
2011-09-15 15:19:11 +02:00
//Add the description and image
foreach ( $result as $key => $row ) {
2011-09-21 22:43:24 +02:00
//FOR THE TEST THE API IN THE ANDROID
//$row['evento'] = $row['id_evento'];
2011-09-15 15:19:11 +02:00
$row [ 'description_event' ] = events_print_type_description ( $row [ " event_type " ], true );
$row [ 'img_description' ] = events_print_type_img ( $row [ " event_type " ], true , true );
$row [ 'criticity_name' ] = get_priority_name ( $row [ " criticity " ]);
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
$urlImage = ui_get_full_url ( false );
2011-09-15 15:19:11 +02:00
switch ( $row [ " criticity " ]) {
default :
case 0 :
$img_sev = $urlImage . " /images/status_sets/default/severity_maintenance.png " ;
break ;
case 1 :
$img_sev = $urlImage . " /images/status_sets/default/severity_informational.png " ;
break ;
case 2 :
$img_sev = $urlImage . " /images/status_sets/default/severity_normal.png " ;
break ;
case 3 :
$img_sev = $urlImage . " /images/status_sets/default/severity_warning.png " ;
break ;
case 4 :
$img_sev = $urlImage . " /images/status_sets/default/severity_critical.png " ;
break ;
}
$row [ 'img_criticy' ] = $img_sev ;
$result [ $key ] = $row ;
}
}
2011-09-12 13:28:32 +02:00
$data [ 'type' ] = 'array' ;
$data [ 'data' ] = $result ;
returnData ( $returnType , $data , $separator );
2012-08-17 17:28:55 +02:00
if ( empty ( $result ))
return false ;
return true ;
2011-09-12 13:28:32 +02:00
}
2010-05-27 17:34:29 +02:00
/**
*
* @ param $trash1
* @ param $trah2
* @ param $other
* @ param $returnType
2011-09-12 13:28:32 +02:00
* @ param $user_in_db
2010-05-27 17:34:29 +02:00
*/
2012-06-14 17:07:40 +02:00
function api_get_events ( $trash1 , $trash2 , $other , $returnType , $user_in_db = null ) {
2011-09-12 13:28:32 +02:00
if ( $user_in_db !== null ) {
2012-08-17 17:28:55 +02:00
$correct = get_events_with_user ( $trash1 , $trash2 , $other , $returnType , $user_in_db );
2012-04-25 20:09:05 +02:00
$last_error = error_get_last ();
2012-08-17 17:28:55 +02:00
if ( ! $correct && ! empty ( $last_error )) {
2012-04-27 14:52:33 +02:00
$errors = array ( E_ERROR , E_WARNING , E_USER_ERROR ,
E_USER_WARNING );
if ( in_array ( $last_error [ 'type' ], $errors )) {
returnError ( 'ERROR_API_PANDORAFMS' , $returnType );
}
2012-04-25 20:09:05 +02:00
}
2011-09-12 13:28:32 +02:00
return ;
}
2012-08-17 13:39:25 +02:00
2010-05-27 17:34:29 +02:00
if ( $other [ 'type' ] == 'string' ) {
if ( $other [ 'data' ] != '' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else { //Default values
$separator = ';' ;
}
}
else if ( $other [ 'type' ] == 'array' ) {
$separator = $other [ 'data' ][ 0 ];
2012-08-17 13:39:25 +02:00
2010-05-27 17:34:29 +02:00
$filterString = otherParameter2Filter ( $other );
}
2012-08-17 13:39:25 +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
$dataRows = db_get_all_rows_filter ( 'tevento' , $filterString );
2012-04-25 20:09:05 +02:00
$last_error = error_get_last ();
2012-08-17 13:39:25 +02:00
if ( empty ( $dataRows )) {
if ( ! empty ( $last_error )) {
returnError ( 'ERROR_API_PANDORAFMS' , $returnType );
return ;
}
2012-04-25 20:09:05 +02:00
}
2012-08-17 13:39:25 +02:00
2010-05-27 17:34:29 +02:00
$data [ 'type' ] = 'array' ;
$data [ 'data' ] = $dataRows ;
returnData ( $returnType , $data , $separator );
return ;
}
2009-12-08 21:21:16 +01:00
/**
* Delete user .
*
* @ param $id string Username to delete .
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_delete_user ( $id , $thrash1 , $thrash2 , $thrash3 ) {
2009-12-08 21:21:16 +01:00
if ( ! delete_user ( $id ))
returnError ( 'error_delete_user' , 'Error delete user' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Delete user.' )));
}
/**
* Add user to profile and group .
*
* @ param $id string Username to delete .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < group > ; < profile > in this
* order and separator char ( after text ; ) and separator ( pass in param
* othermode as othermode = url_encode_separator_ < separator > )
* example :
*
2012-01-12 16:33:52 +01:00
* api . php ? op = set & op2 = add_user_profile & id = example_user_name & other = 12 | 4 & other_mode = url_encode_separator_ |
2009-12-08 21:21:16 +01:00
*
* @ param $thrash2 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_add_user_profile ( $id , $thrash1 , $other , $thrash2 ) {
2009-12-08 21:21:16 +01:00
$group = $other [ 'data' ][ 0 ];
$profile = $other [ 'data' ][ 1 ];
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
if ( ! profile_create_user_profile ( $id , $profile , $group , 'API' ))
2009-12-08 21:21:16 +01:00
returnError ( 'error_add_user_profile' , 'Error add user profile.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Add user profile.' )));
}
/**
* Deattach user from group and profile .
*
* @ param $id string Username to delete .
* @ param $thrash1 Don ' t use .
* @ param array $other it ' s array , $other as param is < group > ; < profile > in this
* order and separator char ( after text ; ) and separator ( pass in param
* othermode as othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = delete_user_profile & id = md & other = 12 | 4 & other_mode = url_encode_separator_ |
*
* @ param $thrash2 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_delete_user_profile ( $id , $thrash1 , $other , $thrash2 ) {
2009-12-08 21:21:16 +01:00
$group = $other [ 'data' ][ 0 ];
$profile = $other [ 'data' ][ 1 ];
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_events.php, include/functions_messages.php,
include/auth/mysql.php, include/functions_api.php,
include/functions_incidents.php, include/functions_db.php,
operation/incidents/incident_detail.php,
operation/snmpconsole/snmp_view.php, operation/reporting/graph_viewer.php,
godmode/groups/group_list.php, godmode/agentes/module_manager.php,
godmode/agentes/configurar_agente.php, godmode/agentes/planned_downtime.php,
godmode/servers/recon_script.php, godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php, godmode/snmpconsole/snmp_alert.php,
godmode/snmpconsole/snmp_filters.php,
godmode/modules/manage_network_templates_form.php: change the source code
for to use process_sql_delete instead of the SQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4070 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-08 17:12:58 +01:00
$where = array (
'id_usuario' => $id ,
'id_perfil' => $profile ,
'id_grupo' => $group );
* 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_process_sql_delete ( 'tusuario_perfil' , $where );
2009-12-08 21:21:16 +01:00
if ( $return === false )
returnError ( 'error_delete_user_profile' , 'Error delete user profile.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Delete user profile.' )));
}
/**
* Create new incident in Pandora .
*
* @ param $thrash1 Don ' t use .
* @ param $thrash2 Don ' t use .
* @ param array $other it ' s array , $other as param is < title > ; < description > ;
* < origin > ; < priority > ; < state > ; < group > in this order and separator char
* ( after text ; ) and separator ( pass in param othermode as
* othermode = url_encode_separator_ < separator > )
* example :
*
* api . php ? op = set & op2 = new_incident & other = titulo | descripcion % 20 texto | Logfiles | 2 | 10 | 12 & other_mode = url_encode_separator_ |
*
* @ param $thrash3 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_new_incident ( $thrash1 , $thrash2 , $other , $thrash3 ) {
2009-12-08 21:21:16 +01:00
$title = $other [ 'data' ][ 0 ];
$description = $other [ 'data' ][ 1 ];
$origin = $other [ 'data' ][ 2 ];
$priority = $other [ 'data' ][ 3 ];
$id_creator = 'API' ;
$state = $other [ 'data' ][ 4 ];
$group = $other [ 'data' ][ 5 ];
2011-03-08 19:11:56 +01:00
$values = array (
'inicio' => 'NOW()' ,
'actualizacion' => 'NOW()' ,
'titulo' => $title ,
'descripcion' => $description ,
'id_usuario' => 'API' ,
'origen' => $origin ,
'estado' => $state ,
'prioridad' => $priority ,
'id_grupo' => $group ,
'id_creator' => $id_creator );
* 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
$idIncident = db_process_sql_insert ( 'tincidencia' , $values );
2009-12-08 21:21:16 +01:00
if ( $return === false )
returnError ( 'error_new_incident' , 'Error create new incident.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $idIncident ));
}
/**
* Add note into a incident .
*
* @ param $id string Username author of note .
* @ param $id2 integer ID of incident .
* @ param $other string Note .
* @ param $thrash2 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_new_note_incident ( $id , $id2 , $other , $thrash2 ) {
2011-03-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_db.php,
extensions/update_manager.php, extensions/plugin_registration.php,
operation/incidents/incident.php, operation/incidents/incident_detail.php,
godmode/agentes/planned_downtime.php, godmode/servers/recon_script.php,
godmode/snmpconsole/snmp_filters.php, godmode/setup/news.php,
godmode/modules/manage_network_templates_form.php: change the source code
for to use process_sql_insert instead of the SQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4067 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-08 15:43:45 +01:00
$values = array (
'id_usuario' => $id ,
'id_incident' => $id2 ,
'nota' => $other [ '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
$idNote = db_process_sql_insert ( 'tnota' , $values );
2009-12-08 21:21:16 +01:00
if ( $idNote === false )
returnError ( 'error_new_incident' , 'Error create new incident.' );
else
returnData ( 'string' , array ( 'type' => 'string' , 'data' => $idNote ));
}
2011-10-05 13:19:20 +02:00
/**
* Disable a module , given agent and module name .
*
* @ param string $agent_name Name of agent .
* @ param string $module_name Name of the module
* @ param $thrash3 Don ' t use .
* @ param $thrash4 Don ' t use .
// http://localhost/pandora_console/include/api.php?op=set&op2=enable_module&id=garfio&id2=Status
*/
2012-06-14 17:07:40 +02:00
function api_set_disable_module ( $agent_name , $module_name , $thrast3 , $thrash4 ) {
2011-10-05 13:19:20 +02:00
$id_agent = agents_get_agent_id ( $agent_name );
$id_agent_module = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'id_agente' => $id_agent , 'nombre' => $module_name ));
2013-03-04 15:41:26 +01:00
$result = modules_change_disabled ( $id_agent_module , 1 );
if ( $result === NOERR ) {
2013-02-14 13:55:53 +01:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Correct module disable' )));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Error disabling module' )));
}
2011-10-05 13:19:20 +02:00
}
/**
* Enable a module , given agent and module name .
*
* @ param string $agent_name Name of agent .
* @ param string $module_name Name of the module
* @ param $thrash3 Don ' t use .
* @ param $thrash4 Don ' t use .
*/
2012-06-14 17:07:40 +02:00
function api_set_enable_module ( $agent_name , $module_name , $thrast3 , $thrash4 ) {
2011-10-05 13:19:20 +02:00
$id_agent = agents_get_agent_id ( $agent_name );
$id_agent_module = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'id_agente' => $id_agent , 'nombre' => $module_name ));
2013-03-04 15:41:26 +01:00
$result = modules_change_disabled ( $id_agent_module , 1 );
if ( $result === NOERR ) {
2013-02-14 13:55:53 +01:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Correct module enable' )));
}
else {
returnData ( 'string' , array ( 'type' => 'string' , 'data' => __ ( 'Error enabling module' )));
}
2011-10-05 13:19:20 +02:00
}
/**
2011-12-07 10:02:36 +01:00
* Disable an alert
2011-10-05 13:19:20 +02:00
*
* @ param string $agent_name Name of agent ( for example " myagent " )
* @ param string $module_name Name of the module ( for example " Host alive " )
* @ param string $template_name Name of the alert template ( for example , " Warning event " )
* @ param $thrash4 Don ' t use .
// http://localhost/pandora_console/include/api.php?op=set&op2=disable_alert&id=garfio&id2=Status&other=Warning%20condition
*/
2012-06-14 17:07:40 +02:00
function api_set_disable_alert ( $agent_name , $module_name , $template_name , $thrash4 ) {
2013-03-04 15:41:26 +01:00
2011-10-05 13:19:20 +02:00
$id_agent = agents_get_agent_id ( $agent_name );
$id_agent_module = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'id_agente' => $id_agent , 'nombre' => $module_name ));
2013-03-04 15:41:26 +01:00
$id_template = db_get_value_filter ( 'id' , 'talert_templates' , array ( 'name' => $template_name [ " data " ]));
db_process_sql ( " UPDATE talert_template_modules
SET disabled = 1
WHERE id_agent_module = $id_agent_module AND id_alert_template = $id_template " );
2011-10-05 13:19:20 +02:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => " Correct alert disable " ));
}
/**
2011-12-07 10:02:36 +01:00
* Enable an alert
2011-10-05 13:19:20 +02:00
*
* @ param string $agent_name Name of agent ( for example " myagent " )
* @ param string $module_name Name of the module ( for example " Host alive " )
* @ param string $template_name Name of the alert template ( for example , " Warning event " )
* @ param $thrash4 Don ' t use .
// http://localhost/pandora_console/include/api.php?op=set&op2=enable_alert&id=garfio&id2=Status&other=Warning%20condition
*/
2012-06-14 17:07:40 +02:00
function api_set_enable_alert ( $agent_name , $module_name , $template_name , $thrash4 ) {
2013-03-04 15:41:26 +01:00
2011-10-05 13:19:20 +02:00
$id_agent = agents_get_agent_id ( $agent_name );
$id_agent_module = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'id_agente' => $id_agent , 'nombre' => $module_name ));
2013-03-04 15:41:26 +01:00
$id_template = db_get_value_filter ( 'id' , 'talert_templates' , array ( 'name' => $template_name [ " data " ]));
db_process_sql ( " UPDATE talert_template_modules
SET disabled = 0
WHERE id_agent_module = $id_agent_module AND id_alert_template = $id_template " );
2011-10-05 13:19:20 +02:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => " Correct alert enable " ));
}
2011-12-07 10:02:36 +01:00
/**
* Disable all the alerts of one module
*
* @ param string $agent_name Name of agent ( for example " myagent " )
* @ param string $module_name Name of the module ( for example " Host alive " )
* @ param $thrash3 Don ' t use .
* @ param $thrash4 Don ' t use .
// http://localhost/pandora_console/include/api.php?op=set&op2=disable_module_alerts&id=garfio&id2=Status
*/
2012-06-14 17:07:40 +02:00
function api_set_disable_module_alerts ( $agent_name , $module_name , $thrash3 , $thrash4 ) {
2013-03-04 15:41:26 +01:00
2011-12-07 10:02:36 +01:00
$id_agent = agents_get_agent_id ( $agent_name );
$id_agent_module = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'id_agente' => $id_agent , 'nombre' => $module_name ));
2013-03-04 15:41:26 +01:00
db_process_sql ( " UPDATE talert_template_modules
SET disabled = 1
WHERE id_agent_module = $id_agent_module " );
2011-12-07 10:02:36 +01:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => " Correct alerts disable " ));
}
/**
* Enable all the alerts of one module
*
* @ param string $agent_name Name of agent ( for example " myagent " )
* @ param string $module_name Name of the module ( for example " Host alive " )
* @ param $thrash3 Don ' t use .
* @ param $thrash4 Don ' t use .
// http://localhost/pandora_console/include/api.php?op=set&op2=enable_module_alerts&id=garfio&id2=Status
*/
2012-06-14 17:07:40 +02:00
function api_set_enable_module_alerts ( $agent_name , $module_name , $thrash3 , $thrash4 ) {
2013-03-04 15:41:26 +01:00
2011-12-07 10:02:36 +01:00
$id_agent = agents_get_agent_id ( $agent_name );
$id_agent_module = db_get_value_filter ( 'id_agente_modulo' , 'tagente_modulo' , array ( 'id_agente' => $id_agent , 'nombre' => $module_name ));
2013-03-04 15:41:26 +01:00
db_process_sql ( " UPDATE talert_template_modules
SET disabled = 0
WHERE id_agent_module = $id_agent_module " );
2011-12-07 10:02:36 +01:00
returnData ( 'string' , array ( 'type' => 'string' , 'data' => " Correct alerts enable " ));
}
2011-10-05 13:19:20 +02:00
2012-05-31 19:03:03 +02:00
function get_tags ( $thrash1 , $thrash2 , $other , $returnType , $user_in_db ) {
if ( $other [ 'type' ] == 'string' ) {
if ( $other [ 'data' ] != '' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else { //Default values
$separator = ';' ;
}
}
else if ( $other [ 'type' ] == 'array' ) {
$separator = $other [ 'data' ][ 0 ];
}
$tags = tags_get_all_tags ();
$data_tags = array ();
foreach ( $tags as $id => $tag ) {
$data_tags [] = array ( $id , $tag );
}
$data [ 'type' ] = 'array' ;
$data [ 'data' ] = $data_tags ;
returnData ( $returnType , $data , $separator );
}
2012-08-31 10:44:10 +02:00
/**
2012-09-18 15:32:54 +02:00
* Total modules for a group given
2012-08-31 10:44:10 +02:00
*
* @ param int $id_group
*
**/
2012-09-18 15:32:54 +02:00
// http://localhost/pandora_console/include/api.php?op=get&op2=total_modules&id=1&apipass=1234&user=admin&pass=pandora
function api_get_total_modules ( $id_group , $trash1 , $trash2 , $returnType ) {
2013-03-04 15:41:26 +01:00
$sql = " SELECT COUNT(*)
FROM tagente_modulo
WHERE id_module_group = $id_group " ;
2012-08-31 10:44:10 +02:00
$total = db_get_value_sql ( $sql );
2013-03-04 15:41:26 +01:00
2012-08-31 10:44:10 +02:00
$data = array ( 'type' => 'string' , 'data' => $total );
2012-09-18 15:32:54 +02:00
returnData ( $returnType , $data );
2012-08-31 10:44:10 +02:00
}
/**
* Total modules for a given group
*
* @ param int $id_group
*
**/
2012-09-18 15:32:54 +02:00
// http://localhost/pandora_console/include/api.php?op=get&op2=total_agents&id=2&apipass=1234&user=admin&pass=pandora
function api_get_total_agents ( $id_group , $trash1 , $trash2 , $returnType ) {
2013-03-04 15:41:26 +01:00
$sql = sprintf ( ' SELECT COUNT ( * )
FROM tagente
WHERE id_grupo =% d AND disabled = 0 ' , $id_group );
2012-09-18 15:32:54 +02:00
$total_agents = db_get_value_sql ( $sql );
2013-03-04 15:41:26 +01:00
2012-09-18 15:32:54 +02:00
$data = array ( 'type' => 'string' , 'data' => $total_agents );
returnData ( $returnType , $data );
2012-08-31 10:44:10 +02:00
}
/**
* Agent name for a given id
*
* @ param int $id_group
*
**/
2012-09-18 15:32:54 +02:00
// http://localhost/pandora_console/include/api.php?op=get&op2=agent_name&id=1&apipass=1234&user=admin&pass=pandora
function api_get_agent_name ( $id_agent , $trash1 , $trash2 , $returnType ) {
2012-08-31 10:44:10 +02:00
2013-03-04 15:41:26 +01:00
$sql = sprintf ( ' SELECT nombre
FROM tagente
WHERE id_agente = % d ' , $id_agent );
$value = db_get_value_sql ( $sql );
2012-08-31 10:44:10 +02:00
if ( $value === false ) {
returnError ( 'id_not_found' , $returnType );
}
$data = array ( 'type' => 'string' , 'data' => $value );
2013-03-04 15:41:26 +01:00
2012-09-18 15:32:54 +02:00
returnData ( $returnType , $data );
2012-08-31 10:44:10 +02:00
}
/**
* Module name for a given id
*
* @ param int $id_group
*
**/
2012-09-18 15:32:54 +02:00
// http://localhost/pandora_console/include/api.php?op=get&op2=module_name&id=20&apipass=1234&user=admin&pass=pandora
function api_get_module_name ( $id_module , $trash1 , $trash2 , $returnType ) {
2012-08-31 10:44:10 +02:00
$sql = sprintf ( 'SELECT name FROM tmodule WHERE id_module = %d' , $id_module );
$value = db_get_value_sql ( $sql );
if ( $value === false ) {
returnError ( 'id_not_found' , $returnType );
}
$data = array ( 'type' => 'string' , 'data' => $value );
2012-09-18 15:32:54 +02:00
returnData ( $returnType , $data );
2012-08-31 10:44:10 +02:00
}
2012-09-18 15:32:54 +02:00
// http://localhost/pandora_console/include/api.php?op=get&op2=alert_action_by_group&id=3&id2=1&apipass=1234&user=admin&pass=pandora
function api_get_alert_action_by_group ( $id_group , $id_action , $trash2 , $returnType ) {
2013-03-04 15:41:26 +01:00
$sql = " SELECT SUM(internal_counter)
FROM talert_template_modules
WHERE id_alert_template IN
( SELECT id
FROM talert_templates
WHERE id_group = $id_group AND id_alert_action = $id_action ) " ;
2012-08-31 10:44:10 +02:00
$value = db_get_value_sql ( $sql );
2013-03-04 15:41:26 +01:00
2012-08-31 10:44:10 +02:00
if ( $value === false ) {
returnError ( 'data_not_found' , $returnType );
2012-09-20 15:45:23 +02:00
}
else if ( $value == '' ) {
2012-09-18 15:32:54 +02:00
$value = 0 ;
2012-08-31 10:44:10 +02:00
}
$data = array ( 'type' => 'string' , 'data' => $value );
2012-09-18 15:32:54 +02:00
returnData ( $returnType , $data );
2012-08-31 10:44:10 +02:00
}
2012-09-19 13:28:57 +02:00
// http://localhost/pandora_console/include/api.php?op=get&op2=event_info&id=58&apipass=1234&user=admin&pass=pandora
function api_get_event_info ( $id_event , $trash1 , $trash , $returnType ) {
2013-03-04 15:41:26 +01:00
2012-09-19 13:28:57 +02:00
$sql = " SELECT * FROM tevento WHERE id_evento= $id_event " ;
$event_data = db_get_row_sql ( $sql );
$i = 0 ;
2012-09-19 17:28:15 +02:00
foreach ( $event_data as $key => $data ) {
if ( $i == 0 )
$result = $key . ': ' . $data . '<br>' ;
else
$result .= $key . ': ' . $data . '<br>' ;
2012-09-19 13:28:57 +02:00
$i ++ ;
}
2013-03-04 15:41:26 +01:00
2012-09-19 13:28:57 +02:00
$data = array ( 'type' => 'string' , 'data' => $result );
returnData ( $returnType , $data );
return ;
}
2012-10-03 15:04:56 +02:00
//http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_event&id=name_event&other=2|system|3|admin|2|1|10|0|comments||Pandora||critical_inst|warning_inst|unknown_inst|other&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
2012-09-19 17:28:15 +02:00
function api_set_create_event ( $id , $trash1 , $other , $returnType ) {
2013-03-04 15:41:26 +01:00
2012-09-19 13:28:57 +02:00
if ( $other [ 'type' ] == 'string' ) {
returnError ( 'error_parameter' , 'Error in the parameters.' );
return ;
}
else if ( $other [ 'type' ] == 'array' ) {
$values = array ();
2013-03-04 15:41:26 +01:00
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 0 ] != '' ) {
2013-03-04 15:41:26 +01:00
$values [ 'event' ] = $other [ 'data' ][ 0 ];
}
else {
returnError ( 'error_parameter' , 'Event text required.' );
return ;
2012-10-03 15:04:56 +02:00
}
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 1 ] != '' ) {
$values [ 'id_grupo' ] = $other [ 'data' ][ 1 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
returnError ( 'error_parameter' , 'Group ID required.' );
2012-10-03 15:04:56 +02:00
return ;
}
2013-03-04 15:41:26 +01:00
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 2 ] != '' ) {
2012-10-03 15:04:56 +02:00
$values [ 'id_agente' ] = $other [ 'data' ][ 2 ];
2013-03-04 15:41:26 +01:00
}
else {
returnError ( 'error_parameter' , 'Agent ID required.' );
return ;
}
2013-02-27 15:25:24 +01:00
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 3 ] != '' ) {
$values [ 'status' ] = $other [ 'data' ][ 3 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$values [ 'status' ] = 0 ;
2013-03-04 15:41:26 +01:00
}
2013-02-27 15:25:24 +01:00
2013-03-04 15:41:26 +01:00
$values [ 'id_usuario' ] = $other [ 'data' ][ 4 ];
2013-02-27 15:25:24 +01:00
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 5 ] != '' ) {
$values [ 'event_type' ] = $other [ 'data' ][ 5 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$values [ 'event_type' ] = " unknown " ;
}
if ( $other [ 'data' ][ 6 ] != '' ) {
$values [ 'priority' ] = $other [ 'data' ][ 6 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$values [ 'priority' ] = 0 ;
2013-01-16 16:55:50 +01:00
}
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 7 ] != '' ) {
$values [ 'id_agentmodule' ] = $other [ 'data' ][ 7 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$value [ 'id_agentemodule' ] = 0 ;
}
2013-02-27 15:25:24 +01:00
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 8 ] != '' ) {
$values [ 'id_alert_am' ] = $other [ 'data' ][ 8 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$values [ 'id_alert_am' ] = 0 ;
2013-02-27 15:25:24 +01:00
}
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 9 ] != '' ) {
$values [ 'critical_instructions' ] = $other [ 'data' ][ 9 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$values [ 'critical_instructions' ] = '' ;
2012-09-19 13:28:57 +02:00
}
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 10 ] != '' ) {
$values [ 'warning_instructions' ] = $other [ 'data' ][ 10 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$values [ 'warning_instructions' ] = '' ;
2012-09-19 13:28:57 +02:00
}
2012-10-03 15:04:56 +02:00
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 11 ] != '' ) {
$values [ 'unknown_instructions' ] = $other [ 'data' ][ 11 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$values [ 'unknown_instructions' ] = '' ;
2012-10-03 15:04:56 +02:00
}
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 14 ] != '' ) {
$values [ 'source' ] = $other [ 'data' ][ 14 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$values [ 'source' ] = " Pandora " ;
2012-10-03 15:04:56 +02:00
}
2012-09-19 13:28:57 +02:00
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 15 ] != '' ) {
$values [ 'tags' ] = $other [ 'data' ][ 15 ];
2013-03-04 15:41:26 +01:00
}
else {
2013-02-27 17:03:22 +01:00
$values [ 'tags' ] = " " ;
}
2012-09-19 13:28:57 +02:00
2013-02-27 17:03:22 +01:00
$return = events_create_event ( $values [ 'event' ], $values [ 'id_grupo' ], $values [ 'id_agente' ],
$values [ 'status' ], $values [ 'id_usuario' ], $values [ 'event_type' ],
$values [ 'priority' ], $value [ 'id_agentemodule' ], $values [ 'id_alert_am' ],
$values [ 'critical_instructions' ], $values [ 'warning_instructions' ],
$values [ 'unknown_instructions' ], $values [ 'source' ], $values [ 'tags' ]);
2013-03-04 15:41:26 +01:00
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 12 ] != '' ) { //user comments
2013-01-16 13:33:45 +01:00
if ( $return !== false ) { //event successfully created
2013-02-27 17:03:22 +01:00
$user_comment = $other [ 'data' ][ 12 ];
2013-01-16 13:33:45 +01:00
$res = events_comment ( $return , $user_comment );
2013-02-27 17:03:22 +01:00
if ( $other [ 'data' ][ 13 ] != '' ) { //owner user
2013-01-16 13:33:45 +01:00
if ( $res !== false ) { //comment added
2013-02-27 17:03:22 +01:00
$owner_user = $other [ 'data' ][ 13 ];
2013-01-16 13:33:45 +01:00
events_change_owner ( $return , $owner_user , true );
}
}
}
}
2012-09-19 13:28:57 +02:00
$data [ 'type' ] = 'string' ;
if ( $return === false ) {
$data [ 'data' ] = 0 ;
}
else {
$data [ 'data' ] = $return ;
}
2012-09-19 17:28:15 +02:00
returnData ( $returnType , $data );
2012-10-03 15:04:56 +02:00
return ;
2012-09-19 13:28:57 +02:00
}
}
2012-09-19 17:28:15 +02:00
// http://localhost/pandora_console/include/api.php?op=get&op2=tactical_view&apipass=1234&user=admin&pass=pandora
function api_get_tactical_view ( $trash1 , $trash2 , $trash3 , $returnType ) {
$tactical_info = reporting_get_group_stats ();
$i = 0 ;
foreach ( $tactical_info as $key => $data ) {
if ( $i == 0 )
$result = $key . ': ' . $data . '<br>' ;
else
$result .= $key . ': ' . $data . '<br>' ;
2013-02-27 15:25:24 +01:00
2012-09-19 17:28:15 +02:00
$i ++ ;
}
2013-02-27 15:25:24 +01:00
2012-09-19 17:28:15 +02:00
$data = array ( 'type' => 'string' , 'data' => $result );
returnData ( $returnType , $data );
return ;
}
2012-10-02 13:11:58 +02:00
2012-12-13 12:04:12 +01:00
// http://localhost/pandora_console/include/api.php?op=get&op2=netflow_get_data&other=1348562410|1348648810|0|base64_encode(json_encode($filter))|none|50|bytes&other_mode=url_encode_separator_|&apipass=pandora&user=pandora&pass=pandora'
2012-10-02 13:11:58 +02:00
function api_get_netflow_get_data ( $discard_1 , $discard_2 , $params ) {
// Parse function parameters
$start_date = $params [ 'data' ][ 0 ];
$end_date = $params [ 'data' ][ 1 ];
2012-10-11 17:52:26 +02:00
$interval_length = $params [ 'data' ][ 2 ];
$filter = json_decode ( base64_decode ( $params [ 'data' ][ 3 ]), true );
2012-12-13 12:04:12 +01:00
$aggregate = $params [ 'data' ][ 4 ];
$max = $params [ 'data' ][ 5 ];
$unit = $params [ 'data' ][ 6 ];
2012-10-02 13:11:58 +02:00
// Get netflow data
2012-12-13 12:04:12 +01:00
$data = netflow_get_data ( $start_date , $end_date , $interval_length , $filter , $aggregate , $max , $unit );
2013-02-27 15:25:24 +01:00
2012-10-02 13:11:58 +02:00
returnData ( 'json' , $data );
return ;
}
// http://localhost/pandora_console/include/api.php?op=get&op2=netflow_get_stats&other=1348562410|1348648810|base64_encode(json_encode($filter))|none|50|bytes&other_mode=url_encode_separator_|&apipass=pandora&user=pandora&pass=pandora'
function api_get_netflow_get_stats ( $discard_1 , $discard_2 , $params ) {
// Parse function parameters
$start_date = $params [ 'data' ][ 0 ];
$end_date = $params [ 'data' ][ 1 ];
$filter = json_decode ( base64_decode ( $params [ 'data' ][ 2 ]), true );
$aggregate = $params [ 'data' ][ 3 ];
$max = $params [ 'data' ][ 4 ];
$unit = $params [ 'data' ][ 5 ];
// Get netflow data
2012-10-04 12:53:22 +02:00
$data = netflow_get_stats ( $start_date , $end_date , $filter , $aggregate , $max , $unit );
2013-02-27 15:25:24 +01:00
2012-10-02 13:11:58 +02:00
returnData ( 'json' , $data );
return ;
}
2012-12-13 12:04:12 +01:00
// http://localhost/pandora_console/include/api.php?op=get&op2=netflow_get_summary&other=1348562410|1348648810|_base64_encode(json_encode($filter))&other_mode=url_encode_separator_|&apipass=pandora&user=pandora&pass=pandora'
2012-10-02 13:11:58 +02:00
function api_get_netflow_get_summary ( $discard_1 , $discard_2 , $params ) {
// Parse function parameters
$start_date = $params [ 'data' ][ 0 ];
$end_date = $params [ 'data' ][ 1 ];
$filter = json_decode ( base64_decode ( $params [ 'data' ][ 2 ]), true );
// Get netflow data
2012-12-13 12:04:12 +01:00
$data = netflow_get_summary ( $start_date , $end_date , $filter );
2012-10-02 13:11:58 +02:00
returnData ( 'json' , $data );
return ;
}
2012-10-15 10:44:40 +02:00
//http://localhost/pandora_console/include/api.php?op=set&op2=validate_event_by_id&id=23&apipass=1234&user=admin&pass=pandora
function api_set_validate_event_by_id ( $id , $trash1 , $trash2 , $returnType ) {
global $config ;
$data [ 'type' ] = 'string' ;
$check_id = db_get_value ( 'id_evento' , 'tevento' , 'id_evento' , $id );
2013-02-27 15:25:24 +01:00
if ( $check_id ) { //event exists
2012-10-15 10:44:40 +02:00
$status = db_get_value ( 'estado' , 'tevento' , 'id_evento' , $id );
if ( $status == 1 ) { //event already validated
$data [ 'data' ] = " Event already validated " ;
2013-02-27 15:25:24 +01:00
}
else {
2012-10-15 10:44:40 +02:00
$ack_utimestamp = time ();
2013-02-27 15:25:24 +01:00
2012-10-30 12:48:28 +01:00
events_comment ( $id , '' , " Change status to validated " );
2013-02-27 15:25:24 +01:00
2012-10-15 10:44:40 +02:00
$values = array (
'ack_utimestamp' => $ack_utimestamp ,
'estado' => 1
);
2013-02-27 15:25:24 +01:00
2012-10-15 10:44:40 +02:00
$result = db_process_sql_update ( 'tevento' , $values , array ( 'id_evento' => $id ));
2013-02-27 15:25:24 +01:00
2012-10-15 10:44:40 +02:00
if ( $result === false ) {
$data [ 'data' ] = " Error validating event " ;
}
else {
$data [ 'data' ] = " Event validate " ;
}
}
2013-02-27 15:25:24 +01:00
}
else {
2012-10-15 10:44:40 +02:00
$data [ 'data' ] = " Event not exists " ;
}
2013-02-27 15:25:24 +01:00
2012-10-15 10:44:40 +02:00
returnData ( $returnType , $data );
2013-02-27 15:25:24 +01:00
return ;
2012-10-15 10:44:40 +02:00
}
2012-12-19 09:48:12 +01:00
/**
*
* @ param $trash1
* @ param $trash2
* @ param array $other it ' s array , but only < csv_separator > is available .
* @ param $returnType
*
*/
// http://localhost/pandora_console/include/api.php?op=get&op2=pandora_servers&return_type=csv&apipass=1234&user=admin&pass=pandora
function api_get_pandora_servers ( $trash1 , $trash2 , $other , $returnType ) {
2013-02-27 15:25:24 +01:00
2012-12-19 09:48:12 +01:00
if ( ! isset ( $other [ 'data' ][ 0 ]))
$separator = ';' ; // by default
else
$separator = $other [ 'data' ][ 0 ];
2013-02-27 15:25:24 +01:00
2012-12-19 09:48:12 +01:00
$servers = servers_get_info ();
2013-02-27 15:25:24 +01:00
2012-12-19 09:48:12 +01:00
foreach ( $servers as $server ) {
$dd = array (
'name' => $server [ " name " ],
'status' => $server [ " status " ],
'type' => $server [ " type " ],
'master' => $server [ " master " ],
'modules' => $server [ " modules " ],
'modules_total' => $server [ " modules_total " ],
'lag' => $server [ " lag " ],
'module_lag' => $server [ " module_lag " ],
'threads' => $server [ " threads " ],
'queued_modules' => $server [ " queued_modules " ],
'keepalive' => $server [ 'keepalive' ]
);
2013-02-27 15:25:24 +01:00
2012-12-19 09:48:12 +01:00
// servers_get_info() returns "<a http:....>servername</a>" for recon server's name.
// i don't know why and the following line is a temprary workaround...
$dd [ " name " ] = preg_replace ( '/<[^>]*>/' , " " , $dd [ " name " ]);
2013-02-27 15:25:24 +01:00
2012-12-19 09:48:12 +01:00
switch ( $dd [ 'type' ]) {
case " snmp " :
case " event " :
$dd [ 'modules' ] = '' ;
$dd [ 'modules_total' ] = '' ;
$dd [ 'lag' ] = '' ;
$dd [ 'module_lag' ] = '' ;
break ;
case " export " :
$dd [ 'lag' ] = '' ;
$dd [ 'module_lag' ] = '' ;
break ;
default :
break ;
}
2013-02-27 15:25:24 +01:00
2012-12-19 09:48:12 +01:00
$returnVar [] = $dd ;
}
2013-02-27 15:25:24 +01:00
2012-12-19 09:48:12 +01:00
$data = array ( 'type' => 'array' , 'data' => $returnVar );
2013-02-27 15:25:24 +01:00
2012-12-19 09:48:12 +01:00
returnData ( $returnType , $data , $separator );
return ;
}
2011-08-31 08:36:36 +02:00
?>