24 lines
1.1 KiB
Markdown
24 lines
1.1 KiB
Markdown
# Мониторинг: метрики и алёрты
|
|
|
|
## Экспортеры и порты
|
|
- Nginx Exporter (`nginx_exporter`): `http://localhost:9113/metrics` — читает `http://nginx/status`.
|
|
- PHP-FPM Exporter (`php_fpm_exporter`): `http://localhost:9253/metrics` — опрашивает `tcp://php-fpm-v1:9000/status` и `tcp://php-fpm-v2:9000/status`.
|
|
- Postgres Exporter (`postgres_exporter`): `http://localhost:9187/metrics`.
|
|
- Memcached Exporter (`memcached_exporter`): `http://localhost:9150/metrics`.
|
|
|
|
## Prometheus
|
|
- UI: `http://localhost:9090`
|
|
- Конфиг: `monitoring/prometheus.yml`
|
|
- Таргеты: `http://localhost:9090/targets`
|
|
|
|
## Alertmanager
|
|
- UI: `http://localhost:9093`
|
|
- Конфиг: `monitoring/alertmanager.yml`
|
|
- Правила алёртов: `monitoring/alert.rules.yml`
|
|
|
|
## Правила по умолчанию
|
|
- `InstanceDown`: `up == 0` в течение 1 минуты — критический алерт.
|
|
|
|
## Расширение
|
|
- Добавьте свои правила в `monitoring/alert.rules.yml`.
|
|
- Настройте получателей в `monitoring/alertmanager.yml` (email/telegram/webhook). |