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
|
@ -138,6 +138,10 @@ docker run -d -p 9100:9100 \
|
||||||
Be aware though that the mountpoint label in various metrics will now have
|
Be aware though that the mountpoint label in various metrics will now have
|
||||||
`/host` as prefix.
|
`/host` as prefix.
|
||||||
|
|
||||||
|
## Using a third-party repository for RHEL/CentOS/Fedora
|
||||||
|
|
||||||
|
There is a [community-supplied COPR repository](https://copr.fedorainfracloud.org/coprs/ibotty/prometheus-exporters/). It closely follows upstream releases.
|
||||||
|
|
||||||
[travis]: https://travis-ci.org/prometheus/node_exporter
|
[travis]: https://travis-ci.org/prometheus/node_exporter
|
||||||
[hub]: https://hub.docker.com/r/prom/node-exporter/
|
[hub]: https://hub.docker.com/r/prom/node-exporter/
|
||||||
[circleci]: https://circleci.com/gh/prometheus/node_exporter
|
[circleci]: https://circleci.com/gh/prometheus/node_exporter
|
||||||
|
|
|
@ -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`.
|
|
@ -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
|
|
@ -0,0 +1 @@
|
||||||
|
OPTIONS="-collector.textfile.directory /var/lib/node_exporter/textfile_collector"
|
Loading…
Reference in New Issue