cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Looking to upgrade from Dynatrace Managed to SaaS? See how

Define a single remote server for OneAgent through oneagentctl command

mikael_le-bras
Visitor

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,

5 REPLIES 5

JamesKitson
Dynatrace Guru
Dynatrace Guru

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.

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.

Tomasz_Gajger
Dynatrace Champion
Dynatrace Champion

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.

Hi Tomasz,

Do you know where the file modified by oneagentctl --set-server is located?

Agent cannot establish connection to cluster members, only one ActiveGate is available for this agent.

I am already using network zones, but the agent sends DNS queries to members every second.

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.

Featured Posts