From 26e4b46b1fa0e3661e3a0337e7e643ed9662a8c7 Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Fri, 24 Nov 2023 12:26:59 +0100 Subject: [PATCH] Removed agent_alias from agent_data --- pandora_server/util/plugin/pandora_demo_agents.pl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandora_server/util/plugin/pandora_demo_agents.pl b/pandora_server/util/plugin/pandora_demo_agents.pl index 8469a84a93..d58472aa66 100644 --- a/pandora_server/util/plugin/pandora_demo_agents.pl +++ b/pandora_server/util/plugin/pandora_demo_agents.pl @@ -171,10 +171,6 @@ sub parse_ini_file { $ini_data{'agent_data'}{'agents_number'} = 1; } - if(!defined($ini_data{'agent_data'}{'agent_alias'})) { - $ini_data{'agent_data'}{'agent_alias'} = $ini_data{'agent_data'}{'agent_name'}; - } - if(!defined($ini_data{'agent_data'}{'group'})) { $ini_data{'agent_data'}{'group'} = ''; } @@ -432,7 +428,7 @@ sub generate_agent($) { # Get agent info my $agent; $agent->{'agent_name'} = $sorted_ini[$current_ini]->{'agent_data'}->{'agent_name'}.'-'.$agents_indexes[$current_ini]; - $agent->{'agent_alias'} = $sorted_ini[$current_ini]->{'agent_data'}->{'agent_alias'}.'-'.$agents_indexes[$current_ini]; + $agent->{'agent_alias'} = $sorted_ini[$current_ini]->{'agent_data'}->{'agent_name'}.'-'.$agents_indexes[$current_ini]; $agent->{'group'} = $sorted_ini[$current_ini]->{'agent_data'}->{'group'}; $agent->{'interval'} = $cfg->{'agents_interval'}; $agent->{'timestamp'} = $timestamp;