Add and configure Alertmanager

This commit is contained in:
Thomas Kleinendorst 2024-09-16 13:16:25 +02:00
parent c4fd9047f7
commit 79913e9d03
3 changed files with 32 additions and 2 deletions

View file

@ -3,7 +3,24 @@
prometheus_version: "2.54.1"
prometheus_targets:
node:
targets:
- raspberry-pi-1.kleinendorst.info:9100
- targets:
- raspberry-pi-1.kleinendorst.info:9100
prometheus_alertmanager_config:
- static_configs:
- targets:
- raspberry-pi-1.kleinendorst.info:9093
# Node exporter
node_exporter_version: "1.8.2"
# Alertmanager
alertmanager_version: "0.27.0"
# Telegram configuration inspired by this source:
# https://www.stranatesta.eu/tech/how-to-configure-prometheus-alertmanager-to-send-alerts-to-telegram/#configure-alertmanager
alertmanager_receivers:
- name: telegram
telegram_configs:
- bot_token: "{{ telegram_bot_token }}"
api_url: 'https://api.telegram.org'
chat_id: "{{ telegram_chat_id }}"
parse_mode: ''
alertmanager_route:
receiver: telegram

View file

@ -0,0 +1,10 @@
$ANSIBLE_VAULT;1.1;AES256
39623466373835376134656330346565393137353735626466316262343939303563336634393337
6265323966383732393138383339393130663164633039390a366361346331323235323763636561
35373334656435323933663235656334353338643563303335373039326466366662363066363939
3730653136366166370a366636306438356461656239376465653763663566333036353439663265
39653731313366373166613237346133616232373566373835393063303035663037663735663130
33643438663662393135643639646662303431376366656138666536323336633966656464346262
35613861346661613566303865376539316631613837373263653238363565353662303539616637
30643730646261336536663865386562313466383066373861383435353366313064653433643531
65613963396664616565333832613632626665313638353366646665353836653337