predict_linear(node_filesystem_free_bytes{fstype!~"tmpfs",job!~"example.*",mountpoint!~"/var/cache/fscache"}[1h],
 
4 * 3600) < 0

Label filter conditions are combined using "AND".  So this expression will 
only return metrics where:

* the metric name is "node_filesystem_free_bytes" AND
* the fstype does not match "tmpfs" AND
* the job does not match "example.*" AND
* the mountpoint does not match "/var/cache/fscache AND
* the predict_linear computed value is less than 0

Therefore, you have excluded /var/cache/fscache from all jobs (not just the 
example job), and you have excluded job "example.*" entirely.

What you describe needs two rules:

predict_linear(node_filesystem_free_bytes{fstype!~"tmpfs",job=~"example.*",mountpoint!~"/var/cache/fscache"}[1h],
 
4 * 3600) < 0
predict_linear(node_filesystem_free_bytes{fstype!~"tmpfs",job!~"example.*"}[1h],
 
4 * 3600) < 0

Aside 1: some of those don't need regexps. You could write 
fstype!="tmpfs",mountpoint!="/var/cache/fscache"
Aside 2: normally hosts are identified by "instance" label rather than "job"

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/d048aabb-4b76-4a28-b709-1769700bac0c%40googlegroups.com.

Reply via email to