Skip to content

Instantly share code, notes, and snippets.

@tanmay-bhat
Created April 5, 2022 11:58
Show Gist options
  • Save tanmay-bhat/928fda8ed580e1fb5353d81091283c47 to your computer and use it in GitHub Desktop.
Save tanmay-bhat/928fda8ed580e1fb5353d81091283c47 to your computer and use it in GitHub Desktop.
PromQL expression to exclude multiple labels

Sample scenario :

How to exclude a specific mount-point value of a specific host in a metric node_filesystem_free_bytes ?

node_filesystem_free_bytes{} unless node_filesystem_free_bytes{instance="10.10.0.1",mountpoint="/dir"}

The above query will show available bytes of all hosts & mountpoints except mountpoint /dir on 10.10.0.1


Stackoverflow answer : Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment