-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.env.example
More file actions
100 lines (81 loc) · 3.8 KB
/
.env.example
File metadata and controls
100 lines (81 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# PostgresAI Monitoring Stack configuration
# Copy this file to .env and adjust values as needed:
# cp .env.example .env
# Image tag (required) - specify version to use
PGAI_TAG=0.14.0
# Registry prefix (optional, default: postgresai for DockerHub)
# For GitLab Container Registry:
# PGAI_REGISTRY=registry.gitlab.com/postgres-ai/postgres_ai
# PGAI_REGISTRY=postgresai
# Optional: Grafana admin password (default: demo)
# GF_SECURITY_ADMIN_PASSWORD=your-secure-password
# Required when running docker compose directly. postgresai mon local-install
# generates and preserves these automatically.
# Generate REPLICATOR_PASSWORD with: openssl rand -hex 32
# Generate VM_AUTH_PASSWORD with: openssl rand -base64 18
# Empty placeholders below force Docker Compose to fail fast until replaced.
REPLICATOR_PASSWORD=
VM_AUTH_USERNAME=vmauth
VM_AUTH_PASSWORD=
# VictoriaMetrics retention period.
# Accepts VictoriaMetrics duration formats (e.g. 168h, 30d, 4380h).
# Bare integers are also accepted by VictoriaMetrics and mean months; duration
# suffixes are clearer when pairing this with QUERYID_RETENTION_HOURS.
# Suggested paired values for new plan-specific configuration:
# Short history (7 days): VM_RETENTION_PERIOD=168h, QUERYID_RETENTION_HOURS=168
# Long history (6 months): VM_RETENTION_PERIOD=4380h, QUERYID_RETENTION_HOURS=4380
# Legacy defaults below intentionally preserve existing behavior.
# VM_RETENTION_PERIOD=336h
# Postgres queryid mapping retention for the Flask backend, in hours.
# For new plan-specific values, use the same window as VM_RETENTION_PERIOD
# expressed in hours.
# QUERYID_RETENTION_HOURS=720
# === Monitoring stack resource tuning (issue #176) ===
# All variables in this section are OPTIONAL. The compose defaults preserve
# the current laptop-dev sizing; CPU limits intentionally oversubscribe a
# 4-core host, and memory limits sum to about 8 GiB. Leaving these unset
# produces no behavior change. Provisioning playbooks (Ansible / console)
# can export prod-grade values per VM size class without forking the compose
# file. Memory limits are in bytes (matches the convention from MR !238 /
# !248); CPUs are floats (Docker compose `cpus:` semantics).
# Demo target database (target-db)
# TARGET_DB_CPUS=0.2
# TARGET_DB_MEM=805306368 # 768 MiB
# Demo target standby (target-standby)
# TARGET_STANDBY_CPUS=0.2
# TARGET_STANDBY_MEM=805306368 # 768 MiB
# Postgres sink (sink-postgres)
# SINK_POSTGRES_CPUS=0.4
# SINK_POSTGRES_MEM=1073741824 # 1 GiB
# VictoriaMetrics sink (sink-prometheus)
# SINK_PROMETHEUS_CPUS=0.75
# SINK_PROMETHEUS_MEM=1610612736 # 1.5 GiB
# VictoriaMetrics engine tuning (sink-prometheus entrypoint).
# These flags already exist on main with the same literal defaults; the env
# vars only let provisioning override them without forking the compose file.
# VM_QUERY_DURATION=30s # -search.maxQueryDuration
# VM_MAX_CONCURRENT_REQUESTS=16 # -search.maxConcurrentRequests
# pgwatch (Postgres sink)
# PGWATCH_POSTGRES_CPUS=0.35
# PGWATCH_POSTGRES_MEM=536870912 # 512 MiB
# pgwatch (Prometheus sink)
# PGWATCH_PROMETHEUS_CPUS=0.5
# PGWATCH_PROMETHEUS_MEM=536870912 # 512 MiB
# Grafana
# GRAFANA_CPUS=0.5
# GRAFANA_MEM=536870912 # 512 MiB
# Flask backend (monitoring_flask_backend); uses shorthand FLASK_* env prefix
# FLASK_CPUS=0.5
# FLASK_MEM=1073741824 # 1 GiB
# Reporter (postgres-reports)
# POSTGRES_REPORTS_CPUS=1.0
# POSTGRES_REPORTS_MEM=1879048192 # 1.75 GiB
# Self-monitoring: cAdvisor
# CADVISOR_CPUS=0.25
# CADVISOR_MEM=402653184 # 384 MiB
# Self-monitoring: node exporter
# NODE_EXPORTER_CPUS=0.05
# NODE_EXPORTER_MEM=100663296 # 96 MiB
# Self-monitoring: postgres exporter (self-postgres-exporter)
# POSTGRES_EXPORTER_CPUS=0.1
# POSTGRES_EXPORTER_MEM=134217728 # 128 MiB