curl -s -G http://localhost:9090/api/v1/query --data-urlencode 'query=up' | jq

Category: Monitoring & Observability

curl -s -G http://localhost:9090/api/v1/query --data-urlencode 'query=up' | jq

Query the Prometheus HTTP API for instant results

Evaluates the PromQL expression up against the Prometheus API and pretty-prints the JSON with jq. The -G flag keeps parameters in the URL while --data-urlencode encodes them safely. Results appear under .data.result, one series per scrape target.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.