14 Aug 2020 03:54 PM - last edited on 25 May 2023 10:18 AM by Karolina_Linda
Hello,
In my servers, when I use the command ./oneagentctl --get-server it returns multiple servers and --set-server="" does not work.
How can I define a single remote server for my One Agent ?
#./oneagentctl --get-server
https://dynatraceactivegate:9999/communication;https://dynatracecluster1:9999/communication;https://dynatracecluster2:9999/communication
#./oneagentctl --set-server="" --restart-service
Stopping OneAgent service
Server address changed to ""
Starting OneAgent service
#./oneagentctl --get-server
https://dynatraceactivegate:9999/communication;https://dynatracecluster1:9999/communication;https://dynatracecluster2:9999/communication
#./oneagentctl --set-server="https://dynatraceactivegate.preprod:9999" --restart-service
Stopping OneAgent service
Server address changed to "https://dynatraceactivegate.preprod:9999"
Starting OneAgent service
#./oneagentctl --get-server
https://dynatraceactivegate:9999/communication;https://dynatracecluster1:9999/communication;https://dynatracecluster2:9999/communication;https://dynatraceactivegate.preprod:9999
Thanks.
Regards,
Solved! Go to Solution.
14 Aug 2020 04:18 PM
From what I have gathered as we see the --set-server adds it to the endpoints but the cluster is still going to be keeping the agent up to date with the available endpoints in order to improve availability. There doesn't appear to be a supported way to manually configure a single endpoint like what you're looking for.
What would be the recommended/supported way to approach this now would be to make use of network zones, then you can add the preprod activegate to one zone and set the network zone on these agents to the same one. Then they'll use that endpoint to communicate.
17 Aug 2020 07:18 AM
Hello James,
Thank you for your attention.
I would like to clean up the endpoints using the --set-server because the One Agent has no access to the other endpoints.
I already activate the network zones, it works like a charm.
19 Aug 2020 06:02 AM
Hi Mikael,
oneagentctl --set-server overrides the endpoint stored in the configuration file, allowing you to specify where the agent should connect to upon next connection attempt.
However, once the agent establishes a connection it will fetch the list of endpoints from the cluster and override the entry in config file. It's not possible to permanently override / extend the list of endpoints agent-side.
Considering your use-case, the network zones are the way to go.
19 Aug 2020 04:32 PM
19 Aug 2020 05:08 PM
The file location, and the file contents, are an implementation detail.
You can query the list of stored endpoints using --get-server parameter.
I'm not sure if the agent continuously attempting connection to non-working endpoints is an expected behavior. I'd suggest that you open a support ticket or use in-product chat to ask for clarification.