Deploy config file and `supervisord` config.
This commit is contained in:
parent
3f9edd9731
commit
ace020419f
|
@ -0,0 +1,8 @@
|
|||
[program:snmp_exporter]
|
||||
command=/usr/local/bin/snmp_exporter --config.file /etc/prometheus_exporters.d/snmp.yml
|
||||
stdout_logfile=/var/log/supervisor/snmp_exporter.log
|
||||
redirect_stderr=true
|
||||
stdout_logfile_maxbytes=1MB
|
||||
stdout_logfile_backups=5
|
||||
autorestart=true
|
||||
stopsignal=HUP
|
|
@ -0,0 +1,18 @@
|
|||
# Create Link
|
||||
link '/etc/prometheus_exporters.d/snmp.yml' do
|
||||
to "#{node['snmp_exporter']['storage']}snmp.yml"
|
||||
end
|
||||
|
||||
# Deploy `supervisord` config:
|
||||
remote_file '/etc/supervisor/conf.d/snmp_exporter.conf' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
|
||||
notifies :restart, 'service[supervisor]'
|
||||
end
|
||||
|
||||
# Restart the `supervisor`:
|
||||
service 'supervisor' do
|
||||
action :nothing
|
||||
end
|
Loading…
Reference in New Issue