# Expression that doesn't work

**URL:** https://discuss.prometheus.io/t/expression-that-doesnt-work/1279
**Category:** Prometheus server
**Created:** [November 8, 2022, 1:07pm UTC](https://discuss.prometheus.io/t/expression-that-doesnt-work/1279 "2022-11-08T13:07:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![slack](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@slack](https://discuss.prometheus.io/u/slack)
#### Post date: [November 8, 2022, 1:07pm UTC](https://discuss.prometheus.io/t/expression-that-doesnt-work/1279/1 "2022-11-08T13:07:43Z")

</div>

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:

```auto
  - 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 🙂
