1
0
mirror of https://github.com/pcvolkmer/checkbar.git synced 2025-07-02 06:22:53 +00:00

Implement simple parser for update interval duration

This commit is contained in:
2022-12-27 22:26:39 +01:00
parent 1d7b163035
commit 1d56580135
5 changed files with 118 additions and 5 deletions

View File

@ -31,6 +31,14 @@ url = "tcp://app.example.com:12345"
check_type = "Tcp"
----
The value for `interval` can be set by using plain seconds or using units of `h`, `m` and `s`. Unparseable values will
default to 60 seconds.
----
# Update interval using value with units. Default value if not set is 60 sec.
interval = 2m30s
----
Each host or application to be checked consists of `name` and `url`.
You can optionally specify `check_type`:
@ -42,7 +50,7 @@ You can optionally specify `check_type`:
** `Down`: No response.
* `Tcp`: Checks if TCP connection to given host and port can be established
To use more than one configuration, pass the config file location as first argument to the application.
To use more than one configuration, pass the config file location to be used as first argument to the application.
----
$ checkbar /etc/checkbar_example.toml