# Host group assignment

**URL:** <https://community.dynatrace.com/t/host-group-assignment/43937>\
**Category:** Open Q&A\
**Tags:** hosts-classic\
**Created:** [February 1, 2024, 6:54pm UTC](https://community.dynatrace.com/t/host-group-assignment/43937 "2024-02-01T18:54:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlos\_carreno](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/carlos_carreno/32/28820_2.png) [@carlos\_carreno](https://community.dynatrace.com/u/carlos_carreno)\
**Post date:** [February 1, 2024, 6:54pm UTC](https://community.dynatrace.com/t/host-group-assignment/43937/1 "2024-02-01T18:54:52Z")

</div>

Good afternoon everyone, I need your support in understanding a scenario when I am assigning the host group to a group of HOSTs

I am assigning a host group to a group of hosts via commands:

.\oneagentctl.exe --set-host-group=xxxxxxxx --restart-service

“When checking through this other command, it seems that this feature was indeed assigned to the host.”

.\oneagentctl.exe --get-host-group

![carlos_carreno_1-1706813402128.png](https://global.discourse-cdn.com/dynatrace/optimized/3X/a/0/a0da02907c3c3dd8ff43b340349c9a5f7cf36c9f_2_690x52.png)

Despite having assigned it to the host in that order, when I go to the interface to visualize the data, it doesn’t appear.

 ![carlos_carreno_2-1706813473001.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/df49a35eafffc44ddf198a40227be992e8867914.png)

**Example of how it should appear.**

 ![carlos_carreno_3-1706813501608.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/9/d97a12b13d2c14ad825f33b18c2a3dc938a1e25c.png)

Additionally, there is a host that appears assigned to this host group, but the command has never been executed on it.

Thank you for your valuable help and guidance. Many thanks.

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [February 1, 2024, 8:21pm UTC](https://community.dynatrace.com/t/host-group-assignment/43937/2 "2024-02-01T20:21:24Z")

</div>

In my own experience, the host-group, when set after installation, takes a while to reflect in UI.

For how long are you waiting before check the host-group assignment in UI?

---

<div class="post-metadata">

**Author:** ![carlos\_carreno](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/carlos_carreno/32/28820_2.png) [@carlos\_carreno](https://community.dynatrace.com/u/carlos_carreno)\
**Post date:** [February 1, 2024, 8:23pm UTC](https://community.dynatrace.com/t/host-group-assignment/43937/3 "2024-02-01T20:23:04Z")

</div>

More than 5 hours

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [February 1, 2024, 8:42pm UTC](https://community.dynatrace.com/t/host-group-assignment/43937/4 "2024-02-01T20:42:08Z")

</div>

Depending on the size of your env, it may take longer, based on my own experience.

But you can confirm if the assignment takes effect checking the list of hosts by hostgroup in UI:

> **[Organize your environment using host groups](https://docs.dynatrace.com/docs/observe/infrastructure-observability/hosts/configuration/organize-your-environment-using-host-groups)**
>
> Find out how Dynatrace enables you to organize your hosts, processes, and services using host groups.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [February 2, 2024, 7:57am UTC](https://community.dynatrace.com/t/host-group-assignment/43937/5 "2024-02-02T07:57:17Z")

</div>

Hi,

It is weird, you can try from [Dynatrace UI](https://docs.dynatrace.com/docs/shortlink/host-groups#assign-a-host-to-a-host-group) also, just to compare if you notice differences.

 ![AntonPineiro_0-1706860575650.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/d/9d00cbd1dd8488f4e6fb6c398cb7bccb6bd3db0b.png)

Best regards

---

<div class="post-metadata">

**Author:** ![carlos\_carreno](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/carlos_carreno/32/28820_2.png) [@carlos\_carreno](https://community.dynatrace.com/u/carlos_carreno)\
**Post date:** [February 2, 2024, 12:39pm UTC](https://community.dynatrace.com/t/host-group-assignment/43937/6 "2024-02-02T12:39:12Z")

</div>

Thank you very much for the input. I will make the change through that method, and I hope the host accepts it. In theory, it should work 🙂

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [April 10, 2024, 6:53pm UTC](https://community.dynatrace.com/t/host-group-assignment/43937/7 "2024-04-10T18:53:50Z")

</div>

I just did a change moments ago, and was reflected in UI very fast. Small environment though, with a little bit more than 100 hosts…
