Max of per-second rate over window

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

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

tool
prometheus30 commands
tags
prometheusperformancenetworkobservability

More prometheus commands

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

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

  • groups: - name: slo rules: - record: job:request_errors:ratio5m expr: sum by(job)(rate(http_requests_total{code=~"5.."}[5m])) / sum by(job)(rate(http_requests_total[5m]))

    precompute SLO error ratio to keep dashboards and alerts fast

  • promtool check rules rules.yml && promtool check config prometheus.yml

    lint before reload; run in CI to catch broken expr/yaml before deploy

  • promtool query instant http://localhost:9090 'topk(5, sum by(pod)(rate(container_cpu_usage_seconds_total[5m])))'

    run PromQL without a browser; great for scripted top-N investigations

  • promtool tsdb analyze /prometheus --limit 20

    lists highest-cardinality metrics and label pairs; first stop for memory blowups

all 30 prometheus commands