$agent['id_agente'], 'name' => io_safe_output($agent['nombre']), 'ip' => io_safe_output($agent['direccion'])); } echo json_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 json_encode($out); } return; } // Load global vars enterprise_include ('godmode/agentes/agent_manager.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)) $server_name = reset(array_keys($servers)); } echo '