Kubernetes Pods: Add kind of creator as label

CMK version: Checkmk Enterprise Edition 2.3.0p3

Usually pods should have the condition READY=true, but pods of jobs may complete at some point and become READY=false. Therefore I want to monitor that all non-job pods are ready.

I have one rule with no conditions:
grafik
and one rule only for job pods only:
grafik

However the condition of the second rule doesn’t scale well as I have to add every single job:
grafik

It would be great if there’s a new label cmk/kubernetes/ownerKind:pod, so I would only need one condition for this rule. The information for this label can be fetched from the metadata of the pod:

$ kubectl get pod descheduler-28778886-b52x5 -o jsonpath='{.metadata.ownerReferences[0].kind}'
Job

PS: That all applies to the condition CONTAINERSREADY as well.

Hello @dahag-mm !

Seems like a good idea for the https://ideas.checkmk.com/ – a place where other users can see and vote for useful ideas for Checkmk development.

https://ideas.checkmk.com/suggestions/583174/kubernetes-pods-add-kind-of-creator-as-label