Hi Sebastian, What error are you getting and what's your config? The first answer puts the current time of the evaluation of the alerting rule into the "time" annotation (which wouldn't necessarily be the time the alert started firing, but the last time it was still evaluated as firing). The second Stack Overflow answer is maybe more what you want, accessing the ".StartsAt" field of an alert directly from an Alertmanager notification template, and thus telling you when the alert first started firing. If you share what you already have (and which kind of timestamp you expect), maybe we can help you make it work.
Regards, Julius On Tue, May 3, 2022 at 11:49 AM Sebastian Osztovits < [email protected]> wrote: > > Hello, > I'm currently using Alert manager 0.22.2 and Prometheus 2.18.1. > I have tried to alter my alert as shown in stack overflow post: > > > https://stackoverflow.com/questions/41069912/populating-a-date-time-in-prometheus-alert-manager-e-mail > yet i am met with an error message when doing so. > Does anyone have and email Template where they successfully added a > Timestamp? > Thanks in advance. > Best Regards, > Sebastian > > -- > 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/e03a03be-4d88-4ded-b969-f36a06c469f2n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/e03a03be-4d88-4ded-b969-f36a06c469f2n%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/CAObpH5xwe-Ah1aN3c9nqs3rQ3heeVT%2BfCmOy_bQ%2BuadpKzN%3DCQ%40mail.gmail.com.

