$agent['id_agente'], 'name' => io_safe_output($agent['nombre']), 'ip' => io_safe_output($agent['direccion'])); } echo io_json_mb_encode($data); return; } $get_modules_json_for_multiple_snmp = (bool) get_parameter("get_modules_json_for_multiple_snmp", 0); if ($get_modules_json_for_multiple_snmp) { require_once ('include/graphs/functions_utils.php'); $idSNMP = get_parameter('id_snmp'); $id_snmp_serialize = get_parameter('id_snmp_serialize'); $snmp = unserialize_in_temp($id_snmp_serialize, false); $oid_snmp = array(); $out = false; foreach ($idSNMP as $id) { foreach ($snmp[$id] as $key => $value) { // Check if it has "ifXXXX" syntax and skip it if (! preg_match ( "/if/", $key)) { continue; } $oid_snmp[$value['oid']] = $key; } if ($out === false) { $out = $oid_snmp; } else { $out = array_intersect($out,$oid_snmp); } $oid_snmp = array(); } echo io_json_mb_encode($out); } return; } // Load global vars enterprise_include ('godmode/agentes/agent_manager.php'); require_once ('include/functions_clippy.php'); require_once ('include/functions_servers.php'); require_once ('include/functions_gis.php'); require_once($config['homedir'] . "/include/functions_agents.php"); require_once ($config['homedir'] . '/include/functions_users.php'); ui_require_javascript_file('openlayers.pandora'); $new_agent = (bool) get_parameter ('new_agent'); if (! isset ($id_agente) && ! $new_agent) { db_pandora_audit("ACL Violation", "Trying to access agent manager witout an agent"); require ("general/noaccess.php"); return; } if ($new_agent) { if (! empty ($direccion_agente) && empty ($nombre_agente)) $nombre_agente = $direccion_agente; $servers = servers_get_names(); if (!empty($servers)) { $array_keys_servers = array_keys($servers); $server_name = reset($array_keys_servers); } } if (!$new_agent) { // Agent remote configuration editor enterprise_include_once('include/functions_config_agents.php'); if (enterprise_installed()) { $filename = config_agents_get_agent_config_filenames($id_agente); } } $disk_conf_delete = (bool) get_parameter ('disk_conf_delete'); // Agent remote configuration DELETE if ($disk_conf_delete) { //TODO: Get this working on computers where the Pandora server(s) are not on the webserver //TODO: Get a remote_config editor working in the open version @unlink ($filename['md5']); @unlink ($filename['conf']); } echo '
'; ui_require_jquery_file('pandora.controls'); ui_require_jquery_file('ajaxqueue'); ui_require_jquery_file('bgiframe'); ?>