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