itamae/cookbooks/prometheus-exporters/filestat_exporter_setup.rb

46 lines
867 B
Ruby
Raw Normal View History

# Deploy the `supervisord` configuration:
remote_file '/etc/prometheus_exporters.d/filestat.yml' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[supervisor]'
end
# Deploy the `systemd` configuration:
remote_file '/etc/systemd/system/filestat_exporter.service' do
owner 'root'
group 'root'
mode '644'
end
service 'filestat_exporter' do
action [:enable, :start]
end
# Deploy `rsyslog` config:
remote_file '/etc/rsyslog.d/30-filestat_exporter.conf' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[rsyslog]'
end
service 'rsyslog' do
action :nothing
end
2023-02-07 14:02:36 +00:00
# Deploy `consul` config for `filestat_exporter`:
remote_file '/etc/consul.d/service-filestat_exporter.json' do
owner 'consul'
group 'consul'
mode '644'
notifies :reload, 'service[consul]'
end
service 'consul' do
action :nothing
end