# Change OneAgent monitoring ports

**URL:** <https://community.dynatrace.com/t/change-oneagent-monitoring-ports/43842>\
**Category:** Open Q&A\
**Tags:** oneagent\
**Created:** [January 25, 2024, 10:35pm UTC](https://community.dynatrace.com/t/change-oneagent-monitoring-ports/43842 "2024-01-25T22:35:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DAVID\_MTZ](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@DAVID\_MTZ](https://community.dynatrace.com/u/DAVID_MTZ)\
**Post date:** [January 25, 2024, 10:35pm UTC](https://community.dynatrace.com/t/change-oneagent-monitoring-ports/43842/1 "2024-01-25T22:35:52Z")

</div>

Hi Dynatrace community

I need to change the monitoring port for oneagent, do you know what is the command to change the monitoring port? the monitoring ports that use oneagent are 50000 to 60000, we need to change this ports because the customer ocupate this ports for your application.

Could you help us please.

---

<div class="post-metadata">

**Author:** ![DAVID\_MTZ](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@DAVID\_MTZ](https://community.dynatrace.com/u/DAVID_MTZ)\
**Post date:** [January 25, 2024, 9:22pm UTC](https://community.dynatrace.com/t/change-oneagent-monitoring-ports/43842/2 "2024-01-25T21:22:57Z")

</div>

Hi Dynatrace community

I need to change the monitoring port for oneagent, do you know what is the command to change the monitoring port? the monitoring ports that use oneagent are 50000 to 60000, we need to change this ports because the customer ocupate this ports for your application.

Could you help us please.

Best regard.

---

<div class="post-metadata">

**Author:** ![kobecharles](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kobecharles/32/25438_2.png) [@kobecharles](https://community.dynatrace.com/u/kobecharles)\
**Post date:** [January 25, 2024, 11:38pm UTC](https://community.dynatrace.com/t/change-oneagent-monitoring-ports/43842/3 "2024-01-25T23:38:44Z")

</div>

The ports the oneagentos service uses should be picked at random from available ports on the host itself and it might also change every few minutes as we switch from endpoint to endpoint. But you can change the watch dog port so it doesn’t clash with the monitoring ports the customer is using.

Use the&nbsp;--set-watchdog-portrange=arg&nbsp;parameter to change the watchdog listening port range to&nbsp;\<arg\>. The&nbsp;\<arg\>&nbsp;must contain two port numbers separated by a colon (:). For example&nbsp;50000:50100. The maximum supported port range is from 1024 to 65535. The port range must cover at least 4 ports. The port number starting the range must be lower.

- **Linux** &nbsp;or&nbsp; **AIX** :  
./oneagentctl --set-watchdog-portrange=50000:50100
- **Windows** :  
.\oneagentctl.exe --set-watchdog-portrange=50000:50100

---

<div class="post-metadata">

**Author:** ![DAVID\_MTZ](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@DAVID\_MTZ](https://community.dynatrace.com/u/DAVID_MTZ)\
**Post date:** [January 25, 2024, 11:52pm UTC](https://community.dynatrace.com/t/change-oneagent-monitoring-ports/43842/4 "2024-01-25T23:52:50Z")

</div>

Hi Kobecharles

Tank you very much for the help, this command that you indicatedus is perfect

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [January 26, 2024, 7:11am UTC](https://community.dynatrace.com/t/change-oneagent-monitoring-ports/43842/5 "2024-01-26T07:11:57Z")

</div>

Hi  
Check this

> **[OneAgent configuration via command-line interface](https://docs.dynatrace.com/docs/ingest-from/dynatrace-oneagent/oneagent-configuration-via-command-line-interface)**
>
> Learn how to perform some OneAgent configuration tasks without the need to reinstall OneAgent.
