# Custom alerts on Log Monitoring

**URL:** <https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554>\
**Category:** Alerting\
**Tags:** log-monitoring-class, problems-classic\
**Created:** [February 19, 2021, 3:39am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554 "2021-02-19T03:39:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mayana\_Khan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mayana\_Khan](https://community.dynatrace.com/u/Mayana_Khan)\
**Post date:** [February 19, 2021, 3:39am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/1 "2021-02-19T03:39:56Z")

</div>

Hi,

I have configure the string in logs to be monitor as metric (log Event) and created the custom alert with threshold of 1 count for 1min to 3min default.

 ![28311-1613705906202.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/c/1cd5ca9d898d1e484a327f81bbfdfff7cb447db4.png)

The above static threshold will alerts for each error string occurrence in logs?

Also once the metric is created and added to custom chart it will detect/display the historical (older) log errors?

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [February 19, 2021, 9:57am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/2 "2021-02-19T09:57:33Z")

</div>

Yes it will.

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [February 19, 2021, 9:58am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/3 "2021-02-19T09:58:18Z")

</div>

Concerning historic occurances: No, it counts from the time you defined the pattern.

---

<div class="post-metadata">

**Author:** ![Mayana\_Khan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mayana\_Khan](https://community.dynatrace.com/u/Mayana_Khan)\
**Post date:** [February 22, 2021, 1:21am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/4 "2021-02-22T01:21:55Z")

</div>

Also do we need to need to select the particular log process in scope? if we not selected the scope then what will be the issue?

 ![28336-1613956899205.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/9/29ce1422c2641b2e916729387211eadd8139cef2.png)

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [February 22, 2021, 7:23am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/5 "2021-02-22T07:23:42Z")

</div>

Hello [@Mayana K.](https://answers.dynatrace.com/users/44738/view.html)

The good practice is to limit the scope, and especially when you are using the calculated metrics.

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![Mayana\_Khan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mayana\_Khan](https://community.dynatrace.com/u/Mayana_Khan)\
**Post date:** [February 22, 2021, 7:41am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/6 "2021-02-22T07:41:21Z")

</div>

Actually the issue we are facing is, we have configure a log monitoring error with “X” parameter by creating a custom metric.

When ever the error occurs for X parameter, The dynatrace generate a problem with “X error” and “Y error” as well, but we don`t have any reference of “Y error” in logs.

The below steps has performed to configure a alert

- Search for the error in analyze logs and created X error and Y error
- Created custom alerts for X and Y errors with above thresholds.
- Manually updated the X error to log file for testing.

But dynatrace sends a problem with both X and Y description

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [February 22, 2021, 8:52am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/7 "2021-02-22T08:52:32Z")

</div>

Hello [@Mayana K.](https://answers.dynatrace.com/users/44738/view.html)

Did you try to limit the scope?

Are both problems coming from the same logs?

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![Mayana\_Khan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mayana\_Khan](https://community.dynatrace.com/u/Mayana_Khan)\
**Post date:** [February 22, 2021, 8:57am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/8 "2021-02-22T08:57:55Z")

</div>

Yes limited the scope.

And both the error are generating in same problem and coming from the same logs.

---

<div class="post-metadata">

**Author:** ![Mayana\_Khan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mayana\_Khan](https://community.dynatrace.com/u/Mayana_Khan)\
**Post date:** [February 23, 2021, 7:13am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/9 "2021-02-23T07:13:15Z")

</div>

We got the fix.

X error = ‘system error failed’

Y error = ‘system error failure’

I was using the query to filter the logs as ‘system error failed’ . This will matching the both X error and Y error.

X error = **‘system error failed’**

Y error = **'system error** failure’

seems this is why we got the alert for both x and Y errors.

I have updated the query as “‘system error failed’” then it exactly matching the parameter.

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [February 23, 2021, 7:42am UTC](https://community.dynatrace.com/t/custom-alerts-on-log-monitoring/21554/10 "2021-02-23T07:42:19Z")

</div>

Hello [@Mayana K.](https://answers.dynatrace.com/users/44738/view.html)

Nice to hear that you fixed your problem.

Regards,

Babar
