# K8 Cronjob failed jobs should not trigger success alert after triggering failed job alert

**URL:** <https://community.dynatrace.com/t/k8-cronjob-failed-jobs-should-not-trigger-success-alert-after-triggering-failed-job-alert/44019>\
**Category:** Alerting\
**Tags:** problem-detection, dynatrace-managed, kubernetes\
**Created:** [February 7, 2024, 3:54pm UTC](https://community.dynatrace.com/t/k8-cronjob-failed-jobs-should-not-trigger-success-alert-after-triggering-failed-job-alert/44019 "2024-02-07T15:54:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![akashkatoch](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@akashkatoch](https://community.dynatrace.com/u/akashkatoch)\
**Post date:** [February 7, 2024, 3:54pm UTC](https://community.dynatrace.com/t/k8-cronjob-failed-jobs-should-not-trigger-success-alert-after-triggering-failed-job-alert/44019/1 "2024-02-07T15:54:58Z")

</div>

I have created custom log metric event which filter out failed cronjob and set this custom metric in anomalies detection metric event to monitor failed cronjobs . While setting an alert I have notice that dynatrace is triggering the alert when any job got failed and immediately triggers resolved alert&nbsp; for the same failed jobs . Ideally Cronjob that got failed is already failed and there is no point for dynatrace to trigger resolved status . As since Dynatrace does not offer any default cronjob metric event but still they can add filter in metric event which restrict dynatrace to send resolved trigger for failed cronjob

---

<div class="post-metadata">

**Author:** ![akashkatoch](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@akashkatoch](https://community.dynatrace.com/u/akashkatoch)\
**Post date:** [February 9, 2024, 2:20pm UTC](https://community.dynatrace.com/t/k8-cronjob-failed-jobs-should-not-trigger-success-alert-after-triggering-failed-job-alert/44019/2 "2024-02-09T14:20:02Z")

</div>

I saw you have edited the content , did someone acknowledge it&nbsp;[@MaciejNeumann](https://community.dynatrace.com/user/6)&nbsp; ?

---

<div class="post-metadata">

**Author:** ![travis\_walker](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@travis\_walker](https://community.dynatrace.com/u/travis_walker)\
**Post date:** [June 27, 2024, 6:31pm UTC](https://community.dynatrace.com/t/k8-cronjob-failed-jobs-should-not-trigger-success-alert-after-triggering-failed-job-alert/44019/3 "2024-06-27T18:31:46Z")

</div>

[@wolfgang\_beer](https://community.dynatrace.com/user/8624)&nbsp;Is this something you can advise on?

---

<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:** [June 28, 2024, 5:47am UTC](https://community.dynatrace.com/t/k8-cronjob-failed-jobs-should-not-trigger-success-alert-after-triggering-failed-job-alert/44019/4 "2024-06-28T05:47:45Z")

</div>

Dear&nbsp;[@akashkatoch](https://community.dynatrace.com/user/71903)&nbsp;,

With log events you can trigger a problem that is kept open for a default period of 15min. In case the same log event appears again in this period of time, the problem is automatically refreshed and kept in active state.

You can add a custom event property with the value ‘dt.event.timeout’ = 60 to set the keepalive to 60 minutes to keep it active and open for a longer period of time.

 ![wolfgang_beer_0-1719553579822.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/3/836c7b428c7a322289ea3dc4c844a79a5e2f3eab.png)

In case you want the same problem to be open for days or weeks, there is no built-in mechanism in Dynatrace. This needs to be handled in an external ticketing system instead.

Best greetings,

Wolfgang

---

<div class="post-metadata">

**Author:** ![akashkatoch](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@akashkatoch](https://community.dynatrace.com/u/akashkatoch)\
**Post date:** [August 13, 2024, 11:36am UTC](https://community.dynatrace.com/t/k8-cronjob-failed-jobs-should-not-trigger-success-alert-after-triggering-failed-job-alert/44019/5 "2024-08-13T11:36:15Z")

</div>

I think this is an alternative solution to cronjob to keep the alert alive for defined period of time . I need sort of notification based offering , because seems like metric event doesn’t suits well with cronjob alerting.
