Deploy `systemd` config for `node_exporter`.
This commit is contained in:
parent
5bf5eac091
commit
0bfd4a7d53
|
@ -0,0 +1 @@
|
||||||
|
OPTIONS=' --web.listen-address="127.0.0.1:9100" --collector.systemd'
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Node Exporter
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
EnvironmentFile=-/etc/default/node_exporter
|
||||||
|
ExecStart=/usr/local/bin/node_exporter $OPTIONS
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -1,10 +1,18 @@
|
||||||
# Deploy the `supervisord` configuration:
|
# Deploy the `supervisord` configuration:
|
||||||
remote_file '/etc/supervisor/conf.d/node_exporter.conf' do
|
remote_file '/etc/systemd/system/node_exporter.service' do
|
||||||
owner 'root'
|
owner 'root'
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
end
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
remote_file '/etc/default/node_exporter' do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode '644'
|
||||||
|
end
|
||||||
|
|
||||||
|
service 'node_exporter' do
|
||||||
|
action [ :enable, :start]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deploy `consul` config for `node_exporter`:
|
# Deploy `consul` config for `node_exporter`:
|
||||||
|
|
Loading…
Reference in New Issue