Skip to main content
View rawEdit

Configuration

Configuration guides for customizing PostgresAI monitoring components.

Components​

ComponentPurposeConfiguration scope
pgwatchMetrics collectionCollection intervals, custom metrics
VictoriaMetricsTime-series storageRetention, storage, scrape settings
GrafanaVisualizationDashboards, data sources, authentication
AlertingNotificationsAlert rules, notification channels

Configuration methods​

CLI installation​

Configuration is stored in the monitoring directory .env file and can be applied with update-config:

# Example .env overrides (default VM_RETENTION_PERIOD is 336h ≡ 14 days)
VM_RETENTION_PERIOD=30d
VM_QUERY_DURATION=30s
VM_MAX_CONCURRENT_REQUESTS=16

postgresai mon update-config

Docker Compose​

Configuration is passed through docker-compose.yml and the generated .env file:

# Example overrides (default VM_RETENTION_PERIOD is 336h ≡ 14 days)
VM_RETENTION_PERIOD=30d
VM_QUERY_DURATION=30s
VM_MAX_CONCURRENT_REQUESTS=16

Helm​

Configuration via values.yaml:

monitoring:
retention: 30d
scrapeInterval: 15s

Quick reference​

SettingDefaultDescription
Scrape interval15sHow often to collect metrics
Retention14 days (336h)How long to keep metrics
Max connections3Connections per monitored database

Sections​