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,
https://prometheus.io/docs/prometheus/latest/configuration/template_examples/

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.


-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/6b8b1ed4-60b1-4eea-b112-a28b615f3667n%40googlegroups.com.

Reply via email to