0

I am doing a fairly simple monitoring setup based on Prometheus and Alertmanager (main branch). Reciver - Telgram chat. As alertmanager supports Telegram as a reciver since v0.21, i would like to avoid using another webhooks.

Everything works as I would like it to; however, I really want to add a "New" or "Continuing" alert flag to the message template.

Inside Alertmanager, there are no such flags (there are actually two - Firing and Resolved).

The only solution I can think of is to use the value of group_interval for each alert and compare it with the duration.

If the duration is greater than or equal, then the alert is old.

Otherwise, it's new.

However, it is impossible to access configuration parameter values from the alert template.

Therefore, the next approach is clear - to create a setenv.sh and pull interval and expectation values through variables inside the container.

The problem is that the Alertmanager container does not have the necessary functions to build in this way.

Although it's not a problem to rebuild it with the necessary functions, I thought maybe someone has a simpler solution? It seems like quite a lot of effort for a single flag.

0