Volume Query Specification

16 views
Skip to first unread message

azha...@googlemail.com

unread,
Sep 1, 2020, 7:11:46 AM9/1/20
to Prometheus Users
Hi All

I was wondering if you can advise?

I have the following two Prometheus queries relating to windows disk space usage. The first of which specifically focusing on the drive C: and the second all drives. 


100-(100 - 100 * (windows_logical_disk_free_bytes{volume="C:"} / windows_logical_disk_size_bytes{volume="C:"}))


100 - (100 - 100 * (windows_logical_disk_free_bytes / windows_logical_disk_size_bytes)) 

I would like to use the query to encompass the disk space for all volumes except the system reserved partitions.

Can i please ask if  this is possible and how you would do this? 

------------------------------------
( sudo below .)

100-(100 - 100 * (windows_logical_disk_free_bytes{volume="C:","D:" ...."Z:"} / windows_logical_disk_size_bytes{volume="C:","D:" ...."Z:"}))  

Thank you

azha...@googlemail.com

unread,
Sep 2, 2020, 6:27:09 AM9/2/20
to Prometheus Users
Hi All

I have the answer rather simple. I was exploring more complex ideas but this works.

100-(100 - 100 * (windows_logical_disk_free_bytes{volume=~".:"} / windows_logical_disk_size_bytes{volume=~".:"}))

Reply all
Reply to author
Forward
0 new messages