How to exclude a drive from an all instances query

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.

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))

1 Like

Hi Taylorgilligan,

Thank you that is working perfect!

Thank you for the help!