gruntwork-io / health-checker

A simple HTTP server that will return 200 OK if all configured health checks pass.
MIT License
99 stars 38 forks source link

Add limited support for Consul Health Check definitions #2

Open josh-padnick opened 6 years ago

josh-padnick commented 6 years ago

Right now, health-checker is a minimal tool that allows users to specify one or more ports to check via TCP to establish the health of a server. Ideally, health-checker would be more flexible, and allow an arbitrary definition of a health check that it can execute.

Specifically, Health Checker could implement the following types of Consul Health Check definitions:

This would allow users to run an arbitrary bash script to return a health definition, or make another HTTP request, or achieve the original functionality of attempting a TCP connectoin, but using a declarative configuration.

josh-padnick commented 6 years ago

As an aside, there's nothing magical about using Consul Health Check definitions. I suggested those because I thought it'd be nice to leverage their docs and concepts versus creating our own. But it's also possible to take an approach similar to https://github.com/aelsabbahy/goss. Ideas are welcome on what approach would make the most sense here.