Add `rsyslog` config for `nomad`.

This commit is contained in:
Kazuhiro MUSASHI 2022-01-10 15:27:03 +09:00 committed by Gitea
parent 9e6b05fbab
commit dffb57e2fc
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# Log kernel generated promtail log messages to file
:syslogtag,contains,"nomad" /var/log/nomad.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

View File

@ -91,3 +91,15 @@ end
service 'promtail-nomad' do
action [ :enable, :restart ]
end
remote_file '/etc/rsyslog.d/30-nomad.conf' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[rsyslog]'
end
service 'rsyslog' do
action [ :nothing ]
end