diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 700a2026c1..9cabe15b47 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -135,6 +135,10 @@ $id_agent = get_parameter( 'filter[id_agent]', $filter['id_agent'] ); +$text_module = get_parameter( + 'filter[text_module]', + $filter['text_module'] +); $id_agent_module = get_parameter( 'filter[id_agent_module]', $filter['id_agent_module'] @@ -210,10 +214,38 @@ $id_source_event = get_parameter( $filter['id_source_event'] ); +$server_id = get_parameter( + 'filter[server_id]', + $filter['id_server_meta'] +); + +if (is_metaconsole()) { + // Connect to node database. + $id_node = $server_id; + if ($id_node != 0) { + if (metaconsole_connect(null, $id_node) != NOERR) { + return false; + } + } +} + + if (empty($text_agent) && !empty($id_agent)) { $text_agent = agents_get_alias($id_agent); } +if (empty($text_module) && !empty($id_agent_module)) { + $text_module = modules_get_agentmodule_name($id_agent_module); + $text_agent = agents_get_alias(modules_get_agentmodule_agent($id_agent_module)); +} + +if (is_metaconsole()) { + // Return to metaconsole database. + if ($id_node != 0) { + metaconsole_restore_db(); + } +} + // Ajax responses. if (is_ajax()) { $get_events = get_parameter('get_events', 0);