# How to exclude a drive from an all instances query

**URL:** <https://community.grafana.com/t/how-to-exclude-a-drive-from-an-all-instances-query/11789>\
**Category:** Prometheus\
**Created:** [November 7, 2018, 12:03am UTC](https://community.grafana.com/t/how-to-exclude-a-drive-from-an-all-instances-query/11789 "2018-11-07T00:03:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nlange](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nlange](https://community.grafana.com/u/nlange)\
**Post date:** [November 7, 2018, 12:03am UTC](https://community.grafana.com/t/how-to-exclude-a-drive-from-an-all-instances-query/11789/1 "2018-11-07T00:03:00Z")

</div>

Prometheus version: 2.3.1  
Graphana version: Grafana v5.2.1 (commit: 2040f61)

Hi,

I am using the following query to generate a graph to get a percentage overview of all hard drives for monitored instances via wmi\_exporter in Prometheus.

100.0 - 100 \* (((wmi\_logical\_disk\_free\_bytes{}) / 1024 / 1024 ) / ((wmi\_logical\_disk\_size\_bytes{}) / 1024 / 1024))

This shows me a graph of all instances and each of the hard drives.  
For each instance it shows a hard drive called: HarddiskVolume1, for example ‘server:9182 - HarddiskVolume1’

This drive is available on each instance, but I do not want this one drive to show in the graph.

How can I exclude this one drive for all instances while having all other drives show in the graph?

Many thanks for your assistance.

---

<div class="post-metadata">

**Author:** ![taylorgilligan](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@taylorgilligan](https://community.grafana.com/u/taylorgilligan)\
**Post date:** [November 20, 2018, 7:24pm UTC](https://community.grafana.com/t/how-to-exclude-a-drive-from-an-all-instances-query/11789/2 "2018-11-20T19:24:08Z")

</div>

if you want to select individual drives, you would use volume=“c:”  
if you wanted to exclude a drive, you would use volume!=“c:”

100.0 - 100 \* (((wmi\_logical\_disk\_free\_bytes{volume!=“Harddiskvolume1”}) / 1024 / 1024 ) / ((wmi\_logical\_disk\_size\_bytes{volume!=“Harddiskvolume1”}) / 1024 / 1024))

---

<div class="post-metadata">

**Author:** ![nlange](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nlange](https://community.grafana.com/u/nlange)\
**Post date:** [November 20, 2018, 10:11pm UTC](https://community.grafana.com/t/how-to-exclude-a-drive-from-an-all-instances-query/11789/3 "2018-11-20T22:11:39Z")

</div>

Hi Taylorgilligan,

Thank you that is working perfect!

Thank you for the help!
