diff options
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 +``` |
