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

Display the current port that OneAgent uses from the Dynatrace tenant

joanne_quan
Participant

hello,

Is there a way to display the port that OneAgent using from the Dynatrace tenant? 

Thanks

8 REPLIES 8

ChadTurner
DynaMight Legend
DynaMight Legend

Dynatrace OneAgent Uses 9999 From the OneAgent on the host to the ActiveGate. The ActiveGate uses 443 to connect to the Dynatrace Tenant. If you forgo the ActiveGate, your OneAgent will communicate over 443 to the Tenant directly.

https://docs.dynatrace.com/docs/shortlink/sgw-availability 

-Chad

Thanks for your information

RohitBisht
Dynatrace Advisor
Dynatrace Advisor

At the moment there is no way to do so. Curious to know the reason you need to know the port agent is running on. Could you share please.

RB

hello RohitBisht,

Thanks for your reply,  in our case, sometimes the application/database is using the port range > 51000 and  OneAgent watchdog attempts to open the first available port between port 50000 and 50100.  In this case we need to change the config file using the following command

./oneagentctl --set-watchdog-portrange=50000:50100

however, the port failed to connected nightly on the server due to conflict.  So i just want to know if there is a way we can see the port that OneAgent is using without looking at the config file setup on the server.

Thanks,

Joanne

sia_h
Dynatrace Champion
Dynatrace Champion

You can use the DQL query I have provided to list the ports used by the OneAgent Watchdog.

Please note that with OneAgent version 1.301 the OneAgent doesn't use the TCP ports for its own inter-process communication.

https://docs.dynatrace.com/docs/shortlink/oneagentctl#set-a-new-port-range

sia_h
Dynatrace Champion
Dynatrace Champion

Besides what Chad mentioned, you can list the listenPorts of the OneAgent processes:

fetch dt.entity.process_group_instance
| fields entity.name, listenPorts, softwareTechnologies
| filter matchesPhrase(softwareTechnologies, "type:DYNATRACE")
| filter isNotNull(listenPorts)

 

thanks for your help,  i will try this command

Julius_Loman
DynaMight Legend
DynaMight Legend

Currently it's not possible to get the current "remote" port of Dynatrace AG or Environment as @RohitBisht states. The best you can do is to query the Environment Deployment API -  connection info. This will provide you with all possible endpoints to which OneAgent can try to connect. Local port is always dynamic as with TCP connections. There is no way to supply local TCP port with OneAgent. Also if you have multiple deep monitored processes, each one may connect to different endpoints.  OneAgents reconnect regularly between endpoints to load balance for example. There are options to set the endpoint (--set-server or environment variables, depending on OneAgent type), but I'd not recommend touching it unless inevitable.

The watchdog ports are something different and yes those are local ports for watchdog, you can set them, but those are not used for communication towards the cluster.


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts