If your goal is to send an alert notification only after it has been firing for some time, the usual way of doing that in Prometheus would be to use the "for" duration field in the alerting rule to define how long the alert has to be active before it transitions from "pending" into "firing" state (at which point it gets sent to AM and routed there).
If you do want to route it before that duration already, but to a different subtree / notifier in your AM routes, you could define the alerting rule twice in Prometheus with differentiating labels and different "for" durations. On Thu, Jan 21, 2021 at 5:58 PM steve waldron <[email protected]> wrote: > Is it possible to add a label with a dynamic value? for example - the > amount of time an alert has been firing? if so, any examples of PROMQL > queries to accomplish this? > > I'm trying to determine if routes can be created using a label defined by > length of time an alert has been firing. > > Thanks , > Steve > > -- > 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/7678533f-7140-4bf6-8fa7-37081ab37ae4n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/7678533f-7140-4bf6-8fa7-37081ab37ae4n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Julius Volz PromLabs - promlabs.com -- 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/CAObpH5z1BYT__azu%3DHpsK%2ByW1aJx4S4j2MK0mryh0gT1ASrX%3DQ%40mail.gmail.com.

