Skip to content

Commit 11dd2ce

Browse files
committed
docs(spring-boot-actuator-health): update README
1 parent 1eb2199 commit 11dd2ce

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • check-plugins/spring-boot-actuator-health

check-plugins/spring-boot-actuator-health/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ Each *numeric* component detail value is exposed as perfdata.
146146
For testing purposes, install a Spring Boot Actuator application providing a `/health` endpoint. For example:
147147

148148
```bash
149+
150+
podman network create --ignore pcnet
151+
149152
podman rm -f petclinic pg >/dev/null 2>&1 || true
150153

151154
podman run -d --name pg --network pcnet -p 5432:5432 \
@@ -164,11 +167,20 @@ podman run -d --name petclinic --network pcnet -p 9966:9966 \
164167
-e MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE=health,info \
165168
-e MANAGEMENT_ENDPOINT_HEALTH_SHOW_DETAILS=always \
166169
-e MANAGEMENT_ENDPOINT_HEALTH_SHOW_COMPONENTS=always \
170+
--health-cmd='curl --fail --show-error --silent --max-time 2 http://localhost:9966/petclinic/actuator/health' \
171+
--health-interval=30s \
172+
--health-on-failure=kill \
173+
--health-retries=5 \
174+
--health-start-period=5s \
175+
--health-timeout=10s \
167176
docker.io/springcommunity/spring-petclinic-rest
168177

178+
169179
sleep 5
170180

171181
curl http://localhost:9966/petclinic/actuator/health
182+
183+
podman inspect petclinic | jq '.[0].State.Health'
172184
```
173185

174186

0 commit comments

Comments
 (0)