Complete Prometheus keyboard shortcuts and commands reference — 14 shortcuts across 2 categories. Quick reference cheat sheet for Windows & Mac.
This page is a PromQL quick reference plus the three promtool commands that keep a Prometheus deployment honest. PromQL has few operators but a real type system — instant vectors, range vectors, scalars — and most confusion comes from mixing them. The expressions in the table are the ones that appear in nearly every dashboard and alert; the notes explain what each one means.
| Shortcut | Action | Description |
|---|---|---|
| up | Target status | Check monitoring target status. |
| rate(http_requests_total[5m]) | Request rate | Calculate 5-min HTTP request rate. |
| increase(errors_total[1h]) | Increase | Calculate error increase over 1 hour. |
| histogram_quantile(0.95, ...) | 95th percentile | Calculate 95th percentile. |
| sum by (job) (rate(...)) | Sum by group | Sum rate grouped by job. |
| avg_over_time(metric[1h]) | Average over time | Average of a metric across a time window. |
| topk(5, metric) | Top K series | Show the five highest-valued series. |
| count by (job)(up) | Count by label | Count targets grouped by a label. |
| delta(gauge[1h]) | Delta | Difference in a gauge value over a window. |
| absent(metric) | Absence check | Alert when a metric is missing entirely. |
| sum without (instance)(rate(m[5m])) | Sum without label | Aggregate rates dropping one label dimension. |
| Shortcut | Action | Description |
|---|---|---|
| promtool check config prometheus.yml | Check config | Validate the Prometheus configuration file. |
| promtool check rules rules.yml | Check rules | Validate recording and alerting rule files. |
| promtool query instant http://localhost:9090 up | Instant query | Run a PromQL query from the command line. |
The most essential Prometheus shortcuts are: up (Target status), rate(http_requests_total[5m]) (Request rate), increase(errors_total[1h]) (Increase).
These are command-line commands — type them in your terminal or console. Combine them with shell history search (Ctrl + R) and aliases to work even faster.
The Prometheus shortcut for target status is up. Check monitoring target status.
Yes — use My Stack to combine Prometheus shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.
Counters only go up, so their raw value is useless; rate(http_requests_total[5m]) gives the per-second rate over a five-minute window and is the standard way to graph traffic, while increase(errors_total[1h]) gives the total added over a window, which reads better in an alert message. The window in brackets turns an instant vector into a range vector, and it must be at least twice the scrape interval or the function returns nothing. delta(gauge[1h]) is the equivalent for gauges, which can go down.
sum by (job) (rate(...)) adds series together keeping only the job label, and sum without (instance)(rate(m[5m])) is the same idea expressed by what to drop — useful when you want every label except the one that varies per replica. count by (job)(up) counts targets per job and up alone is 1 for a target that was scraped successfully and 0 for one that was not, the basis of most "is it down" alerts. topk(5, metric) keeps the five highest series, avg_over_time(metric[1h]) smooths a gauge, and histogram_quantile(0.95, ...) estimates a percentile from a histogram's bucket series, which must be wrapped in a rate and summed by le first.
absent(metric) returns 1 when a series is missing entirely, which is how you alert on a job that has stopped reporting rather than one reporting bad values. On the operations side, promtool check config prometheus.yml validates the main configuration and the files it references, promtool check rules rules.yml validates recording and alerting rules, and promtool query instant http://localhost:9090 up runs a query from the shell for scripts and quick checks without opening the UI.
Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"