<p>I have a bunch of microservices running in a kubernetes cluster where each microservice implements a basic health check over HTTP.</p>

<p>e.g for the endpoint <code>/health</code> each service will return a HTTP response 200 if that particular service is currently healthy or some other HTPP 4xx / 5xx code (and possible additional info) if not healthy.</p>

<p>I see Kubernetes has its own built in concepth of a HTTP health check <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-http-request" rel="noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-http-request</a></p>

<p>Unfortunatley its not quite what I want. I like to be able to trigger an alert (and record the state of the health check request) in some database so I can quickly check what state all my services are in as well as alerting on any services in an unhealthy state. </p>

<p>I'm wondering are there existing tools or approaches in Kubernetes I should use for this sort of thing? Or will need to build some custom solution for this. </p>

<p>Was considering having a general "HealthCheck" service which each microservice would register with when started. That way the "HealthCheck" service would monitor the health of each service as well as trigerring alerts for any issues it finds. </p>

<p>I would caution against trying to build your own in-house monitoring solution. There are considerable drawbacks to that approach.</p>
<p>If all you need is external service HTTP health checks, then many existing monitoring solutions will do fine.  You can either install a traditional IT solution like Zabbix or Nagios. Or use a SAS like <strong>Datadog</strong> and others.<br />
There are also blackbox extensions for <strong>Prometheus</strong>, which is very popular among K8s users.</p>
<p>Many of these options require a learning curve of some steepness.</p>
