Skip to content

Commit

Permalink
Mention copr yum repository, add systemd unit (prometheus#529)
Browse files Browse the repository at this point in the history
* add systemd unit as example

* mention community yum repo

fixes prometheus#498

* rename textfile collector dir
  • Loading branch information
ibotty authored and oblitorum committed Apr 9, 2024
1 parent 2d61d38 commit 2e85753
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -136,3 +136,13 @@ As a general rule of thumb, please try to create bug reports that are:
- *Specific.* Include as much detail as possible: which version, what environment, etc.
- *Unique.* Do not duplicate existing tickets.
- *Scoped to a Single Bug.* One bug per report.

## 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
[quay]: https://quay.io/repository/prometheus/node-exporter
[goreportcard]: https://goreportcard.com/report/github.com/prometheus/node_exporter
8 changes: 8 additions & 0 deletions examples/systemd/README.md
@@ -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 changes: 10 additions & 0 deletions examples/systemd/node_exporter.service
@@ -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 change: 1 addition & 0 deletions examples/systemd/sysconfig.node_exporter
@@ -0,0 +1 @@
OPTIONS="-collector.textfile.directory /var/lib/node_exporter/textfile_collector"

0 comments on commit 2e85753

Please sign in to comment.