Список всех метрик prometheus
Подсчитать метрики и показать первые 20
curl -s http://prometheus:9090/api/v1/label/__name__/values | jq '.data | length, .[0:20]'
more prometheus
all 30 commands →
Мощность серий по job
count by (job) ({__name__=~".+"})
Заглушить алерт
amtool silence add alertname=HighMemory --duration=2h --comment='Investigating'
Статус TSDB
curl -s http://prometheus:9090/api/v1/status/tsdb | jq '{head_chunks: .data.headStats.numChunks, series: .data.headStats.numSeries}'
95-й перцентиль задержки из гистограммы
histogram_quantile(0.95, sum by(le,job)(rate(http_request_duration_seconds_bucket[5m])))
Прогноз заполнения диска
predict_linear(node_filesystem_avail_bytes{mountpoint="/"}[6h], 4*3600) < 0