You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Hi all, I'm currently struggling to use reusable templates on Prometheus alert annotation descriptions.
I'm using prometheus docker image and I've set a custom path in "--web.console.libraries" (e.g. "/path/to/libraries/") I defined a file (e.g. "/path/to/libraries/alert-mytemplate.lib") with a template: {{ define "mytemplate" }} ...
{{ end }}
And added this on some alerts annotations: description: "{{ template \"mytemplate\" (args ...) }}"
However in runtime I still get the error that the template is not found whenever the alert is triggered: template \"mytemplate\" not defined
I'm trying to follow the instructions in [1][2] but I'm currently blocked, can anyone understand what is it missing here?