diff --git a/README.md b/README.md index 741eaa8..bfb43cf 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,6 @@ Configurable options: See the full Puppet documentation including parameters in `docs/index.html` # Wiki -[Pruning process](/wiki/pruning.md) ## Dependencies diff --git a/manifests/main/files.pp b/manifests/main/files.pp index 54fca98..5cbd933 100644 --- a/manifests/main/files.pp +++ b/manifests/main/files.pp @@ -91,6 +91,12 @@ class prometheus_cd::main::files ( content => template('prometheus_cd/prometheus-prune-timer.erb'), notify => Exec['systemd-daemon-reload'], } + file { $ps_prune_log_file: + ensure => file, + owner => 'prometheus', + group => 'prometheus', + mode => '0644', + } } if $ps_enable_pruning == false { diff --git a/manifests/params.pp b/manifests/params.pp index 8af480d..5b9e4e5 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -117,6 +117,7 @@ class prometheus_cd::params ( $ps_system_service_file = "${ps_system_file_dir}/override.conf" $ps_pruning_svc_file = "${ps_system_dir}/prometheus-prune.service" $ps_pruning_timer_file = "${ps_system_dir}/prometheus-prune.timer" + $ps_prune_log_file = '/var/log/prometheus-prune.log' # services $ps_prom_service = 'prometheus' diff --git a/templates/prune_blocks.erb b/templates/prune_blocks.erb index b7615df..5c182b0 100644 --- a/templates/prune_blocks.erb +++ b/templates/prune_blocks.erb @@ -4,7 +4,7 @@ set -euo pipefail # Load environment source <%= @ps_env_file %> -LOG_FILE="/var/log/prometheus-prune.log" +LOG_FILE="<%= @ps_prune_log_file %>" echo "$(date '+%Y-%m-%d %H:%M:%S') Starting prune run" >> "$LOG_FILE" # Find all TSDB blocks diff --git a/wiki/pruning.md b/wiki/pruning.md deleted file mode 100644 index 94ac03a..0000000 --- a/wiki/pruning.md +++ /dev/null @@ -1 +0,0 @@ -# The Pruning Process \ No newline at end of file