diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-20 22:28:36 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-20 22:28:36 +0700 |
| commit | d0969869954c299c04ea58ab0fda1eba6a0350da (patch) | |
| tree | 8d316903a98e384ffb7746819618521eb66683eb /README.md | |
| parent | bf87c6ad4824c7ed1c990aeff2d2883936c1f20a (diff) | |
| download | lilin-d0969869954c299c04ea58ab0fda1eba6a0350da.tar.xz | |
all: support sending notification to SMTP server (email)
In the main configuration, lilin.cfg, user now can add "notif" section with
kind "smtp" to send notification using user's email.
This require renaming "webhook_url" to "remote_url" to minimize duplicate
field, so different kind of notif can use the same "remote_url" value.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 38 |
1 files changed, 36 insertions, 2 deletions
@@ -112,7 +112,7 @@ timeout = 60s ``` Sample of service configuration that monitor TCP service at -127.0.0.1:5432 every 90 seconds with timeout 30 seconds, +127.0.0.1:5432 every 90 seconds with 30 seconds timeout, ``` [service] @@ -127,18 +127,21 @@ timeout = 30s Lilin support sending notification to, - Mattermost using incoming webhook. +- SMTP server (email). See the next section on how to use the notification. ### Mattermost incoming webhook +<!--{{{--> + In the main configuration, add the section "notif" with the following format, ``` [notif] kind = mattermost -webhook_url = # The incoming webhook URL. +remote_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. @@ -170,6 +173,37 @@ will be rendered as 2025-09-26 06:38:11 +0000 UTC: Service http-server is down: 503 Service Unavailable ``` +<!--}}}--> + +### SMTP server + +<!--{{{--> + +``` +[notif] +kind = smtp +remote_url = <scheme "://" (domain | ip_address [":" port])> +user = +password = +recipient = +``` + +The `remote_url` define the SMTP server address. +The scheme in `remote_url` can be set either to, + +- smtps: implicit TLS, connect to port 465 by default +- smtp+starttls: explicit STARTTLS, connect to port 587 by default. + +The `user` field define the sender email address. + +The `password` field define the password for authentication, on behalf of +the `user`. + +The `recipient` is the email address that will receives the notification. +This field can be defined multiple times. + +<!--}}}--> + ## Links [Project page](https://sr.ht/~shulhan/lilin). |
