-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
138 lines (110 loc) · 4.59 KB
/
env.example
File metadata and controls
138 lines (110 loc) · 4.59 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Greengage DB Exporter - Environment Variables Example
# Copy this file to .env and customize for your environment
# ============================================================================
# HTTP Server Configuration
# ============================================================================
HTTP_PORT=8080
HTTPS_PORT=8443
# ============================================================================
# Logging Configuration
# ============================================================================
# Options: TRACE, DEBUG, INFO, WARN, ERROR
LOG_LEVEL=INFO
# ============================================================================
# Database Connection Configuration
# ============================================================================
# Primary Greengage/PostgreSQL Database
DB_JDBC_URL=jdbc:postgresql://localhost:5432/postgres?sslmode=disable
DB_USER=gpadmin
DB_PASSWORD=
# Connection Pool Settings
DB_POOL_MAX=5
DB_POOL_MIN=1
DB_POOL_INIT=1
# Connection Timeouts (supports: s=seconds, m=minutes, h=hours)
DB_CONN_TIMEOUT=5s
DB_IDLE_TIMEOUT=10m
DB_MAX_LIFETIME=30m
DB_VALIDATION_INTERVAL=2m
# ============================================================================
# Scrape Configuration
# ============================================================================
# How often to collect metrics (supports: s, m, h)
SCRAPE_INTERVAL=15s
# Timeout for each collection cycle
SCRAPE_TIMEOUT=10s
# ============================================================================
# Orchestrator Configuration
# ============================================================================
# Maximum age of cached results before considered stale
ORCHESTRATOR_CACHE_MAX_AGE=30s
# Connection retry settings
ORCHESTRATOR_RETRY_ATTEMPTS=3
ORCHESTRATOR_RETRY_DELAY=1s
# Circuit breaker settings
ORCHESTRATOR_FAILURE_THRESHOLD=3
ORCHESTRATOR_FAIL_FAST=true
# ============================================================================
# Metrics Exposition
# ============================================================================
# HTTP path for Prometheus metrics
METRICS_PATH=/metrics
# ============================================================================
# Banner Configuration
# ============================================================================
BANNER_WIDTH=60
# ============================================================================
# Collector Enable/Disable Flags
# ============================================================================
# Core Collectors
COLLECTOR_CLUSTER_STATE_ENABLED=true
COLLECTOR_SEGMENT_ENABLED=true
COLLECTOR_CONNECTIONS_ENABLED=true
COLLECTOR_LOCKS_ENABLED=true
COLLECTOR_EXTENDED_LOCKS_ENABLED=true
COLLECTOR_DATABASE_SIZE_ENABLED=true
COLLECTOR_REPLICATION_MONITOR_ENABLED=true
COLLECTOR_TABLE_HEALTH_ENABLED=true
# Host Resource Collectors
COLLECTOR_SPILL_PER_HOST_ENABLED=true
COLLECTOR_DISK_PER_HOST_ENABLED=true
COLLECTOR_RSG_PER_HOST_ENABLED=true
# Query Collectors
COLLECTOR_ACTIVE_QUERY_DURATION_ENABLED=true
# Vacuum Collectors
COLLECTOR_TABLE_VACUUM_STATS_ENABLED=true
COLLECTOR_TABLE_VACUUM_TUPLE_THRESHOLD=1000
COLLECTOR_DB_VACUUM_STATS_ENABLED=true
COLLECTOR_VACUUM_RUNNING_ENABLED=true
# Backup Collectors (requires GPBackup history database)
COLLECTOR_GP_BACKUP_HISTORY_ENABLED=false
GPBACKUP_HISTORY_JDBC_URL=jdbc:sqlite:/data1/master/gpseg-1/gpbackup_history.db
# ============================================================================
# Per-Database Collection Configuration
# ============================================================================
# Mode: all, include, exclude, none
COLLECTOR_PER_DB_MODE=all
# Comma-separated list of databases (used with include/exclude mode)
# Example: "mydb1,mydb2,mydb3"
COLLECTOR_PER_DB_LIST="postgres"
# Enable connection caching for per-database collectors
COLLECTOR_PER_DB_CACHE_ENABLED=true
# ============================================================================
# Example Configurations
# ============================================================================
# Example 1: Monitor only specific databases
# COLLECTOR_PER_DB_MODE=include
# COLLECTOR_PER_DB_LIST="production_db,analytics_db"
# Example 2: Exclude system/template databases
# COLLECTOR_PER_DB_MODE=exclude
# COLLECTOR_PER_DB_LIST="template0,template1,postgres"
# Example 3: Disable per-database metrics entirely
# COLLECTOR_PER_DB_MODE=none
# Example 4: Reduce load on large clusters
# SCRAPE_INTERVAL=60s
# COLLECTOR_TABLE_HEALTH_ENABLED=false
# COLLECTOR_EXTENDED_LOCKS_ENABLED=false
# COLLECTOR_TABLE_VACUUM_TUPLE_THRESHOLD=10000
# Example 5: High-frequency monitoring for troubleshooting
# SCRAPE_INTERVAL=5s
# LOG_LEVEL=DEBUG