# Is there a way to add a tag to Custom Log events (Events Extraction) so it can be used in Alerting Profiles?

**URL:** <https://community.dynatrace.com/t/is-there-a-way-to-add-a-tag-to-custom-log-events-events-extraction-so-it-can-be-used-in-alerting-profiles/43110>\
**Category:** Alerting\
**Tags:** problem-detection, problem-notification, problems-classic\
**Created:** [December 8, 2023, 7:39pm UTC](https://community.dynatrace.com/t/is-there-a-way-to-add-a-tag-to-custom-log-events-events-extraction-so-it-can-be-used-in-alerting-profiles/43110 "2023-12-08T19:39:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![runatyr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/runatyr/32/11396_2.png) [@runatyr](https://community.dynatrace.com/u/runatyr)\
**Post date:** [December 8, 2023, 7:39pm UTC](https://community.dynatrace.com/t/is-there-a-way-to-add-a-tag-to-custom-log-events-events-extraction-so-it-can-be-used-in-alerting-profiles/43110/1 "2023-12-08T19:39:52Z")

</div>

Hello:

I have an alerting profile that is based upon sending alerts only with certain Tags.

I recently created my first Cusomt Log Event under **Log Monitoring** --\> **Events Extraction.**

The Log event works, I have it set as a custom Log event. It populates in the problem window.

However, I want to be able to add a tag to it.

How is this done?

---

<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:** [December 8, 2023, 8:31pm UTC](https://community.dynatrace.com/t/is-there-a-way-to-add-a-tag-to-custom-log-events-events-extraction-so-it-can-be-used-in-alerting-profiles/43110/2 "2023-12-08T20:31:13Z")

</div>

Hi [@runatyr](https://community.dynatrace.com/user/29954) ,

if your log is collected thru OneAgent, it will set the target entity as the host/PG from where the log come, so the tag you have in that entity will be used by your alerting profile.

---

<div class="post-metadata">

**Author:** ![runatyr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/runatyr/32/11396_2.png) [@runatyr](https://community.dynatrace.com/u/runatyr)\
**Post date:** [December 18, 2023, 7:30pm UTC](https://community.dynatrace.com/t/is-there-a-way-to-add-a-tag-to-custom-log-events-events-extraction-so-it-can-be-used-in-alerting-profiles/43110/3 "2023-12-18T19:30:45Z")

</div>

Thanks dannemca.

The log is collected through OneAgent.

So then, if that host has no tag, none will come from the alerting profile. Is that correct?

---

<div class="post-metadata">

**Author:** ![LawrenceBarratt](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/lawrencebarratt/32/26634_2.png) [@LawrenceBarratt](https://community.dynatrace.com/u/LawrenceBarratt)\
**Post date:** [December 18, 2023, 9:53pm UTC](https://community.dynatrace.com/t/is-there-a-way-to-add-a-tag-to-custom-log-events-events-extraction-so-it-can-be-used-in-alerting-profiles/43110/4 "2023-12-18T21:53:45Z")

</div>

Hi [@runatyr](https://community.dynatrace.com/user/29954)

You could try adding Log Event Properties to your Extracted Log Event.

[Create Log Event](https://docs.dynatrace.com/docs/shortlink/lma-log-events#create-a-log-event)

From the docs:

A property is a key/value pair that is set on every triggered event. You can have one or more placeholders as a value that will be extracted from the log data. For example, a property with&nbsp; **Key** &nbsp;set to&nbsp;PGI&nbsp;and a&nbsp; **Value** &nbsp;of placeholder&nbsp;_{dt.entity.process\_group\_instance}_&nbsp;will extract the process group instance value from log data once the event is triggered. If the placeholder substitution fails, both the key and the value will not be available.

Thanks,

Lawrence

---

<div class="post-metadata">

**Author:** ![CTull](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@CTull](https://community.dynatrace.com/u/CTull)\
**Post date:** [September 5, 2024, 2:29pm UTC](https://community.dynatrace.com/t/is-there-a-way-to-add-a-tag-to-custom-log-events-events-extraction-so-it-can-be-used-in-alerting-profiles/43110/5 "2024-09-05T14:29:32Z")

</div>

I have a similar situation.&nbsp; I have log ingestion by the api.&nbsp; Fields im sending are content, log level, host.id, application.&nbsp; Customer wants a maintenance window for this event extraction that generate a problem card.&nbsp; So how do I setup the entity for this?&nbsp; I do not see an entity filed for Logs or host.id?&nbsp; Any ideas how to include this custom event extraction to not alert during off hours?&nbsp; How would I construct the entity selector to include this in my maintenance window?
