# How do i create an alert for a Log Custom attribute value

**URL:** <https://community.dynatrace.com/t/how-do-i-create-an-alert-for-a-log-custom-attribute-value/49372>\
**Category:** Alerting\
**Tags:** problem-detection, logs\
**Created:** [December 16, 2024, 10:31am UTC](https://community.dynatrace.com/t/how-do-i-create-an-alert-for-a-log-custom-attribute-value/49372 "2024-12-16T10:31:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishnu\_kumar](https://avatars.discourse-cdn.com/v4/letter/v/df705f/32.png) [@vishnu\_kumar](https://community.dynatrace.com/u/vishnu_kumar)\
**Post date:** [December 16, 2024, 10:31am UTC](https://community.dynatrace.com/t/how-do-i-create-an-alert-for-a-log-custom-attribute-value/49372/1 "2024-12-16T10:31:26Z")

</div>

Hi,

I have created a Processing rule to save the the last column of a log entry as a variable “QueueLength” and saved it as a ‘Custom Attribute’.  
How to set an alert to notify me when my Custom Attribute is above, say, 10

The below query in Event Extraction did not work:  
matchesValue(log.source, “/path/source.log”) and QueueLength\>10

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [December 16, 2024, 10:56am UTC](https://community.dynatrace.com/t/how-do-i-create-an-alert-for-a-log-custom-attribute-value/49372/2 "2024-12-16T10:56:42Z")

</div>

You should create a metric, and then you can define an event based on that metric.

> **[Log metrics](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-processing/lma-log-metrics)**
>
> Create metrics based on log data and use them throughout Dynatrace like any other metric.

 ![PacoPorro_0-1734346558013.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/0/e06de567cd9396357b02cb093b664118d464a527.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [December 17, 2024, 8:28am UTC](https://community.dynatrace.com/t/how-do-i-create-an-alert-for-a-log-custom-attribute-value/49372/3 "2024-12-17T08:28:00Z")

</div>

Hi&nbsp;[@vishnu\_kumar](https://community.dynatrace.com/user/66503)

In addition to provided guidance by&nbsp;[@PacoPorro](https://community.dynatrace.com/user/40713)

PFA resources:

- [Create log metric — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-use-cases/lma-e2e-create-log-metric#create-log-metric)
- [Set up alerts based on events extracted from logs — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-use-cases/lma-e2e-set-log-alert)
- [Use logs in context to troubleshoot Kubernetes (K8s) issues — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-use-cases/lma-e2e-troubleshooting)
- [Set up custom alerts based on metrics extracted from logs — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-use-cases/lma-e2e-create-anomaly-detection-metric)

Advanced use case:

- [Automated bug triaging and ticketing — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-use-cases/lma-e2e-resolve-dependencies)
- [Detect problems with Logs — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-use-cases/lma-detect-problems-with-logs)
- [Observe your logs in real time — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-use-cases/lma-e2e-real-time-observability-logs-dql)

Hoping it helps.

KR,

Peter

---

<div class="post-metadata">

**Author:** ![vishnu\_kumar](https://avatars.discourse-cdn.com/v4/letter/v/df705f/32.png) [@vishnu\_kumar](https://community.dynatrace.com/u/vishnu_kumar)\
**Post date:** [December 17, 2024, 8:53am UTC](https://community.dynatrace.com/t/how-do-i-create-an-alert-for-a-log-custom-attribute-value/49372/4 "2024-12-17T08:53:37Z")

</div>

Thanks for these documents guys.

This link you shared:

> **[Set up custom alerts based on metrics extracted from logs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-use-cases/lma-alert-log-based-metrics)**
>
> How to create and configure Davis problems and custom alerts with metrics based on logs.

has helped us

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [December 19, 2024, 10:40am UTC](https://community.dynatrace.com/t/how-do-i-create-an-alert-for-a-log-custom-attribute-value/49372/5 "2024-12-19T10:40:46Z")

</div>

Hi&nbsp;[@vishnu\_kumar](https://community.dynatrace.com/user/66503)

Glad to hear you have sorted it out&nbsp;:wink:&nbsp;:blush:
