0
0
Microservicessystem_design~5 mins

Metrics collection (Prometheus) in Microservices - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Prometheus used for in microservices?
Prometheus is used to collect and store metrics from microservices. It helps monitor system health and performance by gathering data like request counts and response times.
Click to reveal answer
beginner
What format does Prometheus expect metrics to be exposed in?
Prometheus expects metrics to be exposed in a simple text format called the Prometheus exposition format, usually via an HTTP endpoint like /metrics.
Click to reveal answer
intermediate
How does Prometheus collect metrics from microservices?
Prometheus uses a pull model. It regularly sends HTTP requests to microservices' /metrics endpoints to fetch the latest metrics data.
Click to reveal answer
intermediate
What is a 'scrape config' in Prometheus?
A scrape config tells Prometheus where to find metrics endpoints and how often to collect data from them.
Click to reveal answer
beginner
Name two common metric types Prometheus collects.
Counter (counts events like requests) and Gauge (measures values like current memory usage).
Click to reveal answer
How does Prometheus get metrics from microservices?
ABy pulling metrics from /metrics endpoints
BBy pushing metrics to a central server
CBy reading log files
DBy scanning network packets
Which of these is NOT a Prometheus metric type?
ADatabase
BGauge
CHistogram
DCounter
What does a Prometheus scrape config define?
AHow to visualize metrics
BHow to store metrics in a database
CHow to alert on metrics
DWhere and how often to collect metrics
What HTTP path do microservices usually expose metrics on for Prometheus?
A/health
B/status
C/metrics
D/data
Why is Prometheus popular for microservices monitoring?
AIt stores logs efficiently
BIt supports dynamic service discovery and flexible queries
CIt automatically fixes bugs
DIt replaces databases
Explain how Prometheus collects and stores metrics from microservices.
Think about how Prometheus asks microservices for data and where it finds that data.
You got /4 concepts.
    Describe the difference between Counter and Gauge metric types in Prometheus.
    One counts up only, the other can go up or down.
    You got /3 concepts.