Deploy `rsyslog` config for `node_exporter`.

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

View File

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

@ -15,6 +15,19 @@ service 'node_exporter' do
action [ :enable, :start]
end
# Deploy `rsyslog` config for `node_exporter`:
remote_file '/etc/rsyslog.d/30-node_exporter.conf' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[rsyslog]'
end
service 'rsyslog' do
action :nothing
end
# Deploy `consul` config for `node_exporter`:
remote_file '/etc/consul.d/service-node_exporter.json' do
owner 'consul'