OP#188 add env file
This commit is contained in:
@@ -56,10 +56,28 @@ class prometheus_cd::main::files (
|
||||
content => template('prometheus_cd/prune_blocks.erb'),
|
||||
# notify Service ToDo,
|
||||
}
|
||||
file { $ps_env_file:
|
||||
ensure => file,
|
||||
owner => 'prometheus',
|
||||
group => 'prometheus',
|
||||
mode => '0750',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => usr_,
|
||||
seluser => unconfined_u,
|
||||
content => template('prometheus_cd/prune.env.erb'),
|
||||
# notify Service ToDo,
|
||||
}
|
||||
}
|
||||
|
||||
if $ps_enable_pruning == false {
|
||||
file { $ps_pruning_file:
|
||||
ensure => absent,
|
||||
# notify Service ToDo,
|
||||
}
|
||||
file { $ps_env_file:
|
||||
ensure => absent,
|
||||
# notify Service ToDo,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user