# Last\_terminated\_reason metric is not collected

**URL:** <https://discuss.elastic.co/t/last-terminated-reason-metric-is-not-collected/323101>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 13, 2023, 8:03am UTC](https://discuss.elastic.co/t/last-terminated-reason-metric-is-not-collected/323101 "2023-01-13T08:03:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyungsun\_lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hyungsun_lim/32/50790_2.png) [@hyungsun\_lim](https://discuss.elastic.co/u/hyungsun_lim)\
**Post date:** [January 13, 2023, 8:03am UTC](https://discuss.elastic.co/t/last-terminated-reason-metric-is-not-collected/323101/1 "2023-01-13T08:03:47Z")

</div>

I want to collect 'kubernetes.container.status.last\_terminated\_reason' metric in document ([Kubernetes fields | Metricbeat Reference [8.6] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/exported-fields-kubernetes.html#_container_6))

So i use metricbeat(v7.10.1) to collect k8s event data.

```auto
metricbeat.config.modules:
  # Mounted `metricbeat-daemonset-modules` configmap:
  path: ${path.config}/kubernetes.yml
  # Reload module configs as they change:
  reload.enabled: false

output.file:
  path: "/usr/share/metricbeat/output"
  filename: metricbeat-log

```

kubernetes.yml

```auto
- module: kubernetes
  metricsets:
    - state_container
    - event
  period: 30s

```

and then i execute metricbeat, and trigger OOMKilled event, but i can't collect about 'kubernetes.container.status.last\_terminated\_reason'

I just collect about 'kubernetes.container.status.reason'

However, i can find the metric in prometheus.  
kube\_pod\_container\_status\_last\_terminated\_reason{ reason="OOMKilled"}

What's the problem??

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 10, 2023, 10:03am UTC](https://discuss.elastic.co/t/last-terminated-reason-metric-is-not-collected/323101/2 "2023-02-10T10:03:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
