On 19/07/2022 10:41, Roman Baeriswyl wrote:
Why not both:

idrac_amperage_probe_status{index="1",statusName="other",statusNumber="1"} 0 idrac_amperage_probe_status{index="1",statusName="unknown",statusNumber="2"} 0
idrac_amperage_probe_status{index="1",statusName="ok",statusNumber="3"} 1
idrac_amperage_probe_status{index="1",statusName="nonCriticalUpper",statusNumber="4"} 0 idrac_amperage_probe_status{index="1",statusName="criticalUpper",statusNumber="5"} 0 idrac_amperage_probe_status{index="1",statusName="nonRecoverableUpper",statusNumber="6"} 0 idrac_amperage_probe_status{index="1",statusName="nonCriticalLower",statusNumber="7"} 0 idrac_amperage_probe_status{index="1",statusName="criticalLower",statusNumber="8"} 0 idrac_amperage_probe_status{index="1",statusName="nonRecoverableLower",statusNumber="9"} 0 idrac_amperage_probe_status{index="1",statusName="failed",statusNumber="10"} 0

This way, one can use the name or the number if that would be easier (for < or > checks).

The downside with numeric statuses is that you need more knowledge to use them compared with the label method. I have to know that 7 = unknown or 5 = too hot, etc.

That suggestion wouldn't actually help BTW as the statusNumber is a label so you could only use regex matches rather than >/<. If you wanted that as well you'd need a separate metric (idrac_amperage_probe_status_number or something) that has no labels and just the 1-10 value.

The value of that purely numeric status metric also depends on what the status values actually are. It might be more useful for things which "progress" (good, poor, bad, broken) but probably not for statuses which are unrelated (network error, disk error, hardware fault, temperature error) as you are unlikely to use >/<

--
Stuart Clark

--
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/ad64d7e2-5bb5-ab98-c968-67015a38ee1d%40Jahingo.com.

Reply via email to