cmd | ||
core | ||
utils | ||
vendor | ||
.gitignore | ||
go.mod | ||
go.sum | ||
main.go | ||
Makefile | ||
README.md | ||
stale-notif-concept.md |
statusmon
just another HTTP healthchecker with XMPP, email, slack notification transports. I wrote this as I simply did not find a tool for this that isn't completely over- or under-engineered. Deploy as a static selfcontained binary, configure via yaml.
build
Assuming you have golang installed, run
make build STATIC=true
or
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' .
use
Run healthchecks and send notifications for your webservices
Usage:
statusmon [flags]
statusmon [command]
Available Commands:
check One-off run all or specific healthchecks
debug Run some debugging checks on statusmon itself
help Help about any command
watch Continously run all or specific healthchecks
Flags:
-c, --config string path to config file (default $HOME/.statusmon.yml)
-d, --debug enable verbose logging
-h, --help help for statusmon
-l, --logformat string log format, can be plain or json (default "plain")
--no-cache send all notifications, ignoring results from previous runs. also don't update the cache.
-n, --notify string If set, will send out notifications for the specified type of check result,
otherwise results are printed to stdout only.
Allowed values are "all", "error", "ok".
You might want to run 'statusmon debug notifications' first to verify everything works.
Notifications for failing checks are sent only once, and then cached until the issue got
resolved, unless --no-cache is set.
To clear the cache, run 'statusmon debug cache --clear'.
Additional help topics:
statusmon config How to configure statusmon
Use "statusmon [command] --help" for more information about a command.
configure
The tool works out of the box for basic functionality, but must be configured to set up notifications.
Configuration can be done via a YAML file located at ~/.statusmon.yml
or through environment variables.
Run statusmon help config
for details and an example configuration.
available healthchecks
type | description |
---|---|
http-status |
Alert when a http get request yields a statuscode higher than expected |
available notification transports
transport | options |
---|---|
email |
recipients : list of email addresses |
slack |
recipients : list of webhook URLs |
discord |
recipients : list of webhook URLs |
xmpp |
recipients : list of JIDs |
Want more? add it!
contribute
Contributions are welcome! Check out the following locations for plugging in new functionality:
- new notification transports: core/notifiers.go
- new health checks: core/healthcheck*.go
- new commands: cmd/
Before committing and submitting a pull request, please run go fmt ./ cmd/ core/
.
license
GPL-3.0 Norwin Roosen