Files
MMD e17d1f0883 feat(monitoring): observability stack + app instrumentation
- /health/ready (DB+MinIO+Casdoor checks, webhook post-deploy gate),
  /metrics via prometheus-fastapi-instrumentator, Sentry/GlitchTip capture,
  X-Request-ID middleware + JSON access logging (PROCUREMENT_LOG_FORMAT)
- server-side analytics (OpenPanel Track API): login, quote lifecycle,
  receipts — fire-and-forget, disabled without env config
- monitoring/ compose project: GlitchTip(+pg), Prometheus(+alerts),
  Grafana(provisioned ERP dashboard), Loki+Promtail, node/postgres
  exporters, cAdvisor — mem-limited (~2.2GB), loopback admin UIs,
  separate from app deploys; erp_shared network for scraping
- frontend: @openpanel/web + @sentry/react (build-arg gated, no-op when
  unset), funnel events (login, wizard steps, quote submitted)
- compose: api healthcheck, observability env wiring, .env.example keys
2026-09-18 22:18:02 +03:30

35 lines
934 B
YAML

global:
scrape_interval: 30s
evaluation_interval: 30s
rule_files:
- /etc/prometheus/alerts.yml
scrape_configs:
# The ERP API — /metrics is exposed by prometheus-fastapi-instrumentator
# (request rate, latency histogram, error counts). Reached over the
# erp_shared network the main compose also joins.
- job_name: erp-api
metrics_path: /metrics
static_configs:
- targets: ["api:8000"]
# Host-level metrics (CPU, RAM, disk, network).
- job_name: node
static_configs:
- targets: ["node-exporter:9100"]
# Per-container metrics (CPU, memory, restarts) for every container.
- job_name: cadvisor
static_configs:
- targets: ["cadvisor:8080"]
# App database metrics (connections, cache hit ratio, WAL, ...).
- job_name: postgres
static_configs:
- targets: ["postgres-exporter:9187"]
- job_name: prometheus
static_configs:
- targets: ["localhost:9090"]