/healthcheck

Health check tool to monitor services (e.g. for use with Docker health checks)

Primary LanguageGoApache License 2.0Apache-2.0

Health check tool to monitor services (e.g. for use with Docker health checks)

Github Release GoDoc Go Report Card Build/Test Status

This package provides a single binary capable of performing a wide set of health calls to different services, e.g. HTTP(S) & SQL, as well as low-level protocol endpoints, e.g. TCP. It is entended to be used in Docker (Compose) deployments, but can be applied to different scenarios just as well.

Installation

go get -u github.com/fako1024/healthcheck

Since only native Go functionality is used, it is safe to compile the tool without CGO in order to maximize interoperability, e.g. on Alpine systems:

CGO_ENABLED=0 go build

Examples

Check a web service running on localhost

./healthcheck --http.uri http://127.0.0.1/ && echo "ok"
ok

Check an SSH server running on localhost

./healthcheck --ssh.endpoint 127.0.0.1:22 && echo "ok"
ok