On 19/10/2020 22:02, Arnav Bose wrote:
Hi,

I have a metric which sends data only in case of a specific event. In other words, it will not have regular continuous telemetry every 15 seconds, but it will be there for a single data point. Now, I configured an alert to check if the metric exists (did not include any 'for' condition in the rule as there is no need to wait), an alert should trigger. What is happening is that when the metric becomes available in Prometheus, the rule gets activated to yellow, but instead of firing,  it automatically goes away within 15 seconds. Is there some additional setting I have to do to alert on event based metric which lasts for only 1 single datapoint or 15s ?


As Brian mentions the metric should continue to exist, rather than regularly disappearing. Normally you would use a counter which is incremented every time an event happens. Are you using one of the Prometheus client libraries, as these should make it very easy to setup?

--
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/841f5488-7a75-55d1-1f90-2e07a1909ca1%40Jahingo.com.

Reply via email to