mirror of
https://gitverse.ru/kpa39l/monitoring.git
synced 2026-09-29 09:55:09 +00:00
feat(openspec): vesti-alerts — 6 алертов на компоненты VESTI (web/publisher/tunnel/db/stale); OpenSpec change
This commit is contained in:
@@ -225,4 +225,51 @@ admin-эндпоинты на loopback :8081: `/healthz`, `/readyz`, `/metrics`
|
||||
|
||||
Порядок работы: правки коммитятся и пушутся в gitverse (источник), gitea
|
||||
подтягивает их mirror'ом (каждые 8ч или вручную mirror-sync). Если bigbox
|
||||
сломается — репозиторий остаётся в облаке gitverse.
|
||||
сломается — репозиторий остаётся в облаке gitverse.
|
||||
|
||||
## VESTI (2026-09-13)
|
||||
|
||||
Проект /opt/vesti: web-интерфейс (:8400, systemd), publisher-контейнер
|
||||
(docker `vesti-publisher`, :8410/healthz), SOCKS5-туннель Telegram (:1080),
|
||||
SQLite БД (vesti.db).
|
||||
|
||||
### Метрики (textfile-коллектор node-exporter, job `node`, label `component="vesti"`)
|
||||
|
||||
Скрипт `/opt/vesti/scripts/vesti-metrics.sh` (запуск: cron.d `vesti-metrics`,
|
||||
root, каждую минуту; альтернативно systemd-таймер `vesti-metrics.timer`)
|
||||
пишет `/var/lib/node_exporter/textfile_collector/vesti.prom`. node-exporter
|
||||
на bigbox: `ARGS="--web.listen-address=10.8.0.2:9100 --collector.textfile.directory=/var/lib/node_exporter/textfile_collector"`.
|
||||
|
||||
| Метрика | Смысл |
|
||||
|---|---|
|
||||
| vesti_web_up | web :8400 (systemd) |
|
||||
| vesti_publisher_health | publisher :8410 /healthz |
|
||||
| vesti_publisher_docker | контейнер publisher (Up) |
|
||||
| vesti_telegram_tunnel | SOCKS5-туннель :1080 |
|
||||
| vesti_web_systemd | systemd-юнит web |
|
||||
| vesti_publisher_bot / _proxy / _channels | детали publisher |
|
||||
| vesti_db_ok | SQLite vesti.db доступна |
|
||||
| vesti_db_posts_total / _new_total / _published_total | счётчики БД |
|
||||
| vesti_db_last_run_ts | Unix-ts последнего рan краулера |
|
||||
|
||||
### Дашборд
|
||||
|
||||
`grafana/dashboards/vesti/vesti.json` (uid `vesti`, папка **vesti**), 18 панелей.
|
||||
Провайдер `vesti-dashboards` в `grafana/provisioning/dashboards/dashboards.yml`.
|
||||
Проверка импорта: `sudo docker cp grafana:/var/lib/grafana/grafana.db /tmp/gf.db`
|
||||
+ `SELECT uid,title FROM dashboard WHERE uid='vesti'`.
|
||||
|
||||
### Алерты (группа `vesti` в alerts.yml)
|
||||
|
||||
| Алерт | Выражение | Удержание | Severity |
|
||||
|---|---|---|---|
|
||||
| VestiWebDown | `vesti_web_up{component="vesti"} == 0` | 2m | critical |
|
||||
| VestiPublisherDown | `vesti_publisher_health{component="vesti"} == 0` | 2m | critical |
|
||||
| VestiPublisherContainerDown | `vesti_publisher_docker{component="vesti"} == 0` | 2m | critical |
|
||||
| VestiTunnelDown | `vesti_telegram_tunnel{component="vesti"} == 0` | 2m | critical |
|
||||
| VestiDbDown | `vesti_db_ok{component="vesti"} == 0` | 2m | critical |
|
||||
| VestiDbStale | `time() - vesti_db_last_run_ts{component="vesti"} > 1800` | 5m | warning |
|
||||
|
||||
Реализовано через встроенный Prometheus Alerting (`rule_files` в prometheus.yml
|
||||
→ alerts.yml; правила видны в `/api/v1/rules`). Перечитывается рестартом
|
||||
прометеуса (`docker restart prometheus`).
|
||||
Reference in New Issue
Block a user