Get top N series
PromQL: top 10 pods by CPU usage rate
topk(10, sum by (pod) (rate(container_cpu_usage_seconds_total[5m])))
- tool
- prometheus30 commands
- tags
- prometheusmonitoring
More prometheus commands
-
100 - (node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"} * 100) > 85PromQL expression that fires when the root disk is more than 85% full
-
curl -X POST http://prometheus:9090/-/reloadReload the Prometheus configuration without a restart (needs `--web.enable-lifecycle`)
-
curl -s http://prometheus:9090/api/v1/alerts | jq '.data.alerts[] | select(.state=="firing") | {name: .labels.alertname, severity: .labels.severity}'Show only firing alerts with their name and severity
-
curl -s http://prometheus:9090/api/v1/label/__name__/values | jq '.data | length, .[0:20]'Count all metric names and show the first 20
-
count by (job) ({__name__=~".+"})PromQL: count active time series for each job label