From dc68bd9766d8c30f724710b6fbb9666a38ceb30c Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Sat, 18 Oct 2025 15:47:20 +0200 Subject: [PATCH] add more flags - https://gitlab.confdroid.com/internal/confdroid_management/-/issues/260 --- manifests/params.pp | 6 ++++++ templates/override.conf.erb | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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