I need to sum two separate counter metrics capturing request failures  to 
compute ratio of error requests for an alerting signal. The code 
initializing and setting these counters sits in separate modules preventing 
reuse of one counter.

The problem is when one of the counter is never incremented after a 
restart, service never exports the data point, prometheus will never get 
the time series and the summation will return nothing. 

Is there a way to "force" publish a counter to 0 always on service reboot 
during counter initialization to avoid this problem?

 (fail_count1 + fail_count2) / (total_count1 + total_count2)

-- 
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/36b0cfd6-5796-4a0c-8363-867dbbd21176n%40googlegroups.com.

Reply via email to