Deploy `consul config for `snmp_exporter`.
This commit is contained in:
parent
ace020419f
commit
a5b6dbd529
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"service": {
|
||||
"name": "snmp_exporter",
|
||||
"port": 9116,
|
||||
"check":{
|
||||
"tcp": "127.0.0.1:9116",
|
||||
"interval": "60s",
|
||||
"timeout": "1s",
|
||||
"success_before_passing": 3
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,6 +12,15 @@ remote_file '/etc/supervisor/conf.d/snmp_exporter.conf' do
|
|||
notifies :restart, 'service[supervisor]'
|
||||
end
|
||||
|
||||
# Deploy `consul` config:
|
||||
remote_file '/etc/consul.d/service-snmp_exporter.json' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
|
||||
notifies :restart, 'service[supervisor]'
|
||||
end
|
||||
|
||||
# Restart the `supervisor`:
|
||||
service 'supervisor' do
|
||||
action :nothing
|
||||
|
|
Loading…
Reference in New Issue