# Update oneagent by tag

**URL:** <https://community.dynatrace.com/t/update-oneagent-by-tag/50766>\
**Category:** Open Q&A\
**Tags:** installation, tagging, oneagent\
**Created:** [March 18, 2025, 1:07pm UTC](https://community.dynatrace.com/t/update-oneagent-by-tag/50766 "2025-03-18T13:07:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathanieltat](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nathanieltat/32/17660_2.png) [@Nathanieltat](https://community.dynatrace.com/u/Nathanieltat)\
**Post date:** [March 18, 2025, 1:07pm UTC](https://community.dynatrace.com/t/update-oneagent-by-tag/50766/1 "2025-03-18T13:07:35Z")

</div>

Im wondering if there is a way to update the oneagent but spit them out via tags, we have specific update windows for different regions and each host has a&nbsp;Location (Auto)\*Region\* and we want to link the update window to the tags and have them update via that window.

 ![Regions.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/1/81496fd4ff0c27f6bd1f64ea9161f1383c37e90b.png)

---

<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:** [March 20, 2025, 9:41am UTC](https://community.dynatrace.com/t/update-oneagent-by-tag/50766/2 "2025-03-20T09:41:21Z")

</div>

Hi,

It is not possible. You can see all options [here](https://docs.dynatrace.com/docs/shortlink/oneagent-update#configure-oneagent-updates).

You can raise a [product idea](https://community.dynatrace.com/category/DynatraceProductIdeas).

Best regards

---

<div class="post-metadata">

**Author:** ![Nathanieltat](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nathanieltat/32/17660_2.png) [@Nathanieltat](https://community.dynatrace.com/u/Nathanieltat)\
**Post date:** [April 7, 2025, 10:29am UTC](https://community.dynatrace.com/t/update-oneagent-by-tag/50766/3 "2025-04-07T10:29:48Z")

</div>

My solution was to do it via host groups. They were renamed into groups but this caused a separate issue where dynatrace reimported all the services again.

---

<div class="post-metadata">

**Author:** ![mgome](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mgome](https://community.dynatrace.com/u/mgome)\
**Post date:** [April 9, 2025, 5:44pm UTC](https://community.dynatrace.com/t/update-oneagent-by-tag/50766/4 "2025-04-09T17:44:31Z")

</div>

Using host groups will impact your process groups and services. Alternatively, you could do this using the monitored entities query API using type HOST and a tag filter to get a list of host ids. You can then loop through the list using the OneAgent update API to trigger an upgrade with a payload like this:

```auto
{
  "setting":"INHERITED",
  "version":"1.245.174.20220808-121330"
}

```

Using a setting of INHERITED turns this into a one time upgrade to the version specified.

> **[Monitored entities API - GET entities list](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/get-entities-list)**
>
> View a list of monitored entities via Dynatrace API.

> **[OneAgent auto-update API - PUT configuration](https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/oneagent-configuration/oneagent-on-host/oneagent-auto-update/put-auto-update-configuration)**
>
> Edit the auto-update configuration of a OneAgent instance via the Dynatrace API.
