Could you help me configure the Prometheus Alertmanager custom templates in docker-compose? I tried to write down the path to the templates, but seems I do something wrong.
There is a code of my docker-compose:
alertmanager:
image: prom/alertmanager
container_name: alertmanager
hostname: alertmanager
restart: always
ports:
- "9093:9093"
volumes:
- ./alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml
- ./alertmanager/templates/:/etc/alertmanager/templates/
command:
- '--config.file=/etc/alertmanager/alertmanager.yml'
This is alertmanager.yml
global:
resolve_timeout: 1m
route:
group_by: ['alertname']
group_wait: 3s
receiver: 'telegram_bot'
receivers:
- name: 'telegram_bot'
telegram_configs:
- bot_token: '12345678:AAAAAAAAAAAAAAAAAAAAAAAAAAA'
api_url: 'https://api.telegram.org'
chat_id: -1000000000000
parse_mode: 'HTML'
templates:
- /etc/alertmanager/templates/telegram.tmpl
It won't work
How to properly integrate my own custom Alertmanager template into docker-compose?