aboutsummaryrefslogtreecommitdiff
path: root/testdata/server_config
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-08-29 01:37:28 +0700
committerShulhan <ms@kilabit.info>2025-09-26 13:59:58 +0700
commit62161730b5802c4206f0cc169a744b364576bb74 (patch)
tree914389da9748b3b7cff731357deff7026273d22f /testdata/server_config
parentb6530117f0dcc554114bfac8b86d9fb1fde605c4 (diff)
downloadlilin-62161730b5802c4206f0cc169a744b364576bb74.tar.xz
all: implement notification using Mattermost incoming webhook
In the server configuration, one can defined the following section to send the notification using Mattermost, [notif] kind = mattermost webhook_url = # The incoming webhook URL. channel = # The channel where the notification will be placed. down_template = # Message template when service is down. up_template = # Message template when service is up.
Diffstat (limited to 'testdata/server_config')
-rw-r--r--testdata/server_config/ok/etc/lilin/lilin.cfg19
1 files changed, 19 insertions, 0 deletions
diff --git a/testdata/server_config/ok/etc/lilin/lilin.cfg b/testdata/server_config/ok/etc/lilin/lilin.cfg
new file mode 100644
index 0000000..ef179d4
--- /dev/null
+++ b/testdata/server_config/ok/etc/lilin/lilin.cfg
@@ -0,0 +1,19 @@
+## SPDX-FileCopyrightText: 2025 M. Shulhan <ms@kilabit.info>
+## SPDX-License-Identifier: GPL-3.0-only
+
+[server]
+address = 127.0.0.1:12121
+
+[notif]
+kind = mattermost
+webhook_url = http://127.0.0.1:12000
+channel = chan_1
+down_template = Service {{.ID}} is down: {{.Error}}
+up_template = Service {{.ID}} is up again!
+
+[notif]
+kind = mattermost
+webhook_url = http://127.0.0.1:12001
+channel = chan_2
+down_template = Service {{.ID}} is down: {{.Error}}
+up_template = Service {{.ID}} is alive!