Last_terminated_reason metric is not collected

I want to collect 'kubernetes.container.status.last_terminated_reason' metric in document (Kubernetes fields | Metricbeat Reference [8.6] | Elastic)

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

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

- 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??

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