# Log (classic) ingest rule , host tag matcher attribute

**URL:** <https://community.dynatrace.com/t/log-classic-ingest-rule-host-tag-matcher-attribute/47475>\
**Category:** Logs\
**Tags:** dynatrace-managed, log-monitoring-class\
**Created:** [September 4, 2024, 9:40am UTC](https://community.dynatrace.com/t/log-classic-ingest-rule-host-tag-matcher-attribute/47475 "2024-09-04T09:40:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [September 4, 2024, 9:40am UTC](https://community.dynatrace.com/t/log-classic-ingest-rule-host-tag-matcher-attribute/47475/1 "2024-09-04T09:40:07Z")

</div>

Hi guys,

Struggle here with [Log classic ingest rule](https://docs.dynatrace.com/docs/shortlink/lma-log-ingest-rules#log-ingest-rule)&nbsp; **Add condition** &nbsp;and **Matcher attribute** &nbsp;of&nbsp; **Host tag**

 ![Yosi_Neuman_0-1725442460698.png](https://global.discourse-cdn.com/dynatrace/original/3X/b/a/bab595edfb0afed377c0adc86931ea1cf452a1b8.png)

We have tag on host

 ![Yosi_Neuman_1-1725442615554.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/b/8b07bfdaaed38cf13f331963cb6338dcc655a408.png)

But once adding the condition

 ![Yosi_Neuman_2-1725442675345.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/6/16c41fc515c07ff3a77695676589d98a7b700773.png)

logs are not collected any more

 ![Yosi_Neuman_3-1725442741099.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/d/4da3a90650e8ca80e94ff5916b08da2f675a3f75.png)

What are we missing here ?

Yos

---

<div class="post-metadata">

**Author:** ![PedroSantos](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pedrosantos/32/28150_2.png) [@PedroSantos](https://community.dynatrace.com/u/PedroSantos)\
**Post date:** [September 9, 2024, 5:53pm UTC](https://community.dynatrace.com/t/log-classic-ingest-rule-host-tag-matcher-attribute/47475/2 "2024-09-09T17:53:36Z")

</div>

Hey Yos, did you manage to figure this out?  
We’re having a very similar problem where Dynatrace doesn’t seem to be able to recognize the tags on a host properly and collect logs from there.

 ![PedroSantos_0-1725904173775.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/7/872cec69ce99a6659efbdd5a6b639c7476e61fb5.png)

This is the rule I have for the environment and it does not work. The host absolutely has the tag:

![PedroSantos_1-1725904253098.png](https://global.discourse-cdn.com/dynatrace/original/2X/1/1aa28c4cd4b180fdbd0cb5ec0c1dc3cea184c4fb.png)

But no logs are collected.

However, if I add the following rule to the host itself, the logs are collected:

 ![PedroSantos_2-1725904321192.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/4/142e22b49cb1061062a0a2564827e59cbcff9cb2.png)

I have no clue what’s going on, since it should be working and had been working in the past. A “workaround” would be to add rules to each and every host individually, but that’s a nightmare.

Am I using the wrong syntax or something?

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [September 10, 2024, 4:47am UTC](https://community.dynatrace.com/t/log-classic-ingest-rule-host-tag-matcher-attribute/47475/3 "2024-09-10T04:47:14Z")

</div>

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

Nope&nbsp;🙃 still don’t have solution for that

Will open a support ticket for that later on and will update with the answer

Yos

---

<div class="post-metadata">

**Author:** ![PedroSantos](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pedrosantos/32/28150_2.png) [@PedroSantos](https://community.dynatrace.com/u/PedroSantos)\
**Post date:** [September 10, 2024, 10:15am UTC](https://community.dynatrace.com/t/log-classic-ingest-rule-host-tag-matcher-attribute/47475/4 "2024-09-10T10:15:04Z")

</div>

Hi [@Yosi\_Neuman](https://community.dynatrace.com/user/6931)

I think we might have figured out something on our end. It seems that this might be the issue:

> Matching is based on the host tag. \*\*The attribute only supports the tags set with the [OneAgent command line tool](https://docs.dynatrace.com/docs/platform-modules/infrastructure-monitoring/hosts/configuration/define-tags-and-metadata-for-hosts) or with the [Remote configuration](https://docs.dynatrace.com/docs/setup-and-configuration/bulk-configuration) \*\*in a key=value pair format. **They can be distinguished by the [Environment] prefix on the UI**, but you should use the value without the prefix. Multiple tags can be specified in a single matcher, but each tag needs to have the same key, such as logscope=frontend, logscope=backend.

So, essentially, none of the tags we were using had the [Environment] prefix on the UI. Can you confirm this is the case on your end as well?

For this purpose, we can only use tags defined through the OneAgent command line tool or applied through the Remote Configuration. What this means is that we’ll probably need to reapply tags to several hosts using these tools, and then it should work. From what I’ve gathered, it seems that tags not applied through these tools are not visible to the OneAgent (and are instead known by the SaaS), and that’s why the OneAgents has no idea that the tags we’re using are applied to their hosts.

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [September 10, 2024, 1:26pm UTC](https://community.dynatrace.com/t/log-classic-ingest-rule-host-tag-matcher-attribute/47475/5 "2024-09-10T13:26:36Z")

</div>

Bravo&nbsp;[@PedroSantos](https://community.dynatrace.com/user/77112)

I read the documentation and saw the&nbsp;**[Remote](https://docs.dynatrace.com/docs/setup-and-configuration/bulk-configuration)** [configuration](https://docs.dynatrace.com/docs/setup-and-configuration/bulk-configuration)&nbsp;but did not understood that it means we need to go the deployment status page and set the tag from there&nbsp;😱

Now, after setting the tag its work like a charm!&nbsp;&nbsp;🤗

Thanks for your help !&nbsp;:thankyou:

All the best and stay safe

Yos

---

<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 6, 2025, 9:26am UTC](https://community.dynatrace.com/t/log-classic-ingest-rule-host-tag-matcher-attribute/47475/6 "2025-02-06T09:26:02Z")

</div>

Hi,

I have just raised [this product idea](https://community.dynatrace.com/post/269395). Maybe it would be useful to your usecase.

Best regards
