mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
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
|
||||
`/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
|
||||
[hub]: https://hub.docker.com/r/prom/node-exporter/
|
||||
[circleci]: https://circleci.com/gh/prometheus/node_exporter
|
||||
|
|
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…
Reference in a new issue