Mention copr yum repository, add systemd unit (#529)
* add systemd unit as example * mention community yum repo fixes #498 * rename textfile collector dir
This commit is contained in:
parent
536b989aea
commit
2a38b57a2a
4 changed files with 23 additions and 0 deletions
8
examples/systemd/README.md
Normal file
8
examples/systemd/README.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Systemd Unit
|
||||
|
||||
If you are using distribution packages or the copr repository, you don't need to deal with these files!
|
||||
|
||||
The unit file in this directory is to be put into `/etc/systemd/system`.
|
||||
It needs a user named `node_exporter`, whose shell should be `/sbin/nologin` and should not have any special privileges.
|
||||
It needs a sysconfig file in `/etc/sysconfig/node_exporter`.
|
||||
A sample file can be found in `sysconfig.node_exporter`.
|
||||
10
examples/systemd/node_exporter.service
Normal file
10
examples/systemd/node_exporter.service
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Node Exporter
|
||||
|
||||
[Service]
|
||||
User=node_exporter
|
||||
EnvironmentFile=/etc/sysconfig/node_exporter
|
||||
ExecStart=/usr/sbin/node_exporter $OPTIONS
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
1
examples/systemd/sysconfig.node_exporter
Normal file
1
examples/systemd/sysconfig.node_exporter
Normal file
|
|
@ -0,0 +1 @@
|
|||
OPTIONS="-collector.textfile.directory /var/lib/node_exporter/textfile_collector"
|
||||
Loading…
Add table
Add a link
Reference in a new issue