From 76e634912c97f421d55a3d4a6bea0bd036299528 Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Thu, 4 Dec 2025 13:12:56 +0100 Subject: [PATCH] Recommit for updates in build 59 --- .../prometheus_cd_3A_3Amain_3A_3Afiles.html | 38 +++- .../prometheus_cd_3A_3Aparams.html | 209 +++++++++++++++++- 2 files changed, 234 insertions(+), 13 deletions(-) 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

+
+ + + +
  • + + ps_env_file + + + (String) + + + (defaults to: "${ps_pruning_dir}/prune.env") + + + — +
    +

    the url and filename for the env file

    +
    + +
  • + +
  • + + ps_pg_host + + + (String) + + + (defaults to: 'localhost') + + + — +
    +

    the host running the database for cold metrics

    +
    + +
  • + +
  • + + ps_pg_port + + + (String) + + + (defaults to: '5432') + + + — +
    +

    the port for the database for cold metrics

    +
    + +
  • + +
  • + + ps_pg_db + + + (String) + + + (defaults to: 'prometheus') + + + — +
    +

    the database for cold metrics

    +
    + +
  • + +
  • + + ps_pg_user + + + (String) + + + (defaults to: 'readaccess') + + + — +
    +

    the read-only user for the db for cold metrics

    +
    + +
  • + +
  • + + ps_pg_pass + + + (String) + + + (defaults to: 'Changeme') + + + — +
    +

    the password for the db for cold metrics

    +
    + +
  • + +
  • + + ps_dry_run + + + (Boolean) + + + (defaults to: true) + + + — +
    +

    (true = just log, false = actually delete blocks)

    +
    + +
  • + +
  • + + ps_min_age_hours + + + (String) + + + (defaults to: '4') + + + — +
    +

    Minimum block age in hours before pruning

    +
    + +
  • + +
  • + + ps_grace_hours + + + (String) + + + (defaults to: '1') + + + — +
    +

    Grace period in hours to be extra safe

    +
    +
  • @@ -638,16 +805,6 @@
     
     
    -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