31 Dec 2024 04:38 PM - last edited on 02 Jan 2025 12:20 PM by Karolina_Linda
hello,
Is there a way to display the port that OneAgent using from the Dynatrace tenant?
Thanks
Solved! Go to Solution.
31 Dec 2024 07:27 PM
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
02 Jan 2025 02:25 PM
Thanks for your information
02 Jan 2025 09:31 AM
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.
02 Jan 2025 02:23 PM
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
02 Jan 2025 11:44 PM
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
02 Jan 2025 12:13 PM
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)
02 Jan 2025 02:46 PM
thanks for your help, i will try this command
06 Jan 2025 10:15 AM
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.