. . .

Health checks

This page explains the service health check functionality in the Dashboard. Your service has the dependency Spring Boot Actuator, which provides several features through automatically-exposed web endpoints. This includes the following endpoint for health check functionality:

/actuator/health

When your service is running, the actuator health endpoint will be used by Consul to assert that your service is healthy, thanks to the configuration from your service's "application.yml" configuration file:

application.yml
spring:
  cloud:
    consul:
      discovery:
        health-check-path: ${server.servlet.context-path}/actuator/health

This configuration ensures that your service will register to Consul with a path that can be queried by Consul to assert that the service is correctly started.
This information is used in the Dashboard to show you whether:

  • Your service was never started

    images/download/attachments/105377182/Screen-Shot-2020-03-20-at-16.30.43.png



  • Your service is registered to Consul, but is unhealthy

    images/download/attachments/105377182/Screen-Shot-2020-03-20-at-16.26.20.png



  • Your service is registered to Consul and is healthy

    images/download/attachments/105377182/Screen-Shot-2020-03-20-at-16.33.40.png

If you have multiple instances of the same service running (this can be done by running them locally and using a different port for each instance), you can get this information for all of them by doing the following:

  1. Click on "Health check" in your service version drop down menu:

    images/download/attachments/105377182/Screen-Shot-2020-03-20-at-16.34.15.png



  2. Each instance and its status will be displayed:

    images/download/attachments/105377182/Screen-Shot-2020-03-20-at-16.35.40.png