From c68146d3b63fc55be1568d901c8d05ffaac19640 Mon Sep 17 00:00:00 2001 From: 12ww1160 Date: Wed, 3 Dec 2025 12:37:30 +0100 Subject: [PATCH 1/2] OP#179 add more tsdb options --- manifests/params.pp | 4 ++++ templates/override.conf.erb | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 7d12ac8..688eec4 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -17,6 +17,8 @@ # @param [String] ps_retention_time tsdb retention time # @param [String] ps_retention_size tsdb retention size # @param [String] ps_wal_seg_size WAL segment size +# @param [String] ps_min_block_dur tsdb minimum block duration +# @param [String] ps_max_block_dur tsdb maximum block duration # @param [String] ps_max_mem hard memory ceiling # @param [String] ps_high_mem soft limit to make kernel reclaim earlier # @param [String] ps_swap_mem allow swap, but limit it @@ -49,6 +51,8 @@ class prometheus_cd::params ( String $ps_retention_time = '15d', String $ps_retention_size = '20GB', String $ps_wal_seg_size = '50MB', + String $ps_min_block_dur = '2h', + String $ps_max_block_dur = '2h', # service String $ps_max_mem = '6G', diff --git a/templates/override.conf.erb b/templates/override.conf.erb index 99c2faf..61f934e 100644 --- a/templates/override.conf.erb +++ b/templates/override.conf.erb @@ -18,4 +18,6 @@ ExecStart=/usr/bin/prometheus \ --storage.tsdb.wal-segment-size=<%= @ps_wal_seg_size %> \ --web.enable-remote-write-receiver \ --web.enable-lifecycle \ - --storage.tsdb.wal-compression \ No newline at end of file + --storage.tsdb.wal-compression \ + --storage.tsdb.min-block-duration=<%= @ps_min_block_dur %> \ + --storage.tsdb.max-block-duration=<%= @ps_max_block_dur %> \ No newline at end of file From 31364dcb58d5dd2438cdd2109b27ea40511327b0 Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Wed, 3 Dec 2025 12:38:42 +0100 Subject: [PATCH 2/2] Recommit for updates in build 38 --- .../prometheus_cd_3A_3Aparams.html | 48 +++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html index 9ca1221..ea4bd10 100644 --- a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html +++ b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html @@ -380,6 +380,42 @@ +
  • + + ps_min_block_dur + + + (String) + + + (defaults to: '2h') + + + — +
    +

    tsdb minimum block duration

    +
    + +
  • + +
  • + + ps_max_block_dur + + + (String) + + + (defaults to: '2h') + + + — +
    +

    tsdb maximum block duration

    +
    + +
  • +
  • ps_max_mem @@ -481,8 +517,6 @@
     
     
    -26
    -27
     28
     29
     30
    @@ -537,10 +571,14 @@
     79
     80
     81
    -82
    +82 +83 +84 +85 +86 -
    # File 'manifests/params.pp', line 26
    +        
    # File 'manifests/params.pp', line 28
     
     class prometheus_cd::params (
     
    @@ -568,6 +606,8 @@ class prometheus_cd::params (
       String $ps_retention_time     = '15d',
       String $ps_retention_size     = '20GB',
       String $ps_wal_seg_size       = '50MB',
    +  String $ps_min_block_dur      = '2h',
    +  String $ps_max_block_dur      = '2h',
     
       # service
       String $ps_max_mem            = '6G',