Правило алерта на диск prometheus
PromQL: алерт когда / диск занят более чем на 85%
100 - (node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"} * 100) > 85
more prometheus
all 30 commands →
Перезагрузить конфиг Prometheus
curl -X POST http://prometheus:9090/-/reload
Активные алерты
curl -s http://prometheus:9090/api/v1/alerts | jq '.data.alerts[] | select(.state=="firing") | {name: .labels.alertname, severity: .labels.severity}'
Список всех метрик
curl -s http://prometheus:9090/api/v1/label/__name__/values | jq '.data | length, .[0:20]'
Мощность серий по job
count by (job) ({__name__=~".+"})
Заглушить алерт
amtool silence add alertname=HighMemory --duration=2h --comment='Investigating'