Bird
0
0

After setting up Prometheus to scrape a microservice endpoint, no metrics appear in the dashboard. What is the most probable cause?

medium📝 Troubleshoot Q6 of 15
Microservices - Monitoring and Observability
After setting up Prometheus to scrape a microservice endpoint, no metrics appear in the dashboard. What is the most probable cause?
APrometheus server is running on a different port than default
BThe microservice's metrics endpoint is not exposing data in Prometheus format
CThe microservice is using a push gateway instead of exposing metrics directly
DThe Prometheus configuration file is missing global scrape_interval
Step-by-Step Solution
Solution:
  1. Step 1: Verify metrics endpoint format

    Prometheus requires metrics to be exposed in its specific text-based format.
  2. Step 2: Check other options

    Port differences or push gateway usage might cause issues but are less common than format problems.
  3. Step 3: Missing global scrape_interval usually defaults to 15s and doesn't prevent scraping.

  4. Final Answer:

    The microservice's metrics endpoint is not exposing data in Prometheus format -> Option B
  5. Quick Check:

    Metrics must be in Prometheus exposition format [OK]
Quick Trick: Metrics endpoint must expose Prometheus-formatted data [OK]
Common Mistakes:
MISTAKES
  • Ignoring metrics format requirements
  • Assuming port mismatch always causes no data
  • Confusing push gateway usage with scraping failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes