> Just create a new timeseries called, say, "windows_logical_disk_used_threshold_percent". > Give it the same set of labels as "windows_logical_disk_free_bytes" - at least 'instance' and 'volume'.
I understand now. The trick is that the labels match between the timeseries. Labels 'instance' and 'volume' would match between disk metric and threshold metric, so each disk gets mapped to its threshold. It looks workable, and is probably cleaner in a theoretical way. But it looks complicated. You have to learn about 'ignoring' and 'honor_labels'. You have to scrape an artificial metric, and worry about details such as how to get a warning if you forget one of the disk volumes in the threshold metric. I think that adding a label per disk metric is simpler, at least for a very small network like mine. I guess it would be very simple then to write an alert for disks where you forgot a threshold label. > [...] > Secondly, if you change the thresholds to use, the labelsets will change, > which means they become different timeseries. I don't think that becoming a different timeseries because a label has changed is really a problem in practice, at least for a simple monitoring system like mine. Anyway, even if it is not a good solution, I would still like to know the best way to add a label to just one metric inside a scraping target. That may be useful in other situations. Is there a nice way to do that? Or do I have to resort to some "metric_relabel_configs" magic? Best regards, 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/6fe9fa56-6b9e-409f-a034-1330bd9c7637n%40googlegroups.com.

