Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

Support description annotation which is used by newer alerts #113

Merged
merged 2 commits into from
May 15, 2020

Conversation

runningman84
Copy link
Contributor

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.

@metalmatze
Copy link
Owner

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.

@runningman84
Copy link
Contributor Author

I have added the summary too...

Btw. do you know why the duration is - until it is closed?

@metalmatze
Copy link
Owner

Thanks!

@metalmatze metalmatze merged commit 5efc0bb into metalmatze:master May 15, 2020
@optimistic5
Copy link

optimistic5 commented Jun 3, 2020

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:
#79 (comment)

@metalmatze
Copy link
Owner

I need to cut another release for a docker image to be built and pushed. :)

@runningman84
Copy link
Contributor Author

any news here?

@tcassaert
Copy link

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.

@vidocq1102
Copy link

hi, tcassaert
How to create template, please send me the guide to create template.

@runningman84 runningman84 deleted the patch-2 branch November 19, 2020 07:12
@tcassaert
Copy link

@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.

@vidocq1102
Copy link

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
image
Thanks for reply

@tcassaert
Copy link

@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.

@vidocq1102
Copy link

vidocq1102 commented Nov 20, 2020

Hi @tcassaert
When I add template.paths
--template.paths=/data/default.tmpl
image
Thank you so much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants