Deploy `/etc/logrotate.d/prometheus`.

This commit is contained in:
Kazuhiro MUSASHI 2023-02-11 21:38:50 +09:00
parent 26ff24d784
commit ec680b2719
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,13 @@
/var/log/prometheus.log
{
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}

View File

@ -44,6 +44,13 @@ service 'rsyslog' do
action :nothing action :nothing
end end
# Depoy `logrotate` configuration for `prometheus`:
remote_file '/etc/logrotate.d/prometheus' do
owner 'root'
group 'root'
mode '644'
end
# Depoy `consul` service configuration for `prometheus`: # Depoy `consul` service configuration for `prometheus`:
remote_file '/etc/consul.d/service-prometheus.json' do remote_file '/etc/consul.d/service-prometheus.json' do
owner 'consul' owner 'consul'