Check TSDB status prometheus
View TSDB head stats: chunks and active series
curl -s http://prometheus:9090/api/v1/status/tsdb | jq '{head_chunks: .data.headStats.numChunks, series: .data.headStats.numSeries}'
more prometheus
all 30 commands →
95th percentile latency from histogram
histogram_quantile(0.95, sum by(le,job)(rate(http_request_duration_seconds_bucket[5m])))
Predict disk full window
predict_linear(node_filesystem_avail_bytes{mountpoint="/"}[6h], 4*3600) < 0
Detect dead target with absent
absent(up{job="node"} == 1)
Rewrite label with label_replace
label_replace(node_uname_info, "host", "$1", "nodename", "(.+)")
Max of per-second rate over window
max_over_time(rate(node_network_receive_bytes_total[5m])[1h:1m])