95th percentile latency from histogram

p95 latency per job; note: always aggregate _bucket by le before histogram_quantile

histogram_quantile(0.95, sum by(le,job)(rate(http_request_duration_seconds_bucket[5m])))

tool
prometheus30 commands
tags
prometheusperformanceobservabilitymonitoring

More prometheus commands

  • predict_linear(node_filesystem_avail_bytes{mountpoint="/"}[6h], 4*3600) < 0

    alert when linear trend predicts disk full within 4h based on last 6h

  • absent(up{job="node"} == 1)

    fires when no series match; catches a job that vanished from discovery entirely

  • label_replace(node_uname_info, "host", "$1", "nodename", "(.+)")

    extract/derive a new label via regex capture; useful for joins and tidy dashboards

  • max_over_time(rate(node_network_receive_bytes_total[5m])[1h:1m])

    subquery: peak 5m rate sampled each minute over the last hour; spot bursts

  • sum without(instance) (rate(http_requests_total{code=~"5.."}[5m]))

    without() keeps every label except instance; cleaner than listing many by() labels

all 30 prometheus commands