Metrics
- A metric is a
time series- a stream of (timestamp, value) numbers
# name: http_requests_total
# labels: {method="GET", status="200", service="checkout"}
http_requests_total{method="GET", status="200", service="checkout"}
→ [ (t1, 5), (t2, 9), (t3, 14), ... ]
- Every unique combination of
name + labelsare different time series
-
- Prometheus collects and stores its metrics as
time series data, i.e. metrics information is stored with thetimestampat which it was recorded, alongside optional key-value pairs calledlabels
Attributes
- Each metric has
typeandhelpattributes Help: description of what the metrics isType: there are three types- Counter: How many times happened
- Gauge: The current value now
- Histogram: how long or how big
Examples
ALERTS{alertname=~"service_is_down.*", service=~".*"}
- Percentiles: p90, p95, p99
- Trimmed mean: tm90, tm95, tm99