timealertprometheus

Populating a Date/Time in Prometheus Alert Manager E-mail


So i have an alert rule that gets fired in prometheus when a queue length has been long for a certain period of time.

Through the alert manger, I am able to create and receive e-mails.

My question now is, as part of my e-mail body, I want to have the Date and Time that either the alert manager triggered the e-mail, or of when the alert was fired.

I am unsure how to do this. Whether I can create a label in the alert and populate it somehow with the current date/time, or what? Any ideas?


Solution

  • The alerts in the Alertmanager templates have a StartsAt attribute you could use.