Hi all:
I have a number of computers, and each has a number of disks. The metrics I
am interested in are like this:
windows_logical_disk_free_bytes{instance="PC1",volume="HarddiskVolume1"}
windows_logical_disk_free_bytes{instance="PC1",volume="HarddiskVolume2"}
windows_logical_disk_free_bytes{instance="PC1",volume="HarddiskVolume3"}
windows_logical_disk_free_bytes{instance="PC2",volume="HarddiskVolume1"}
windows_logical_disk_free_bytes{instance="PC2",volume="HarddiskVolume2"}
windows_logical_disk_free_bytes{instance="PC2",volume="HarddiskVolume3"}
...
I am using an alert like this, which I found on the Internet:
- alert: DiskSpaceUsageOnWindows
expr: 100.0 - 100 * (windows_logical_disk_free_bytes /
windows_logical_disk_size_bytes) > 50
for: 10m
labels:
severity: warning
annotations:
summary: "Disk Space Usage (instance {{ $labels.instance }})"
The trouble is, I want a different alert threshold depending on the disk,
and the thresholds can be pretty arbitrary.
What is the best way to achieve that?
If using arbitrary values is hard in Prometheus, I can live with a few
predefined groups like these:
alarm_threshold_for_disk_full_a: 50%
alarm_threshold_for_disk_full_b: 90%
I could then add particular labels to specific disk metrics. For example,
I could add "alarm_threshold_for_disk_full_a" to disks {"PC1",
"HarddiskVolume2"} and {"PC2", "HarddiskVolume3"}.
Then I can write an alert rule for each label.
I have seen a way to add a label to all metrics of a particular target, but
how do I add a label to a particular metric in a particular target? Do I
have to resort to some "metric_relabel_configs" magic? Could someone
provide an example on how to do that?
Thanks in advance,
rdiez
--
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/771371fe-58f0-4d22-a7c7-8e72e09b9167n%40googlegroups.com.