cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to ensure OneAgent is connected to environment ActiveGate

pratap_gangwani
Frequent Guest
I am using the SAAS trial version of Dynatrace. I installed One Agent to one of our ec2 instance. I was able to see the host under deployment status. I tried installing an active gate to another ec2 instance and was able to install it. I can see it under the deployment status screen under active gate but now I'm not able to see the one agent host under the one agent screen of deployment status. Both the ec2 instances are on the same VPC. I'm able to see the host where I've installed one agent under the Infrastructure menu under the hosts screen. 
 
My question is, is there a way we can ensure that our one agent talks or is connected to the active gate ?
7 REPLIES 7

Karolina_Linda
Community Team
Community Team

Hello, @pratap_gangwani!

 

I moved your question to the Dynatrace Open Q&A forum for better visibility, so Community experts can answer your question faster 🙂

 

Don't hesitate to ask any further questions in the Community 👋

 

Have a great free trial experience!

Karolina

 

 

Keep calm and build Community!

andre_vdveen
DynaMight Champion
DynaMight Champion

Hi @pratap_gangwani 

 

A best practice is to first install the ActiveGates, after which OneAgents are deployed. However, it is possible to reconfigure a OneAgent to point to a different ActiveGate or SaaS tenant, by using the oneagentctl command-line interface. https://www.dynatrace.com/support/help/shortlink/oneagentctl#oneagent-communication

 

To see the current communication endpoint, you can use the --get-server parameter: https://www.dynatrace.com/support/help/shortlink/oneagentctl#show-current-communication-endpoints

If you installed the OneAgent more than 3 days ago, remember to turn the slider "Show only recently connected hosts (last 3 days)" off, to show all connected agents.

Zbigniew_Wroble
Dynatrace Helper
Dynatrace Helper

Hi  @pratap_gangwani!

When Agent is visible on "Deployment status -> OneAgents" you can see there 
"Currently used ActiveGates".  You can also find the agents by filter: "ActiveGate used by host".

You can also check what agents are connected to ActiveGate. 

Go to Deployment status -> ActiveGates,
unfold ActiveGate and  find "Number of currently connected hosts".
If the number is 0 then no Agent is connected. 
If the number is > 0 , click the number and you will see the list of all Agents using this ActiveGate. 

If you do not see the OneAgent on DeploymentStatus You can check AG logs.
AG reports number of agents' processes reporting data through the AG,  to dynatracegateway_Debug.0.0.log. (The number is bigger than the number of OneAgents) Search for "Active agents:".
The number is reported every 10 minutes. So you can verify if there were  any agent connected.

You can also download AG diagnostic data and check /debugui/Agentlist.html, but the ids on the list are runtime, they change every time when the reporting process is restarted.

Hi @Zbigniew_Wroble , thanks for the details. Now I'm sure that my one agent is not connected to active gate. I've installed one agent prior to installing active gate. What steps should I follow to connect my existing agent to active gate?

Zbigniew_Wroble
Dynatrace Helper
Dynatrace Helper

Hi  @pratap_gangwani,
If OneAgent can connect to Server directly then the order of installation does not matter.  When you install ActiveGate :
1. AG recognizes its network interfaces and reports them to Server,
2 Server updates endpoint list and sends it  to  connected Agents,
3 Agents switch to Environment ActiveGate, because it has a bigger priority than a direct connection. 
If the OneAgent cannot connect to the ActiveGate, then it returns to a direct connection with the SaaS tenant (Server). 

Order of installation has meaning when Agent cannot directly connect to Server. In that case you need to install EAG, and after that download OneAgent installer and use it. It is important because OneAgent installer contains a list of endpoints: Servers and AGs . Without the working and connected AG, the list contains only Servers.  OneAgent notes connection between endpoints, you can see it in OneAgent logs.

And now about your problem.:
1. Ensure that you did not define networkZone, or that it is the same for OneAgent and ActiveGate
2. on Deployment status you can see addresses of AG, you should also see these addresses in OneAgent logs and status of the connection, probably with some error, which can help you figure out what is happening.
3. ensure that the AG addresses are reachable from the OneAgent host, you can use URL:  https://<AG>:9999/rest/health

the response should be
RUNNING
AG has self-signed certificate , so you need appropriate option during the test to accept it.
e.g. --insecure for curl





pvr
Participant

@Zbigniew_Wroble :  how does --set-server = HTTPS://activegate:9999/   change this behaviour ? 

 

We use that on one host, and no it longer seems to connect via direct communication to SaaS if the AG is not available or not reachable

 

theharithsa
Dynatrace Champion
Dynatrace Champion

HI @pvr
To connect to ActiveGate you can simply use network zones concept and point the communication to be done in the perticular network zone where your activate belongs to. This will solves the connectivity problem between OneAgent and ActiveGate. Even if you install OneAgent before or after installing ActiveGate. 

Even a simple restart of OneAgent service will do the trick if the port 9999 is opened for communication with the existing ActiveGate endpoint. 

Love more, hate less; Technology for all, together we grow.

Featured Posts