OP#188 add env file
This commit is contained in:
20
templates/prune.env.erb
Normal file
20
templates/prune.env.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
# /opt/prometheus-prune/prune.env
|
||||
|
||||
# PostgreSQL connection
|
||||
PGHOST=<%= @ps_pg_host %>
|
||||
PGPORT=<%= @ps_pg_port %>
|
||||
PGDATABASE=<%= @ps_pg_db %>
|
||||
PGUSER=<%= @ps_pg_user %>
|
||||
PGPASSWORD=<%= @ps_pg_pass %>
|
||||
|
||||
# Dry-run mode (true = just log, false = actually delete)
|
||||
DRY_RUN=<%= @ps_dry_run %>
|
||||
|
||||
# Minimum block age in hours before pruning
|
||||
MIN_AGE_HOURS=<%= @ps_min_age_hours %>
|
||||
|
||||
# Grace period in hours to be extra safe
|
||||
GRACE_HOURS=<%= @ps_grace_hours %>
|
||||
|
||||
# SQL template to check if block exists in PostgreSQL
|
||||
CHECK_SQL_TEMPLATE="SELECT 1 FROM metric_values WHERE metric_time >= to_timestamp({min}/1000.0) AND metric_time <= to_timestamp({max}/1000.0) LIMIT 1;"
|
||||
Reference in New Issue
Block a user