Add `consul` service config for `exporter_proxy`.

This commit is contained in:
Kazuhiro MUSASHI 2023-02-10 21:54:55 +09:00
parent a5595f30f7
commit 78b4c3464f
2 changed files with 27 additions and 0 deletions

View File

@ -39,6 +39,19 @@ service 'exporter_proxy' do
action [:enable, :start] action [:enable, :start]
end end
remote_file '/etc/consul.d/service-exporter_proxy.json' do
user 'root'
group 'root'
mode '644'
notifies :restart, 'service[consul]'
end
service 'consul' do
action :nothing
end
# Firewall settings here: # Firewall settings here:
%w( 60000/tcp ).each do |p| %w( 60000/tcp ).each do |p|
execute "ufw allow #{p}" do execute "ufw allow #{p}" do

View File

@ -0,0 +1,14 @@
{
"service": {
"name": "exporter_proxy",
"port": 60000,
"check":{
"http": "http://localhost:60000/",
"tls_skip_verify": false,
"interval": "60s",
"timeout": "1s",
"status": "passing",
"success_before_passing": 3
}
}
}