Configuration
Configuration guides for customizing PostgresAI monitoring components.
Components​
| Component | Purpose | Configuration scope |
|---|---|---|
| pgwatch | Metrics collection | Collection intervals, custom metrics |
| VictoriaMetrics | Time-series storage | Retention, storage, scrape settings |
| Grafana | Visualization | Dashboards, data sources, authentication |
| Alerting | Notifications | Alert rules, notification channels |
Configuration methods​
CLI installation​
Configuration via environment variables and command-line flags:
postgresai mon local-install \
--retention 30d \
--scrape-interval 15s \
postgresql://user@host:5432/db
Docker Compose​
Configuration via docker-compose.yml and environment files:
services:
pgwatch:
environment:
PW_SCRAPE_INTERVAL: 15s
PW_RETENTION: 720h
Helm​
Configuration via values.yaml:
monitoring:
retention: 30d
scrapeInterval: 15s
Quick reference​
| Setting | Default | Description |
|---|---|---|
| Scrape interval | 15s | How often to collect metrics |
| Retention | 14d | How long to keep metrics |
| Max connections | 3 | Connections per monitored database |
Sections​
- pgwatch configuration — Metrics collector settings
- Prometheus/VictoriaMetrics — Time-series storage
- Grafana configuration — Dashboard customization
- Alerting — Alert rules and notifications