mirror of
https://github.com/logos-messaging/logos-messaging-simulator.git
synced 2026-01-07 08:23:11 +00:00
adding support for discord webhook in env
This commit is contained in:
parent
fc0247055c
commit
59fce1f324
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
*.env
|
*.env
|
||||||
!wakusim.env
|
!wakusim.env
|
||||||
|
alertmanager-config.yml
|
||||||
|
|||||||
@ -108,7 +108,7 @@ services:
|
|||||||
image: prom/prometheus:latest
|
image: prom/prometheus:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./monitoring/prometheus-config.yml:/etc/prometheus/prometheus.yml:z
|
- ./monitoring/prometheus-config.yml:/etc/prometheus/prometheus.yml:z
|
||||||
- ./monitoring/alert-rules.yml:/etc/prometheus/alert-rules.yml:z
|
- ./monitoring/alert-manager/alert-rules.yml:/etc/prometheus/alert-rules.yml:z
|
||||||
command:
|
command:
|
||||||
- --config.file=/etc/prometheus/prometheus.yml
|
- --config.file=/etc/prometheus/prometheus.yml
|
||||||
- --storage.tsdb.retention.time=7d
|
- --storage.tsdb.retention.time=7d
|
||||||
@ -218,14 +218,25 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- simulation
|
- simulation
|
||||||
|
|
||||||
|
env_replacer:
|
||||||
|
image: alpine:3.19.1
|
||||||
|
environment:
|
||||||
|
- DISCORD_WEBHOOK=$DISCORD_WEBHOOK
|
||||||
|
volumes:
|
||||||
|
- ./monitoring/alert-manager/alertmanager-config.yml.template:/etc/alertmanager/alertmanager.yml.template:z
|
||||||
|
- ./monitoring/alert-manager/alertmanager-config.yml:/etc/alertmanager/alertmanager.yml:z
|
||||||
|
command: ["/bin/sh", "-c", "apk add --no-cache gettext && envsubst < /etc/alertmanager/alertmanager.yml.template > /etc/alertmanager/alertmanager.yml"]
|
||||||
|
|
||||||
alertmanager:
|
alertmanager:
|
||||||
image: prom/alertmanager:latest
|
image: prom/alertmanager:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./monitoring/alertmanager-config.yml:/etc/alertmanager/alertmanager.yml:z
|
- ./monitoring/alert-manager/alertmanager-config.yml:/etc/alertmanager/alertmanager.yml:z
|
||||||
command:
|
command:
|
||||||
- --config.file=/etc/alertmanager/alertmanager.yml
|
- --config.file=/etc/alertmanager/alertmanager.yml
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:9093:9093
|
- 127.0.0.1:9093:9093
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
networks:
|
networks:
|
||||||
- simulation
|
- simulation
|
||||||
|
depends_on:
|
||||||
|
- env_replacer
|
||||||
@ -3,7 +3,7 @@ groups:
|
|||||||
rules:
|
rules:
|
||||||
- alert: HighNimWakuMemUsage
|
- alert: HighNimWakuMemUsage
|
||||||
expr: >
|
expr: >
|
||||||
nim_gc_mem_bytes{} > 1073741824
|
nim_gc_mem_bytes{} > 1
|
||||||
for: 5m
|
for: 5m
|
||||||
annotations:
|
annotations:
|
||||||
summary: "Too high memory usage for {{ $labels.instance }}"
|
summary: "Too high memory usage for {{ $labels.instance }}"
|
||||||
11
monitoring/alert-manager/alertmanager-config.yml.template
Normal file
11
monitoring/alert-manager/alertmanager-config.yml.template
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
route:
|
||||||
|
group_by: ['alertname']
|
||||||
|
group_wait: 10s
|
||||||
|
group_interval: 10s
|
||||||
|
repeat_interval: 2m
|
||||||
|
receiver: 'discord'
|
||||||
|
|
||||||
|
receivers:
|
||||||
|
- name: 'discord'
|
||||||
|
discord_configs:
|
||||||
|
- webhook_url: ${DISCORD_WEBHOOK}
|
||||||
@ -1,11 +0,0 @@
|
|||||||
route:
|
|
||||||
group_by: ['alertname']
|
|
||||||
group_wait: 60s
|
|
||||||
group_interval: 5m
|
|
||||||
repeat_interval: 1d
|
|
||||||
receiver: 'discord'
|
|
||||||
|
|
||||||
receivers:
|
|
||||||
- name: 'discord'
|
|
||||||
discord_configs:
|
|
||||||
- webhook_url: # TO DO: fill discord webhook
|
|
||||||
Loading…
x
Reference in New Issue
Block a user