3
0

OP#188 add env file

This commit is contained in:
2025-12-04 13:11:43 +01:00
parent 11eeeb4c2b
commit 7f1e0daded
4 changed files with 63 additions and 0 deletions

View File

@@ -30,6 +30,16 @@
# @param [String] ps_external_url the full url for the remote write point
# @param [Boolean] ps_enable_pruning whether to allow pruning local blocks
# @param [String] ps_pruning_dir the directory for the pruning script
# @param [String] ps_pruning_file the url and filename for the pruning script
# @param [String] ps_env_file the url and filename for the env file
# @param [String] ps_pg_host the host running the database for cold metrics
# @param [String] ps_pg_port the port for the database for cold metrics
# @param [String] ps_pg_db the database for cold metrics
# @param [String] ps_pg_user the read-only user for the db for cold metrics
# @param [String] ps_pg_pass the password for the db for cold metrics
# @param [Boolean] ps_dry_run (true = just log, false = actually delete blocks)
# @param [String] ps_min_age_hours Minimum block age in hours before pruning
# @param [String] ps_grace_hours Grace period in hours to be extra safe
##############################################################################
class prometheus_cd::params (
@@ -79,6 +89,15 @@ class prometheus_cd::params (
Boolean $ps_enable_pruning = false,
String $ps_pruning_dir = '/opt/prometheus-prune',
String $ps_pruning_file = "${ps_pruning_dir}/prune_prometheus_pg.sh",
String $ps_env_file = "${ps_pruning_dir}/prune.env",
String $ps_pg_host = 'localhost',
String $ps_pg_port = '5432',
String $ps_pg_db = 'prometheus',
String $ps_pg_user = 'readaccess',
String $ps_pg_pass = 'Changeme',
Boolean $ps_dry_run = true,
String $ps_min_age_hours = '4',
String $ps_grace_hours = '1',
) {
# defaults