Bird
0
0

If Prometheus receives a 404 error when scraping /actuator/prometheus from a Spring Boot app, what is the most probable misconfiguration?

medium📝 Troubleshoot Q6 of 15
Spring Boot - Actuator
If Prometheus receives a 404 error when scraping /actuator/prometheus from a Spring Boot app, what is the most probable misconfiguration?
APrometheus server is down and cannot reach the Spring Boot app
BThe Prometheus endpoint is not enabled or exposed in Spring Boot actuator settings
CThe Spring Boot app is missing the database connection
DGrafana is not connected to Prometheus
Step-by-Step Solution
Solution:
  1. Step 1: Understand 404 on /actuator/prometheus

    A 404 means the endpoint is not found or not exposed.
  2. Step 2: Check Spring Boot actuator config

    The Prometheus endpoint must be enabled and included in management.endpoints.web.exposure.include.
  3. Final Answer:

    The Prometheus endpoint is not enabled or exposed in Spring Boot actuator settings -> Option B
  4. Quick Check:

    Server down or Grafana issues cause different errors, not 404 [OK]
Quick Trick: 404 means endpoint missing or not exposed [OK]
Common Mistakes:
  • Assuming Prometheus server is down causes 404
  • Confusing Grafana connection issues with scraping errors
  • Thinking database issues cause scraping 404

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes