Closed runningman84 closed 4 years ago
Thanks for taking a look at this. Maybe for completeness we could also add summary too?
It was summary & description in Prometheus for a fair amount of time then we pivoted towards simply using message, as summary and description more than often were super similar.
I have added the summary too...
Btw. do you know why the duration is - until it is closed?
Thanks!
Hi @metalmatze Could you please, update docker image, probably it is outdated from current master.
I use 0.4.2 and have the same massage like here: https://github.com/metalmatze/alertmanager-bot/issues/79#issue-497849793
I need to cut another release for a docker image to be built and pushed. :)
any news here?
While you're waiting for the release, you can easily add the template yourself with the TEMPLATE_PATHS
environment variable. Create a directory with the template and mount it in your docker container, then set the value of the TEMPLATE_PATHS
environment variable to that directory.
hi, tcassaert How to create template, please send me the guide to create template.
@nguyencuong1990 you create a file for your template, let's say /opt/template.tmpl
. The content of that file is an adapted version of https://github.com/metalmatze/alertmanager-bot/blob/master/default.tmpl, according to your needs.
Then when you start the telegram-bot, you can pass an environment variable TEMPLATE_PATHS=/opt/template.tmpl
.
hi @tcassaert I was read https://github.com/metalmatze/alertmanager-bot/blob/master/default.tmpl I want monitor my Vmware vcenter system. But only show FIRING on telegram group. The rule apply of my case: https://gitlab.com/Danny_Pham/toivietblog/-/raw/master/Monitoring/Prometheus%20+%20Grafana/prometheus%20rules/vcenter.yml?inline=false Thanks for reply
@nguyencuong1990, in your rules file, your annotation Summary
is written with a capital S
, while the template is looking for a summary
with a regular s
. That's probably why it's not included in the alert message.
Hi @tcassaert When I add template.paths --template.paths=/data/default.tmpl Thank you so much!
I am not 100% sure if this works please double check...
The current template lacks description support and the duration could also be hidden if there is no end date? In my tests it is "-" until the event is solved.