# Excluding a label value from a specific host only

**URL:** <https://discuss.prometheus.io/t/excluding-a-label-value-from-a-specific-host-only/802>\
**Category:** PromQL\
**Created:** [February 25, 2022, 9:34am UTC](https://discuss.prometheus.io/t/excluding-a-label-value-from-a-specific-host-only/802 "2022-02-25T09:34:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avinvarghese](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/avinvarghese/32/366_2.png) [@avinvarghese](https://discuss.prometheus.io/u/avinvarghese)\
**Post date:** [February 25, 2022, 9:34am UTC](https://discuss.prometheus.io/t/excluding-a-label-value-from-a-specific-host-only/802/1 "2022-02-25T09:34:30Z")

</div>

I’ve below metrics in Prometheus

```auto
{hostname="HOST-A",mountpoint="/DIR/1"} 0
{hostname="HOST-B",mountpoint="/DIR/2"} 0
{hostname="HOST-B",mountpoint="/DIR/7"} 0
{hostname="HOST-C",mountpoint="/DIR/3"} 0
{hostname="HOST-D",mountpoint="/DIR/4"} 0

```

How can I exclude a specific mount point from a single host only?

I use below expresson to get FS utilization  
`100 - (100 * node_filesystem_avail_bytes / node_filesystem_size_bytes)`

Trying to achieve is exclude a specific host and all content inside a mount point. From `hostname="HOST-B" and mountpoint="/DIR/.*" `

current expr: `100 - (100 * node_filesystem_avail_bytes{hostname="HOST-B",mountpoint!~"/DIR/.*"} / node_filesystem_size_bytes{hostname="HOST-B",mountpoint!~"/DIR/.*"})`

How can we modify the expression and incldue other host to the metrics returned from Prometheus

---

<div class="post-metadata">

**Author:** ![richard.crist](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/richard.crist/32/374_2.png) [@richard.crist](https://discuss.prometheus.io/u/richard.crist)\
**Post date:** [March 4, 2022, 10:52pm UTC](https://discuss.prometheus.io/t/excluding-a-label-value-from-a-specific-host-only/802/2 "2022-03-04T22:52:08Z")

</div>

(100 - (100 \* node\_filesystem\_avail\_bytes{instance!=“PDC00synb210L:9100”} / node\_filesystem\_size\_bytes{instance!=“PDC00synb210L:9100”})) or (100 - (100 \* node\_filesystem\_avail\_bytes{instance=“PDC00synb210L:9100”,mountpoint!="/opt"} / node\_filesystem\_size\_bytes{instance=“PDC00synb210L:9100”,mountpoint!="/opt"}))

I used above technique on my system to do something similar to what you are asking. I use the “or” technique to include all things for instance not equal to certain value, then add the certain instance for all except certain mountpoint.
