Assuming the alert conditions can be detected with a PromQL expression, I can think of 3 options:
* ~~Extend jobs-emailer to receive webhooks from alertmanager (or poll alertmanager)~~ (discarded, jobs-emailer is too specific and tied to k8s events)
* Create a new service that receives webhooks from alertmanager (or that polls alertmanager)
* Let alertmanager send the emails directly, no extra service needed
We already have email aliases that map to all maintainers of a tool, emails can go to that address and not to individual maintainers.
* Letting individual users opt in or out of alerts would be useful, but would also add significant complexity. Let’s keep it out of scope for this task.
If a service remains down for days, how many emails should we send? Just one? One every 24 hours? How do we keep track of emails sent to avoid sending too many?
* Can we leverage alertmanager's `repeat_interval` for this?
* Multi-tool question: will maintainers receive one alert per each tool or will there be some sort of grouping?