Hi community,
I have a prometheus server that is scrapping all the instances from my cloud and also all the pods from the k8s cluster but I’need to exclude kubernetes-pods job from the scrapping but I cannot rid of them :)) , I’ m using the below expression and doesn’t work:
- alert: JobScrapeFailed
expr: max by (job, service, instance) (up{job!="kubernetes-pods"}) == 0
Do you know what is wrong of these expression?
For briefing why I want to exclude the kubernetes-pods job :
- i’ve created 2 alerts , one for instances from my cloud(os.rules.j2) and one for the k8s cluster pods ( kubernetes.rules.j2), and whenever I’m receiving alerts from the os.rules.j2 I also receive alert from kubernetes-pods …
Thank you for answering