Hello,
I use last version prometheus and alertmanger -(Nov 2023)
I'm try use Prometheus templating. anyone can explain how define template?
many sample here in the official website,
but they dont describe where put the template exactly ? which file ?
{{/* Define the template */}}
{{define "myTemplate"}}
do something
{{end}}
{{/* Use the template */}}
{{template "myTemplate"}}
Ok, but where, put this ?
I can declare template file in /.../alertmanager.yml (conf file)
templates:
- /etc/prometheus/templates/*.tmpl
--------------------------------------
Final goal : reduce a text in rule of alertmanager (for alerta)
I hope to get help with this case. thanks all.