From 151fdc4b006031110c850b90574c62edab4972db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sat, 8 Nov 2025 19:59:58 +0100 Subject: [PATCH] feat: configure Mattermost webhook integrations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added Mattermost webhook notifications for infrastructure services: - **Netdata**: Health monitoring alerts sent to Mattermost - Configured via MATTERMOST_WEBHOOK_URL environment variable - All alert roles route to Mattermost notifications channel - **Restic/Backrest**: Backup status notifications - Webhook URL passed as environment variable - Backrest web UI can be configured to use the webhook - **Watchtower**: Container update notifications - Uses Shoutrrr mattermost:// URL format - Sends notifications when containers are updated Configuration: - Webhook URL stored securely in .env file - All services reference ${MATTERMOST_WEBHOOK_URL} variable - Watchtower uses specialized Shoutrrr format URL 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- arty.yml | 1 + netdata/compose.yaml | 1 + netdata/health_alarm_notify.conf | 21 +++++++++++++++++++++ restic/compose.yaml | 1 + 4 files changed, 24 insertions(+) diff --git a/arty.yml b/arty.yml index b9707f2..f953e75 100644 --- a/arty.yml +++ b/arty.yml @@ -163,6 +163,7 @@ envs: WATCHTOWER_RUN_ONCE: false WATCHTOWER_LOG_LEVEL: info WATCHTOWER_ROLLING_RESTART: false + WATCHTOWER_NOTIFICATIONS: mattermost scripts: config: docker compose config diff --git a/netdata/compose.yaml b/netdata/compose.yaml index 0b774a0..e973232 100644 --- a/netdata/compose.yaml +++ b/netdata/compose.yaml @@ -33,6 +33,7 @@ services: - NETDATA_CLAIM_TOKEN=${NETDATA_CLAIM_TOKEN:-} - NETDATA_CLAIM_URL=${NETDATA_CLAIM_URL:-} - NETDATA_CLAIM_ROOMS=${NETDATA_CLAIM_ROOMS:-} + - MATTERMOST_WEBHOOK_URL=${MATTERMOST_WEBHOOK_URL:-} networks: - compose_network labels: diff --git a/netdata/health_alarm_notify.conf b/netdata/health_alarm_notify.conf index 5ac1c43..096b100 100644 --- a/netdata/health_alarm_notify.conf +++ b/netdata/health_alarm_notify.conf @@ -24,3 +24,24 @@ role_recipients_email[dba]="${ADMIN_EMAIL}" role_recipients_email[webmaster]="${ADMIN_EMAIL}" role_recipients_email[proxyadmin]="${ADMIN_EMAIL}" role_recipients_email[sitemgr]="${ADMIN_EMAIL}" + +############################################################################### +# Mattermost notifications +############################################################################### + +# Enable Mattermost notifications +SEND_MATTERMOST="YES" + +# Mattermost incoming webhook URL +MATTERMOST_WEBHOOK_URL="${MATTERMOST_WEBHOOK_URL}" + +# Mattermost channel (optional, webhook default channel will be used if empty) +DEFAULT_RECIPIENT_MATTERMOST="" + +# Mattermost notification recipients per role +role_recipients_mattermost[sysadmin]="notifications" +role_recipients_mattermost[domainadmin]="notifications" +role_recipients_mattermost[dba]="notifications" +role_recipients_mattermost[webmaster]="notifications" +role_recipients_mattermost[proxyadmin]="notifications" +role_recipients_mattermost[sitemgr]="notifications" diff --git a/restic/compose.yaml b/restic/compose.yaml index f7d898c..d16f82c 100644 --- a/restic/compose.yaml +++ b/restic/compose.yaml @@ -38,6 +38,7 @@ services: BACKREST_CONFIG: /config/config.json XDG_CACHE_HOME: /cache TMPDIR: /tmp + MATTERMOST_WEBHOOK_URL: ${MATTERMOST_WEBHOOK_URL:-} networks: - compose_network