# Tagging OS services

**URL:** <https://community.dynatrace.com/t/tagging-os-services/46470>\
**Category:** Open Q&A\
**Tags:** windows, linux, services-classic, tagging\
**Created:** [July 5, 2024, 12:21am UTC](https://community.dynatrace.com/t/tagging-os-services/46470 "2024-07-05T00:21:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrc15816](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mrc15816](https://community.dynatrace.com/u/mrc15816)\
**Post date:** [July 5, 2024, 12:21am UTC](https://community.dynatrace.com/t/tagging-os-services/46470/1 "2024-07-05T00:21:23Z")

</div>

We have a few thousand servers, both Windows and Linux. We want to tag all the services with the server name that they are running on. We have tried a couple of options but couldn’t succeed without hitting the tagging limit or delay in getting tags applied. I wonder if anyone can share their experience if they have overcome this issue.

Thanks

Raj

---

<div class="post-metadata">

**Author:** ![rgarzon1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rgarzon1/32/11844_2.png) [@rgarzon1](https://community.dynatrace.com/u/rgarzon1)\
**Post date:** [July 5, 2024, 4:55am UTC](https://community.dynatrace.com/t/tagging-os-services/46470/2 "2024-07-05T04:55:44Z")

</div>

Hi&nbsp;[@mrc15816](https://community.dynatrace.com/user/21197)

I allways use this for my enviroments

 ![rgarzon1_0-1720155085998.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/3d217559a9141711ee47d6bd55f407c59129dc73.png)

 ![rgarzon1_1-1720155110618.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/0/4095a0e46402d1db1c210135b1260e09eb2fb15e.png)

i know that this does not have a nice performance in big environment but always can be use the hostgroup to reduce the scope.

if this is not posible you can always set metadata in host.

> **[Define tags and metadata for hosts](https://docs.dynatrace.com/docs/observe/infrastructure-observability/hosts/configuration/define-tags-and-metadata-for-hosts)**
>
> Automate host tags and metadata with oneagentctl or configuration files, and use the resulting properties in auto-tagging and management-zone rules.

probably exist some other methods but those work for me plenty of times.

---

<div class="post-metadata">

**Author:** ![jaume\_reverte](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jaume_reverte/32/1479_2.png) [@jaume\_reverte](https://community.dynatrace.com/u/jaume_reverte)\
**Post date:** [July 5, 2024, 6:55am UTC](https://community.dynatrace.com/t/tagging-os-services/46470/3 "2024-07-05T06:55:14Z")

</div>

Hello,

Normally, in this case, I use the {Host:DetectedName} without any regex to not impact performance and apply it directly to Services.

It is true that some delay is expected, but normally, within 3 to 10 minutes, the rule should be applied to every entity in the environment.

Try following the [best practices](https://docs.dynatrace.com/docs/manage/tags-and-metadata/basic-concepts/best-practice-tagging-at-scale).

I can’t help more here.

Best regards! Wish a good monitoring!&nbsp;

 ![dynatrace-royalblue_600.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/e/7e14d1df9101cb2242b2591c03fb066e113b72ce.png)

---

<div class="post-metadata">

**Author:** ![mrc15816](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mrc15816](https://community.dynatrace.com/u/mrc15816)\
**Post date:** [July 5, 2024, 2:37pm UTC](https://community.dynatrace.com/t/tagging-os-services/46470/4 "2024-07-05T14:37:22Z")

</div>

[@jaume\_reverte](https://community.dynatrace.com/user/55596)&nbsp;[@rgarzon1](https://community.dynatrace.com/user/51579)&nbsp;thank you both for your recommendation.

We are using {host:DetectedNames} and this method wouldn’t work under entity selector and we couldn’t pick monitored entity as we can’t pick os:services hence couldn’t achieve. Any other ideas?

Thanks

Raj

---

<div class="post-metadata">

**Author:** ![rgarzon1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rgarzon1/32/11844_2.png) [@rgarzon1](https://community.dynatrace.com/u/rgarzon1)\
**Post date:** [July 5, 2024, 3:43pm UTC](https://community.dynatrace.com/t/tagging-os-services/46470/5 "2024-07-05T15:43:20Z")

</div>

But if you use entity selector the options for set services provided will not work.

---

<div class="post-metadata">

**Author:** ![mrc15816](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mrc15816](https://community.dynatrace.com/u/mrc15816)\
**Post date:** [July 5, 2024, 4:40pm UTC](https://community.dynatrace.com/t/tagging-os-services/46470/6 "2024-07-05T16:40:11Z")

</div>

[@rgarzon1](https://community.dynatrace.com/user/51579)&nbsp;the method you are calling out is only available for Monitored Entity method, but the OS services is not available under this method, unless we are missing something here.

Thank you Raj

---

<div class="post-metadata">

**Author:** ![rgarzon1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rgarzon1/32/11844_2.png) [@rgarzon1](https://community.dynatrace.com/u/rgarzon1)\
**Post date:** [July 6, 2024, 12:19am UTC](https://community.dynatrace.com/t/tagging-os-services/46470/7 "2024-07-06T00:19:40Z")

</div>

Now understand, i was thinking in services in general, after your message try to doit by myselft and notice that its right, there is not a way to doit without reach some limits.

- set a tag with the host name for every service in the host ( no posible if there ist more than a x quantity)

- set a tag by group or range of ip (no a viable option because its not an easy way to drill down in problem)

- set the tag by hostgroup (probably a good option but not too far from a nightmare to drilldown)

and etc..

i was thinking now for the use of this the host in the service inside a host.&nbsp; maybe you will need it when a problem its raise and need more information in the message.

but while i was thinking in that got this for me.

 ![rgarzon1_0-1720224682328.png](https://global.discourse-cdn.com/dynatrace/original/2X/a/a258a69aafae247f89b9d21bde2f90d0d06be497.png)

```javascript
timeseries availability = sum(dt.osservice.availability), by: { dt.entity.host, dt.osservice.status, `dt.entity.os:service` }
| fieldsAdd entityName(dt.entity.host), entityName(`dt.entity.os:service`)
| summarize count = count(), by:{dt.entity.host.name, dt.osservice.status, entityName(`dt.entity.os:service`) }
| summarize active = countIf( dt.osservice.status == "active")
            , activating = countIf( dt.osservice.status == "activating")
            , failed = countIf( dt.osservice.status == "failed")
            , inactive = countIf( dt.osservice.status == "inactive")
            , by:{ dt.entity.host.name }

```

or

 ![rgarzon1_1-1720225125845.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/21cdbbddf41fa410b498be7cf179569d95dabf09.png)

i was not able to set the host for the os:services but get something to analyze .. thank you

---

<div class="post-metadata">

**Author:** ![mrc15816](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mrc15816](https://community.dynatrace.com/u/mrc15816)\
**Post date:** [July 9, 2024, 1:47am UTC](https://community.dynatrace.com/t/tagging-os-services/46470/8 "2024-07-09T01:47:18Z")

</div>

[@rgarzon1](https://community.dynatrace.com/user/51579)&nbsp; thank you for checking out and sharing some thoughts.

---

<div class="post-metadata">

**Author:** ![gilles\_tabary](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@gilles\_tabary](https://community.dynatrace.com/u/gilles_tabary)\
**Post date:** [June 17, 2025, 2:26pm UTC](https://community.dynatrace.com/t/tagging-os-services/46470/9 "2025-06-17T14:26:09Z")

</div>

Hello.  
This is badly wanted. 🙂  
Regards.

---

<div class="post-metadata">

**Author:** ![gilles\_tabary](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@gilles\_tabary](https://community.dynatrace.com/u/gilles_tabary)\
**Post date:** [June 17, 2025, 2:29pm UTC](https://community.dynatrace.com/t/tagging-os-services/46470/10 "2025-06-17T14:29:33Z")

</div>

use case :

- Put host and all what is running on it in Maintenance : impossible.
- Hack: put in Maintenance all what is tagged with hostname:\<myhostname\> =\> cannot tag os:services with hostname =\> not possible to put os:service in maintenance
