Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ git clone https://github.com/connext/nxtp-router-docker-compose.git
- `ROUTER_EXTERNAL_PORT`, `GRAFANA_EXTERNAL_PORT`

3. (Optional) Modify `.env` file and set alert notifications to Slack or Discord.
- `DISCORD_WEBHOOK` - optionally set discord webhook tag to receive custom alerts. See [Discord docs](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) to create a webhook.

4. Create NXTP configuration file `~/nxtp-router-docker-compose/config.json`, it will be mounted into router container. See [Connext docs](https://docs.connext.network/Routers/configuration) for configuration description. You can use `config.example.json` as example.

Expand Down
12 changes: 12 additions & 0 deletions data/alertmanagerConfig/alertmanager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# The root route on which each incoming alert enters.
route:
group_by: ['alertname']
group_wait: 20s
group_interval: 5m
repeat_interval: 3h
receiver: discord_webhook

receivers:
- name: 'discord_webhook'
webhook_configs:
- url: 'http://alertmanager-discord:9094'
31 changes: 31 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,36 @@ services:
networks:
- nxtp

alertmanager:
image: prom/alertmanager
restart: always
volumes:
- ./data/alertmanagerConfig:/config
- alertmanager:/data
command:
- --config.file=/config/alertmanager.yml
ports:
- 9093:9093
logging:
driver: json-file
options:
max-size: 10m
networks:
- nxtp

alertmanager-discord:
container_name: alertmanager-discord
image: benjojo/alertmanager-discord
restart: always
environment:
DISCORD_WEBHOOK: $DISCORD_WEBHOOK
logging:
driver: json-file
options:
max-size: 10m
networks:
- nxtp

################################################################################

node-exporter:
Expand Down Expand Up @@ -194,4 +224,5 @@ volumes:
grafana:
loki:
redis_data:
alertmanager: