# Capture OOM errors Kubernetes

**URL:** <https://community.dynatrace.com/t/capture-oom-errors-kubernetes/20844>\
**Category:** Container platforms\
**Tags:** openshift, oneagent, kubernetes\
**Created:** [November 19, 2020, 3:38pm UTC](https://community.dynatrace.com/t/capture-oom-errors-kubernetes/20844 "2020-11-19T15:38:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GAnantula](https://avatars.discourse-cdn.com/v4/letter/g/e19adc/32.png) [@GAnantula](https://community.dynatrace.com/u/GAnantula)\
**Post date:** [November 19, 2020, 3:38pm UTC](https://community.dynatrace.com/t/capture-oom-errors-kubernetes/20844/1 "2020-11-19T15:38:01Z")

</div>

We have instrumented OpenShift cluster with Dynatrace OneAgent in our environment and one of the services running within the container had OOM error on Metaspace. As a result the process was terminated and restarted automatically.

We do see events related to the process restart but there is NO event related to the OOM error, but we could clearly see that in the application log file. It was really difficult for us to figure out why the process was restarted as Dynatrace was NOT providing any details.

We have added the following events to be captured in the Kubernetes settings in Dynatrace. Is there anything else that we should be adding to capture the OOM errors? Please advise.

involvedObject.kind=Node

type=Warning

involvedObject.kind=Pod

reason=BackOff

Thanks,

Ganesh

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [December 1, 2020, 2:23pm UTC](https://community.dynatrace.com/t/capture-oom-errors-kubernetes/20844/2 "2020-12-01T14:23:03Z")

</div>

sometimes this can be trial and error. Id make sure that within your Kubernetes settings, you have defined out the Events Field Selectors as this will guarantee you’ll capture the data. Once the data is captures, you can always create a custom event for alerting as well.

---

<div class="post-metadata">

**Author:** ![GAnantula](https://avatars.discourse-cdn.com/v4/letter/g/e19adc/32.png) [@GAnantula](https://community.dynatrace.com/u/GAnantula)\
**Post date:** [December 1, 2020, 2:49pm UTC](https://community.dynatrace.com/t/capture-oom-errors-kubernetes/20844/3 "2020-12-01T14:49:45Z")

</div>

okay. Thank you!

---

<div class="post-metadata">

**Author:** ![tibebe\_m\_digafe](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tibebe\_m\_digafe](https://community.dynatrace.com/u/tibebe_m_digafe)\
**Post date:** [January 5, 2022, 4:11pm UTC](https://community.dynatrace.com/t/capture-oom-errors-kubernetes/20844/4 "2022-01-05T16:11:21Z")

</div>

Hi Chad,

Could you please elaborate as to what needs to be done/configured to create custom events from the captured kubernetes events?

Thanks. Tibebe

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 5, 2022, 7:57pm UTC](https://community.dynatrace.com/t/capture-oom-errors-kubernetes/20844/5 "2022-01-05T19:57:28Z")

</div>

[@tibebe\_m\_digafe](https://community.dynatrace.com/user/32618)&nbsp;you need to create [Log Event](https://www.dynatrace.com/support/help/shortlink/log-monitoring-log-events)&nbsp;to get alerted on a particular kubernetes event type.

---

<div class="post-metadata">

**Author:** ![tibebe\_m\_digafe](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tibebe\_m\_digafe](https://community.dynatrace.com/u/tibebe_m_digafe)\
**Post date:** [January 6, 2022, 10:55pm UTC](https://community.dynatrace.com/t/capture-oom-errors-kubernetes/20844/6 "2022-01-06T22:55:39Z")

</div>

Thanks&nbsp;[@Julius\_Loman](https://community.dynatrace.com/user/3364)
