Loading...
Loading...
CLI for querying Prometheus and PromQL-compatible engines (Thanos, Cortex, VictoriaMetrics, Grafana Mimir, Grafana Tempo...) — instant queries, range queries, metric discovery (metrics/labels/meta subcommands), output formats (table/csv/json/graph). Apply when executing PromQL queries, troubleshooting performance issues on a software having observability, investigating latency/error rates/saturation, or analyzing time series data.
npx skill4agent add samber/cc-skills promql-clipromql-cli| File | When to read |
|---|---|
| User needs to install promql-cli or set up configuration (hosts, auth, token, password, multi-host) |
| User wants to discover metrics/exporters/labels, run queries, or choose output formats |
| User wants to visualize Prometheus data as an ASCII chart in the terminal |
| User is investigating a performance issue, latency, errors, or saturation |
| User needs help writing PromQL, understanding metric types, functions, or aggregations |
references/usage.mdreferences/promql-reference.mdreferences/debugging.mdreferences/promql-reference.mdpromql 'up' # succeeds if host is reachable; fails with connection error if not configured
# or
promql --host xxx 'up'references/installation.md| Error | Cause |
|---|---|
| No host running at the configured address |
| Hostname not resolved — wrong host in config |
| Bearer token missing or invalid |
| Token valid but insufficient permissions |
| Auth flags partially set — use config file instead |
"Please createmanually with your Prometheus host (and credentials if needed). See~/.promql-cli.yamlfor the exact format. Let me know once it's ready."references/installation.md
promql 'up' # instant query
promql 'rate(http_requests_total[5m])' --start 1h # range query (ASCII graph)
promql 'up' --output csv # CSV output
promql 'up' --output json # JSON output
promql metrics # list all metric names
promql labels <metric> # list labels for a metric
promql meta <metric> # show metric type and help
promql --config ~/.promql-cli-prod.yaml 'up' # target a specific hostrate()rate()lebyhistogram_quantile()leleNaN--output graph~/.promql-cli.yaml~/.promql_token