# Is it possible to set host groups yet without the need for reinstall?

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-set-host-groups-yet-without-the-need-for-reinstall/19115>\
**Category:** Open Q&A\
**Tags:** oneagent, hosts-classic\
**Created:** [April 22, 2020, 6:32pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-host-groups-yet-without-the-need-for-reinstall/19115 "2020-04-22T18:32:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![larry\_roberts](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/larry_roberts/32/7131_2.png) [@larry\_roberts](https://community.dynatrace.com/u/larry_roberts)\
**Post date:** [April 22, 2020, 6:32pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-host-groups-yet-without-the-need-for-reinstall/19115/1 "2020-04-22T18:32:50Z")

</div>

Anyone know if it is possible yet to set a host group for the first time on OneAgents which currently exist without the need for reinstall?

Thanks!

---

<div class="post-metadata">

**Author:** ![kyle\_kowalski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kyle_kowalski/32/26560_2.png) [@kyle\_kowalski](https://community.dynatrace.com/u/kyle_kowalski)\
**Post date:** [April 22, 2020, 6:59pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-host-groups-yet-without-the-need-for-reinstall/19115/2 "2020-04-22T18:59:20Z")

</div>

Hi Larry,  
You can use the OneAgent CLI that is located with the OneAgent.

[https://www.dynatrace.com/support/help/setup-and-configuration/dynatrace-oneagent/oneagent-configuration-via-command-line-interface/](https://www.dynatrace.com/support/help/setup-and-configuration/dynatrace-oneagent/oneagent-configuration-via-command-line-interface/?_ga=2.172235107.1911660990.1587490673-1286931383.1565379656)

Best,  
Kyle

---

<div class="post-metadata">

**Author:** ![larry\_roberts](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/larry_roberts/32/7131_2.png) [@larry\_roberts](https://community.dynatrace.com/u/larry_roberts)\
**Post date:** [April 22, 2020, 7:20pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-host-groups-yet-without-the-need-for-reinstall/19115/3 "2020-04-22T19:20:13Z")

</div>

Right, but I think that is only if you installed the OneAgent and called out a host group at that time. I am wondering if it is possible to now use that to configure a host group on OneAgents where host group was never used before without the need to reinstall.

---

<div class="post-metadata">

**Author:** ![kyle\_kowalski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kyle_kowalski/32/26560_2.png) [@kyle\_kowalski](https://community.dynatrace.com/u/kyle_kowalski)\
**Post date:** [April 22, 2020, 7:43pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-host-groups-yet-without-the-need-for-reinstall/19115/4 "2020-04-22T19:43:01Z")

</div>

I believe so, however this still requires an agent restart

---

<div class="post-metadata">

**Author:** ![dave\_mauney](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dave_mauney/32/27784_2.png) [@dave\_mauney](https://community.dynatrace.com/u/dave_mauney)\
**Post date:** [April 22, 2020, 7:54pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-host-groups-yet-without-the-need-for-reinstall/19115/5 "2020-04-22T19:54:30Z")

</div>

Yes, you can set it via --set-host-group and there is even a convenient --restart-service you can add to do the stop/change/start of the oneagent service from a one liner, so it looks like this:

./oneagentctl --set-host-group EasyTravel\_WebServer\_Dev --restart-service

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [April 22, 2020, 8:07pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-host-groups-yet-without-the-need-for-reinstall/19115/6 "2020-04-22T20:07:28Z")

</div>

yes thats correct, you can but it will require a recycle of the oneagent process/Service FYI. Even if you did not define the host group at the time of install.

---

<div class="post-metadata">

**Author:** ![larry\_roberts](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/larry_roberts/32/7131_2.png) [@larry\_roberts](https://community.dynatrace.com/u/larry_roberts)\
**Post date:** [April 22, 2020, 8:32pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-host-groups-yet-without-the-need-for-reinstall/19115/7 "2020-04-22T20:32:48Z")

</div>

Nice! Have to love that. Thanks!
