Deploy `logrotate` config for `node_exporter`.

This commit is contained in:
Kazuhiro MUSASHI 2023-02-05 19:43:23 +09:00
parent 7a0b2938be
commit ccf94f0174
2 changed files with 20 additions and 0 deletions

View File

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

View File

@ -28,6 +28,13 @@ service 'rsyslog' do
action :nothing action :nothing
end end
# Deploy `logrotate` config for `node_exporter`:
remote_file '/etc/logrotate.d/node_exporter' do
owner 'root'
group 'root'
mode '0644'
end
# Deploy `consul` config for `node_exporter`: # Deploy `consul` config for `node_exporter`:
remote_file '/etc/consul.d/service-node_exporter.json' do remote_file '/etc/consul.d/service-node_exporter.json' do
owner 'consul' owner 'consul'