diff --git a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html index b70075d..0c1f259 100644 --- a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html +++ b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html @@ -304,6 +304,42 @@ —

the password for authentication

+
+ + + +
  • + + ps_retention_time + + + (String) + + + (defaults to: '15d') + + + — +
    +

    tsdb retention time

    +
    + +
  • + +
  • + + ps_retention_size + + + (String) + + + (defaults to: '20GB') + + + — +
    +

    tsdb retention size

  • @@ -319,8 +355,6 @@
     
     
    -17
    -18
     19
     20
     21
    @@ -361,10 +395,16 @@
     56
     57
     58
    -59
    +59 +60 +61 +62 +63 +64 +65 -
    # File 'manifests/params.pp', line 17
    +        
    # File 'manifests/params.pp', line 19
     
     class prometheus_cd::params (
     
    @@ -387,6 +427,10 @@ class prometheus_cd::params (
       String $ps_auth_user          = 'changeme',
       String $ps_auth_pass          = 'changeme',
     
    +  # storage
    +  String $ps_retention_time     = '15d',
    +  String $ps_retention_size     = '20GB',
    +
     ) {
       # defaults
       $fqdn                   = $facts['networking']['fqdn']
    diff --git a/manifests/params.pp b/manifests/params.pp
    index 6381c2f..70a2d11 100644
    --- a/manifests/params.pp
    +++ b/manifests/params.pp
    @@ -13,6 +13,8 @@
     # @param [String] ps_main_port the firewall main port for prometheus
     # @param [String] ps_auth_user the username for authentication
     # @param [String] ps_auth_pass the password for authentication
    +# @param [String] ps_retention_time tsdb retention time
    +# @param [String] ps_retention_size tsdb retention size
     ##############################################################################
     class prometheus_cd::params (
     
    @@ -35,6 +37,10 @@ class prometheus_cd::params (
       String $ps_auth_user          = 'changeme',
       String $ps_auth_pass          = 'changeme',
     
    +  # storage
    +  String $ps_retention_time     = '15d',
    +  String $ps_retention_size     = '20GB',
    +
     ) {
       # defaults
       $fqdn                   = $facts['networking']['fqdn']
    diff --git a/templates/override.conf.erb b/templates/override.conf.erb
    index 97e5da5..06fbf14 100644
    --- a/templates/override.conf.erb
    +++ b/templates/override.conf.erb
    @@ -7,4 +7,7 @@ ExecStart=/usr/bin/prometheus \
       --config.file=/etc/prometheus/prometheus.yml \
       --storage.tsdb.path=/var/lib/prometheus \
       --web.enable-remote-write-receiver \
    -  --web.enable-lifecycle
    \ No newline at end of file
    +  --web.enable-lifecycle
    +  --storage.tsdb.wal-compression
    +  --storage.tsdb.retention.time=<%= @ps_retention_time %>
    +  --storage.tsdb.retention.size=<%= @ps_retention_size %>
    \ No newline at end of file