Первоначальная версия VidConf
This commit is contained in:
45
deploy/monitoring/prometheus.yml
Normal file
45
deploy/monitoring/prometheus.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
# Конфигурация Prometheus (devops) — сбор метрик backend,
|
||||
# PostgreSQL, Redis и локального LLM-сервера. Поднимается compose-профилем
|
||||
# `monitoring` (deploy/docker-compose.yml, сервис `prometheus`).
|
||||
#
|
||||
# Имена метрик backend (`vidconf_http_request_duration_seconds`,
|
||||
# `vidconf_pipeline_sessions`, `vidconf_celery_queue_depth`) — КОНТРАКТ с
|
||||
# `backend/api/metrics.py`; правила в `alerts.yml` используют их буквально —
|
||||
# при переименовании метрик в backend поправить оба файла одновременно.
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
|
||||
rule_files:
|
||||
- /etc/prometheus/alerts.yml
|
||||
|
||||
scrape_configs:
|
||||
# Backend FastAPI: латентность HTTP по маршрутам + gauge'и пайплайна и
|
||||
# очередей Celery (см. GET /metrics, `backend/api/metrics.py`).
|
||||
- job_name: backend
|
||||
metrics_path: /metrics
|
||||
static_configs:
|
||||
- targets: ["backend:8000"]
|
||||
|
||||
# PostgreSQL (профиль monitoring — сервис postgres-exporter).
|
||||
- job_name: postgres
|
||||
static_configs:
|
||||
- targets: ["postgres-exporter:9187"]
|
||||
|
||||
# Redis (профиль monitoring — сервис redis-exporter): также источник для
|
||||
# алерта LlmDown нет, но по нему видно состояние брокера Celery отдельно
|
||||
# от глубины очередей (та берётся из backend, не отсюда).
|
||||
- job_name: redis
|
||||
static_configs:
|
||||
- targets: ["redis-exporter:9121"]
|
||||
|
||||
# Локальный LLM-сервер (llama.cpp, LLAMA_ARG_ENDPOINT_METRICS=1). Адрес
|
||||
# `llm:8080` разрешается ОДНИМ из двух compose-сервисов в зависимости от
|
||||
# выбранного при установке пресета — `llm` (CPU, профиль `llm`, уровни
|
||||
# min/medium) или `llm-gpu` (GPU, профиль `llm-gpu`, уровень max, у
|
||||
# которого в сети compose есть сетевой алиас `llm`, см. его определение в
|
||||
# deploy/docker-compose.yml) — эти профили взаимоисключающи, поэтому один
|
||||
# job без дублирования и без вечно недоступного второго таргета.
|
||||
- job_name: llm
|
||||
static_configs:
|
||||
- targets: ["llm:8080"]
|
||||
Reference in New Issue
Block a user