HTTP health checker.
Install system dependencies.
On Debian/Ubuntu:
apt-get install libssl-dev pkg-configInstall hellcheck crate:
cargo install hellcheckConfiguration file hellcheck.yml may have the following format:
# Declare what has to be watched
checkers:
example:
url: https://www.example.com
notifiers: [my_team]
localhost8000:
url: http://localhost:8000
interval: 1500ms
notifiers: [my_team, sound_alarm]
basic_auth:
username: "foo"
password: "bar"
# Declare notification channels
notifiers:
my_team:
type: slack
token: <WEBHOOK_URL>
sound_alarm:
type: command
command: ["./custom.sh", "arg1", "arg2"]Create an incoming webhook in Slack.
Then define your notifier with type slack and webhook_url:
notifiers:
notifier_name:
type: slack
webhook_url: <WEBHOOK_URL>For telegram notifier you have to create a bot with BotFather and obtain the bot token.
Chat ID can be found out with GetidsBot.
notifiers:
notifier_name:
type: telegram
token: <BOT-TOKEN>
chat_id: <CHAT-ID>notifiers:
notifier_name:
type: hipchat
base_url: https://hipchat.com
token: <AUTH_TOKEN>
room_id: <ROOM_NAME_OR_ID>Command notifier allows you to invoke any shell command or custom script as notifier.
Example:
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_OKtrue- when service is upfalse- when service is down
Assuming, you have ./hellcheck.yml in your current directory, this will start monitoring of the services,
described in checkers configuration sections:
hellcheck watch --file ./hellcheck.yml
- Support notifiers
- Command customer notifier
- Telegram
- HipChat
- Slack
- Checkers
- Custom intervals
- Verify body (presence of some given text)
- Custom OKish HTTP status
- Use structopt/clap for nice command line interface
- Implement
hellcheck testcommand to test notifiers - Configure CI
- Run build/tests
- Setup clippy lint
- Setup rusmft
- Ensure endpoints with http basic authentication can be health checked
- Inject credentials with env variables into yaml file
- Allow customizable messages for notifiers
- Allow custom scripts as checkers
- Make pretty colorized output for console
- Validate for unexpected panics in the code (unwrap, panic, expect, etc..)
- Add logging
- greyblake Potapov Sergey - creator, maintainer.