adding alert templates support for AlertManager#1237
adding alert templates support for AlertManager#1237khaines merged 2 commits intocortexproject:masterfrom
Conversation
Signed-off-by: Roger Steneteg <rsteneteg@ea.com>
Signed-off-by: Roger Steneteg <rsteneteg@ea.com>
khaines
left a comment
There was a problem hiding this comment.
Approved from internal reviews. Needs another maintainer's approval as well.
|
This PR adds the ability to add reusable templates in the Alert Managers notification output to the receivers. As described here https://prometheus.io/docs/alerting/notification_examples/#defining-reusable-templates This can be used to avoid repeating alert templates in the configuration in the alertmanager config, or moving long multiline alert templates into separate files to make the alert manager configuration file leaner |
|
Just looked this over again - it actually writes out disk files for the templates? |
|
@bboreham yes, the template files are written to disk, just as silences are. The alertmanager uses this Prometheus package to load templates from files on disk "github.com/prometheus/alertmanager/template". And as you said, they are rewritten and reloaded each time the config changes. |
Signed-off-by: Roger Steneteg rsteneteg@ea.com