Reload Prometheus config prometheus
Hot reload Prometheus config and rules without restart
curl -X POST http://prometheus:9090/-/reload
more prometheus
all 30 commands →
List active alerts
curl -s http://prometheus:9090/api/v1/alerts | jq '.data.alerts[] | select(.state=="firing") | {name: .labels.alertname, severity: .labels.severity}'
List all metric names
curl -s http://prometheus:9090/api/v1/label/__name__/values | jq '.data | length, .[0:20]'
Series cardinality per job
count by (job) ({__name__=~".+"})
Silence an alert
amtool silence add alertname=HighMemory --duration=2h --comment='Investigating'
Check TSDB status
curl -s http://prometheus:9090/api/v1/status/tsdb | jq '{head_chunks: .data.headStats.numChunks, series: .data.headStats.numSeries}'