On 17 Mar 22:33, Christian Hoffmann wrote:
> Hi,
> 
> On 3/17/20 10:33 AM, Yagyansh S. Kumar wrote:
> > Hi. I want to extract the age of the alerts(i.e from when the alert is
> > Critical or Warning or even Resolved). Is this possible?
> 
> Where are you looking for that?
> 
> Within Prometheus? You could try deriving that from the ALERTS meta
> metric which gets generated automatically.

Hi,

Within Prometheus you have the timestamp in ALERTS_FOR_STATE. However
that is more an "internal" metric that is there for keeping the state
of alerts across restarts, so use with care.

regards,

> 
> From the Alertmanager API? You should be able to get a startsAt value there.
> 
> Kind regards,
> Christian
> 
> -- 
> 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/9d8806d2-9ee8-5c65-670b-d92811869810%40hoffmann-christian.info.

-- 
 (o-    Julien Pivotto
 //\    Open-Source Consultant
 V_/_   Inuits - https://www.inuits.eu

-- 
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/20200317213648.GA6664%40oxygen.

Attachment: signature.asc
Description: PGP signature

Reply via email to