Deploy `/etc/logrotate.d/alertmanager`.
This commit is contained in:
parent
970a9617eb
commit
1e31bff167
|
@ -54,6 +54,13 @@ service 'rsyslog' do
|
||||||
action :nothing
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Deploy `logroted` config for `alertmanager`:
|
||||||
|
remote_file '/etc/logrotate.d/alertmanager' do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode '644'
|
||||||
|
end
|
||||||
|
|
||||||
# Firewall settings here:
|
# Firewall settings here:
|
||||||
%w( 9093/tcp ).each do |p|
|
%w( 9093/tcp ).each do |p|
|
||||||
execute "ufw allow #{p}" do
|
execute "ufw allow #{p}" do
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
/var/log/alertmanager.log
|
||||||
|
{
|
||||||
|
rotate 4
|
||||||
|
weekly
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
/usr/lib/rsyslog/rsyslog-rotate
|
||||||
|
endscript
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Log kernel generated digdag log messages to file
|
||||||
|
:syslogtag,contains,"alertmanager" /var/log/alertmanager.log
|
||||||
|
|
||||||
|
# Uncomment the following to stop logging anything that matches the last rule.
|
||||||
|
# Doing this will stop logging kernel generated UFW log messages to the file
|
||||||
|
# normally containing kern.* messages (eg, /var/log/kern.log)
|
||||||
|
& stop
|
Loading…
Reference in New Issue