Prometheus
Prometheus
Ankit Bansal
Introduction
Prometheus provides:
• A data scrapper that pulls metrics data over
http periodically at a configured interval
• A time series database to store all the
metrics data
• A simple user interface where you can
visualize query and monitor all the metrics
data.
Metrics
• Similar to histogram
• Instead of measuring the distribution
of values over time it measures the
quantile of values over time
• Avg response time =
(0.23+0.3+…+60.33+0.5)/10=6.307
• To ignore such outliers, better user
percentiles, ex: 50th percentile
o 0.19, 0.23,0.26......... (sort in asc order)
o Take middle value and divide by 2
(0.3+0.36)/2=0.33
o It means around fifty percent of the request took
0.33sec
o Similarly, there are p90, p99
Summary vs Histogram
• Traffic / Rate
sum(rate(mntc_PerformanceService_met
hod_count{}[10m]))
• Latency / Duration
histogram_quantile(0.9,sum by (le)
(rate(mntc_UserService_method_duratio
n_metric_bucket[10m])))
Over to Grafana
Grafana
Questions ?