2023-02-21 14:12:51 +00:00
|
|
|
# Deploy the configuration:
|
2020-10-12 14:56:41 +00:00
|
|
|
remote_file '/etc/prometheus_exporters.d/filestat.yml' do
|
|
|
|
owner 'root'
|
|
|
|
group 'root'
|
|
|
|
mode '644'
|
|
|
|
end
|
|
|
|
|
2023-02-07 14:02:24 +00:00
|
|
|
# Deploy the `systemd` configuration:
|
|
|
|
remote_file '/etc/systemd/system/filestat_exporter.service' do
|
2020-10-12 14:56:41 +00:00
|
|
|
owner 'root'
|
|
|
|
group 'root'
|
|
|
|
mode '644'
|
2023-02-07 14:02:24 +00:00
|
|
|
end
|
2020-10-12 14:56:41 +00:00
|
|
|
|
2023-02-07 14:02:24 +00:00
|
|
|
service 'filestat_exporter' do
|
|
|
|
action [:enable, :start]
|
2020-10-12 14:56:41 +00:00
|
|
|
end
|
|
|
|
|
2023-02-07 14:13:57 +00:00
|
|
|
# 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:34:33 +00:00
|
|
|
# Deploy `logrotate` config:
|
|
|
|
remote_file '/etc/logrotate.d/filestat_exporter' do
|
|
|
|
owner 'root'
|
|
|
|
group 'root'
|
|
|
|
mode '644'
|
|
|
|
end
|
|
|
|
|
2023-02-07 14:39:10 +00:00
|
|
|
# Deploy `vector` config:
|
|
|
|
remote_file '/etc/vector/filestat_exporter.toml' do
|
|
|
|
owner 'root'
|
|
|
|
group 'root'
|
|
|
|
mode '0644'
|
|
|
|
|
|
|
|
notifies :restart, 'service[vector-filestat_exporter]'
|
|
|
|
end
|
|
|
|
|
|
|
|
remote_file '/etc/systemd/system/vector-filestat_exporter.service' do
|
|
|
|
owner 'root'
|
|
|
|
group 'root'
|
|
|
|
mode '0644'
|
|
|
|
end
|
|
|
|
|
|
|
|
service 'vector-filestat_exporter' do
|
|
|
|
action [:enable, :start]
|
|
|
|
end
|
|
|
|
|
2023-02-07 14:02:36 +00:00
|
|
|
# Deploy `consul` config for `filestat_exporter`:
|
2020-10-12 14:56:41 +00:00
|
|
|
remote_file '/etc/consul.d/service-filestat_exporter.json' do
|
2020-11-22 15:52:14 +00:00
|
|
|
owner 'consul'
|
|
|
|
group 'consul'
|
2020-10-12 14:56:41 +00:00
|
|
|
mode '644'
|
|
|
|
|
2020-11-22 16:42:06 +00:00
|
|
|
notifies :reload, 'service[consul]'
|
2020-10-12 14:56:41 +00:00
|
|
|
end
|
|
|
|
|
2020-11-22 16:42:06 +00:00
|
|
|
service 'consul' do
|
2020-10-12 14:56:41 +00:00
|
|
|
action :nothing
|
|
|
|
end
|