Hi, everyone.

Sorry, I'm new to Prometheus.
I would like to add a status label only to the node metric: 
node_boot_time_seconds.

Ground:
Exporters generally only deliver measured values.
I would like to evaluate a measured value in just one place (Prometheus / 
Grafana).

Idea:
After querying the measured value, determine the status and save it in the 
'State' Label.

Logic:
t = time () - node_boot_time_seconds {instance = "<Host>: 9100", job = 
"node"}
t < 50d: state = Ok (0)
t < 75d: state = Warning (1)
t > 75d: state = Critical (2)
t == null: state = Unknown (3)

What would be best practice in this case?

Thanks and regards,
Thomas

-- 
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/8202232a-7b24-4cd5-8c27-5f0a34c1040bn%40googlegroups.com.

Reply via email to