diff --git a/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html index 08fa857..74c86e8 100644 --- a/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html @@ -161,7 +161,25 @@ 63 64 65 -66 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84
# File 'manifests/main/files.pp', line 6 @@ -219,10 +237,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, } } } diff --git a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html index 9bfd937..fa66158 100644 --- a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html +++ b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html @@ -625,6 +625,173 @@ (defaults to: "${ps_pruning_dir}/prune_prometheus_pg.sh") + — +++ + + +the url and filename for the pruning script
+
the url and filename for the env file
+the host running the database for cold metrics
+the port for the database for cold metrics
+the database for cold metrics
+the read-only user for the db for cold metrics
+the password for the db for cold metrics
+(true = just log, false = actually delete blocks)
+Minimum block age in hours before pruning
+Grace period in hours to be extra safe
+-34 -35 -36 -37 -38 -39 -40 -41 -42 -43 44 45 46 @@ -709,10 +866,29 @@ 102 103 104 -105+105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124
# File 'manifests/params.pp', line 34
+ # File 'manifests/params.pp', line 44
class prometheus_cd::params (
@@ -762,6 +938,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