HTTP health checker.
DISCLAIMER: This is a prove of concept, the project is ongoing development.
hellcheck test command to test notifiersWith cargo:
cargo install hellcheck
Create hellcheck.yml file:
yaml
checkers:
greyblake:
url: https://www.greyblake.com
interval: 10s
notifiers: [me]
localhost8000:
url: http://localhost:8000
interval: 1500ms
notifiers: [me, custom]
notifiers:
me:
type: telegram
token: <BOT-TOKEN>
chat_id: <CHAT-ID>
custom:
type: command
command: ["./custom.sh", "arg1", "arg2"]
For telegram notifier you have to create a bot with BotFather and obtain the bot token.
Chat ID can be found out with GetidsBot.
yaml
notifiers:
me:
type: telegram
token: <BOT-TOKEN>
chat_id: <CHAT-ID>
Command notifier allows you to invoke any shell command or custom script as notifier.
Example:
yaml
notifiers:
custom:
type: command
command: ["/path/to/custom-notifier.sh", "arg1", "arg2"]
Within the script the following environment variables are accessible:
HELLCHECK_ID - checker idHELLCHECK_URL - checker URLHELLCHECK_OK
true - when service is upfalse - when service is downAssuming, you have ./hellcheck.yml in your current directory, this will start monitoring of the services,
described in checkers configuration sections:
hellcheck