Simplistic Go app that does a HTTP HEAD check to see if a server app is alive. Ideal for in distroless containers. https://opencommit.eu/mvdkleijn/healthchecker
Find a file
2024-01-13 11:44:53 +01:00
.github Update action version 2024-01-13 11:27:00 +01:00
go.mod Bump go version to 1.21 2024-01-13 11:27:28 +01:00
LICENSE Update license information 2023-06-05 18:16:39 +02:00
main.go Update license information 2023-06-05 18:16:39 +02:00
README.md Fix readme 2024-01-13 11:27:10 +01:00
SECURITY.md Update SECURITY.md 2024-01-13 11:44:53 +01:00

Healthchecker

GitHub go.mod Go version Go Report Card Liberapay patrons ko-fi

Simplistic Go utility that does a HTTP HEAD check to see if a server app is alive. Ideal for in distroless containers.

All it does (and likely will ever do) is:

  • Send HTTP HEAD request to a specified URL;
  • On return of HTTP status code 200, exit with value 0;
  • Else exit with value 1;

Usage

  • Build it yourself or download a pre-built release.
  • Point it to your server's URL.

Examples

On the commandline:

./healthchecker http://127.0.0.1:8080/api/v1/status

or in a Dockerfile:

HEALTHCHECK --interval=5s --timeout=5s --retries=3 \
    CMD ["/healthchecker", "http://127.0.0.1:8080/api/v1/status"]

Support

Source code and issues: https://github.com/mvdkleijn/healthchecker

Licensing

Healthchecker is made available under the MPL-2.0 license. The full details are available from the LICENSE file.