| Age | Commit message (Collapse) | Author |
|
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.
|
|
Instead of using name, which may contains space, use the
file name as service ID.
In this way, the log file name will match with the service
file name.
|
|
Options means optional, while the field in struct may contains
mandatory or must not be empty.
|
|
|
|
The Start method start the scanning periodically and send the report
to channel reportq.
The Stop method stop the periodic scanning.
This changes introduces new option Interval in the Service that define
the time interval between each scan.
|
|
Instead of defining the options in the Service, create it in the
ServiceOptions and pass it to NewService function.
In this way, we can check it, initialize it, and set default value.
The Address option now use URL with scheme, so we can derive the
service type based on the scheme, for example "http://" for HTTP based
service, "tcp://xxx" for TCP based service, and so on.
|
|
The service configuration is stored under "$BASE_DIR/etc/lilin/service.d".
with ".cfg" as the file extension.
The service configuration use INI format.
|