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',
    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