Deploy `rsyslog` config for `snmp_exporter`.

This commit is contained in:
Kazuhiro MUSASHI 2023-02-05 20:53:27 +09:00
parent 83484ff4a5
commit a621b5d255
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,"snmp_exporter" /var/log/snmp_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

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