From d3d3b431cd1999ba6c4ebf73d0e6be9f8f7ef733 Mon Sep 17 00:00:00 2001 From: Digital Studium Date: Sun, 26 Feb 2023 19:12:02 +0300 Subject: [PATCH] Add web.external-url --- configs/alertmanager.yml | 2 +- docker-compose.yml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configs/alertmanager.yml b/configs/alertmanager.yml index e16015a..73d0f5e 100644 --- a/configs/alertmanager.yml +++ b/configs/alertmanager.yml @@ -12,7 +12,7 @@ receivers: - name: 'telegram' telegram_configs: - bot_token: "00000:ddddddddddddddddddd" - chat_id: -000000 + chat_id: -3453435345 # https://api.telegram.org/botINSERT_BOT_ID_HERE/getUpdates - to get chat_id # amtool --alertmanager.url=http://localhost:9093/ alert add alertname="Test alert" severity="warning" job="test-job" - to send test alert \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 5488352..176e56b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,13 @@ services: image: prom/prometheus:v2.42.0 ports: - "9090:9090" + # Change 127.0.0.1 to ip address of node where docker satck is deployed + command: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus" + - "--web.external-url=http://127.0.0.1:9090" + - "--web.console.libraries=/usr/share/prometheus/console_libraries" + - "--web.console.templates=/usr/share/prometheus/consoles" volumes: - prom-data:/prometheus - ./configs/prometheus/alert_rules.yml:/etc/prometheus/alert_rules.yml @@ -24,6 +31,11 @@ services: image: prom/alertmanager:v0.25.0 ports: - "9093:9093" + # Change 127.0.0.1 to ip address of node where docker satck is deployed + command: + - "--config.file=/etc/alertmanager/alertmanager.yml" + - "--storage.path=/alertmanager" + - "--web.external-url=http://127.0.0.1:9093" volumes: - alert-data:/alertmanager - ./configs/alertmanager.yml:/etc/alertmanager/alertmanager.yml