health-indicator

Generates a Spring Boot Actuator readiness HealthIndicator for downstream dependencies.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/oriddd/ai-toolkit --skill health-indicator-oriddd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: health-indicator
Source: https://github.com/oriddd/ai-toolkit/tree/main/copilot/public/skills/health-indicator
Command: npx skills add https://github.com/oriddd/ai-toolkit --skill health-indicator-oriddd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Kubernetes readiness probes must reflect whether a microservice's downstream dependencies are reachable, but wiring a correct readiness HealthIndicator involves coordinating Java classes, application.yaml health groups, and Helm chart environment variables. This Skill guides an interactive interview and generates all required files consistently. ## Core Features & Use Cases - Interactive HITL Interview: Prompts for dependency name, base URL, readiness endpoint, expected status code, probe interval, and auth mode before generating any files. - Multi-File Generation: Creates the AbstractReadinessIndicator base class, a per-dependency HealthIndicator from a template, WebClient configuration, application.yaml readiness group entries, Helm deployment env vars, and unit tests. - Use Case: When adding a new downstream service dependency to a Spring Boot microservice, use this Skill to register its readiness check so Kubernetes removes the pod from the Service when the dependency is unreachable. ## Quick Start Ask the AI to apply the health-indicator skill to add a readiness health check for a new downstream dependency in your Spring Boot service.

Frequently Asked Questions about health-indicator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a readiness health check for a downstream service in Spring Boot?

Implement a HealthIndicator bean that calls the dependency's readiness endpoint via WebClient and register its bean name in the management.endpoint.health.group.readiness.include list in application.yaml. The /actuator/health/readiness endpoint then reports DOWN when the dependency is unreachable.

How does Kubernetes readiness probe work with Spring Boot Actuator?

Spring Boot Actuator exposes /actuator/health/readiness when probes are enabled, and Kubernetes polls it to decide whether the pod receives traffic. Custom HealthIndicators added to the readiness group make the probe fail when a downstream dependency is down, removing the pod from the Service.

Should a downstream dependency check be in the liveness or readiness group?

Downstream dependency checks belong only in the readiness group, never liveness. A liveness failure restarts the pod, which is wrong for an external outage; readiness failure simply de-registers the pod from the Service until the dependency recovers.

How do I configure the readiness endpoint URL via environment variables?

Define host and port environment variables in the Helm deployment template, then assemble the base URL in application.yaml using Spring property placeholders with defaults. The HealthIndicator concatenates this base URL with the configured readiness endpoint path.

How do I test a Spring Boot HealthIndicator without real HTTP calls?

Write unit tests that mock or stub the WebClient to return the expected status code, a non-matching status, and exceptions, asserting the indicator returns UP or DOWN accordingly. Set deterministic base-url values in the test application.yaml so component tests avoid real network calls.