From 09e16575839b6631a394f28a614a2e302acd7ad7 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 1 Feb 2017 12:47:45 +0100 Subject: [PATCH] fixed error CLI --- pandora_server/util/pandora_manage.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f63ca9d5ee..13d9ad4104 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -4261,19 +4261,20 @@ sub cli_update_group() { ############################################################################### -# Locate agent in any Nodes of metaconsole +# Returns the Nodes ID where the agent is defined (Metaconsole only) # Related option: --locate_agent ############################################################################### sub cli_locate_agent () { my ($agent_name) = @ARGV[2]; - + if (is_metaconsole($conf) == 1) { + my $agents_server = enterprise_hook('get_metaconsole_agent',[$dbh, $agent_name]); - + if (scalar(@{$agents_server}) != 0) { foreach my $agent (@{$agents_server}) { - my $server = enterprise_hook('get_metaconsole_setup_server_id',[$dbh, $agent->{'server_name'}]); - print " $server \n\n " + #my $server = enterprise_hook('get_metaconsole_setup_server_id',[$dbh, $agent->{'server_name'}]); + print $agent->{'id_tmetaconsole_setup'} . "\n"; } } else {