Define health groups
A health group checks a subset of the indicators and answers at /actuator/health/{group}. The
package defines two groups for Kubernetes probes:
'groups' => [ 'liveness' => ['include' => ['ping']], 'readiness' => ['include' => ['readinessState']],],Add an indicator to a group
Section titled “Add an indicator to a group”List the indicator names in include. Each name must be a key of health.indicators:
'groups' => [ 'liveness' => ['include' => ['ping']], 'readiness' => ['include' => ['readinessState', 'db', 'cache']],],A name that is not an indicator makes the health endpoint throw an exception, so a typo shows up at the first request.
Add a group
Section titled “Add a group”Add a key to groups. For example, a group that a dashboard polls for the external services:
'groups' => [ 'liveness' => ['include' => ['ping']], 'readiness' => ['include' => ['readinessState']], 'external' => ['include' => ['paymentGateway', 'redis']],],curl http://localhost/actuator/health/externalUse a group name that is not also an indicator name. When both exist, the path selects the group.
Change visibility for one group
Section titled “Change visibility for one group”A group can override show_details and show_components. The group setting wins over the
endpoint setting:
'show_details' => 'when_authorized',
'groups' => [ 'liveness' => ['include' => ['ping'], 'show_details' => 'never'], 'external' => ['include' => ['paymentGateway', 'redis'], 'show_details' => 'always'],],Read one component of a group
Section titled “Read one component of a group”When components are visible, each component of a group has its own path:
curl http://localhost/actuator/health/readiness/dbRemove the default groups
Section titled “Remove the default groups”Set groups to an empty array. The root response then omits the groups key:
'groups' => [],