diff options
| author | Shulhan <ms@kilabit.info> | 2025-08-29 01:37:28 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-09-26 13:59:58 +0700 |
| commit | 62161730b5802c4206f0cc169a744b364576bb74 (patch) | |
| tree | 914389da9748b3b7cff731357deff7026273d22f /README.md | |
| parent | b6530117f0dcc554114bfac8b86d9fb1fde605c4 (diff) | |
| download | lilin-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 'README.md')
| -rw-r--r-- | README.md | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..27b26fa --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# lilin + +## Notification + +Lilin support sending notification to, + +- Mattermost using incoming webhook. + +See the next section on how to use the notification. + +### Mattermost incoming webhook + +In the server configuration, add the section "notif" with the following +format, + +``` +[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. +``` + +The `down_template` and `up_template` can contains the following variables, + +- .ID: the service ID +- .At: the time when service up or down +- .Error: the error message that cause the service marked as down + +For example, given the following scan report value, + +``` +.ID: http-server +.At: 2025-09-26 06:38:11 +0000 UTC +.Error: 503 Service Unavailable +``` + +The following `down_template` + +``` +{{.At}}: Service {{.ID}} is down: {{.Error}} +``` + +will be rendered as + +``` +2025-09-26 06:38:11 +0000 UTC: Service http-server is down: 503 Service Unavailable +``` |
