GoogleCloudPlatform / prometheus-engine

Google Cloud Managed Service for Prometheus libraries and manifests.
https://g.co/cloud/managedprometheus
Apache License 2.0
195 stars 92 forks source link

alertmanager: support for reusable templates #473

Open nick-jones opened 1 year ago

nick-jones commented 1 year ago

https://prometheus.io/docs/alerting/latest/notification_examples/#defining-reusable-templates

Please correct me if I'm wrong, but I don't see any support for defining and loading these in just yet. Reusable templates are a useful feature when configuring receivers.

It seems they could be defined in a configmap or secret in gmp-public and then the operator could take care of copying to gmp-system and volume mounting into alertmanager? I'm guessing this could be similar to how this is handled by prometheus-operator https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/alerting.md#using-a-kubernetes-secret

pintohutch commented 1 year ago

Hi @nick-jones,

Yes indeed you are correct and thanks for raising this point. I think what you suggested makes sense as a potential path forward to support this.

Marking this as a feature enhancement.

adamstrawson commented 1 year ago

@pintohutch Is this on the roadmap at all, or would you be open to contributions?

We're keen to start adopting Alertmanager as part of GMP, but not being able to handle reusable templates adds friction for us.

pintohutch commented 1 year ago

Hey @adamstrawson - we are absolutely open to contributions!

In general, we're de-emphasizing the managed alertmanager, preferring to recommend Cloud Alerting's promQL support.

However, we will continue to support this and will happily review any contributions.