Skip to content
Discussion options

You must be logged in to vote

The kubernetes_logs source cannot expose arbitrary fields from the Pod .status object. Its documented enrichment schema includes selected Pod/container identity and metadata (labels, annotations, IPs, owner, etc.), but not status.containerStatuses.

For exit codes, the usual source is kube-state-metrics, which already converts this part of the Pod API into Prometheus metrics:

  • kube_pod_container_status_last_terminated_exitcode
  • kube_pod_container_status_last_terminated_reason
  • kube_pod_container_status_last_terminated_timestamp

Vector can scrape that endpoint and forward the resulting metric events to your existing metrics sink:

sources:
  kube_state_metrics:
    type: prometheus_scrape
    e…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pront
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
domain: metrics Anything related to Vector's metrics events source: kubernetes_logs Anything `kubernetes_logs` source related platform: kubernetes Anything `kubernetes` platform related source: prometheus_scrape Anything `prometheus_scrape` source related
2 participants