Spring Boot Monitoring with Actuator 4 — Questions and Answers
Question 1: What is the default behavior of the /actuator/health endpoint when detail is not explicitly configured?
- Returns only the overall status without component details to unauthenticated callers (Correct answer)
- Returns full component details to all callers regardless of authentication
- Returns a 404 response unless security is disabled
- Returns details only when the application is DOWN
Correct answer: Returns only the overall status without component details to unauthenticated callers
By default, health details are only shown to authorized users; anonymous requests see only the top-level status.
Question 2: Which Actuator endpoint exposes the current values of all @ConfigurationProperties beans?
- /actuator/configprops (Correct answer)
- /actuator/properties
- /actuator/config
- /actuator/env/props
Correct answer: /actuator/configprops
The /actuator/configprops endpoint lists all @ConfigurationProperties beans and their current effective values.
Question 3: How does Spring Boot Actuator integrate with Micrometer for JVM memory metrics?
- JvmMemoryMetrics is auto-configured and registers gauges for heap and non-heap memory (Correct answer)
- You must manually call Metrics.gauge() for each JVM memory pool
- JVM metrics require adding the jvm-metrics-starter dependency
- Memory metrics are only available when using GraalVM native images
Correct answer: JvmMemoryMetrics is auto-configured and registers gauges for heap and non-heap memory
Spring Boot auto-configures JvmMemoryMetrics which registers jvm.memory.used, jvm.memory.committed, and jvm.memory.max gauges automatically.
Question 4: What is the effect of setting management.endpoint.health.probes.enabled=true?
- Enables the /actuator/health/liveness and /actuator/health/readiness sub-endpoints (Correct answer)
- Forces all health checks to run as non-blocking probes
- Enables active polling of external services for health
- Registers a liveness HTTP server on a dedicated port
Correct answer: Enables the /actuator/health/liveness and /actuator/health/readiness sub-endpoints
Setting this property to true activates the liveness and readiness sub-endpoints for Kubernetes probe integration.
Question 5: Which interface should a component implement to participate in the readiness state of a Spring Boot application?
- ApplicationListener<AvailabilityChangeEvent> (Correct answer)
- ReadinessProbe
- HealthContributor
- ReadinessIndicator
Correct answer: ApplicationListener<AvailabilityChangeEvent>
Components listen for AvailabilityChangeEvent<ReadinessState> to react to or influence the application's readiness state.
Question 6: How can you group multiple HealthIndicators under a single named group in the /actuator/health endpoint?
- Use management.endpoint.health.group.<name>.include to list indicator names (Correct answer)
- Annotate indicators with @HealthGroup(name)
- Create a CompositeHealthContributor bean with a map of indicators
- Set management.health.group.<name>=indicator1,indicator2
Correct answer: Use management.endpoint.health.group.<name>.include to list indicator names
The management.endpoint.health.group.<name>.include property lets you define named health groups visible as /actuator/health/<name>.
Question 7: Which Actuator endpoint would you use to inspect all Spring beans loaded in the application context?
- /actuator/beans (Correct answer)
- /actuator/context
- /actuator/spring-beans
- /actuator/components
Correct answer: /actuator/beans
The /actuator/beans endpoint returns a complete list of all beans in the application context including their type, scope, and dependencies.
What is the default behavior of the /actuator/health endpoint when detail is not explicitly configured?