diff options
author | Tobias Florek <me@ibotty.net> | 2017-04-19 18:54:15 +0200 |
---|---|---|
committer | Johannes 'fish' Ziemke <github@freigeist.org> | 2017-04-19 18:54:15 +0200 |
commit | 2a38b57a2a7382896e4eca9957c6c0fd35885ae4 (patch) | |
tree | 6ae451e26f1e350037ae0452337289573e819cba /examples | |
parent | 536b989aea1549b0e5e07b0d365a0b1a98956f56 (diff) | |
download | prometheus_node_collector-2a38b57a2a7382896e4eca9957c6c0fd35885ae4.tar.bz2 prometheus_node_collector-2a38b57a2a7382896e4eca9957c6c0fd35885ae4.tar.xz prometheus_node_collector-2a38b57a2a7382896e4eca9957c6c0fd35885ae4.zip |
Mention copr yum repository, add systemd unit (#529)
* add systemd unit as example
* mention community yum repo
fixes #498
* rename textfile collector dir
Diffstat (limited to 'examples')
-rw-r--r-- | examples/systemd/README.md | 8 | ||||
-rw-r--r-- | examples/systemd/node_exporter.service | 10 | ||||
-rw-r--r-- | examples/systemd/sysconfig.node_exporter | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/examples/systemd/README.md b/examples/systemd/README.md new file mode 100644 index 0000000..c1f011f --- /dev/null +++ b/examples/systemd/README.md | |||
@@ -0,0 +1,8 @@ | |||
1 | # Systemd Unit | ||
2 | |||
3 | If you are using distribution packages or the copr repository, you don't need to deal with these files! | ||
4 | |||
5 | The unit file in this directory is to be put into `/etc/systemd/system`. | ||
6 | It needs a user named `node_exporter`, whose shell should be `/sbin/nologin` and should not have any special privileges. | ||
7 | It needs a sysconfig file in `/etc/sysconfig/node_exporter`. | ||
8 | A sample file can be found in `sysconfig.node_exporter`. | ||
diff --git a/examples/systemd/node_exporter.service b/examples/systemd/node_exporter.service new file mode 100644 index 0000000..64f1405 --- /dev/null +++ b/examples/systemd/node_exporter.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=Node Exporter | ||
3 | |||
4 | [Service] | ||
5 | User=node_exporter | ||
6 | EnvironmentFile=/etc/sysconfig/node_exporter | ||
7 | ExecStart=/usr/sbin/node_exporter $OPTIONS | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=multi-user.target | ||
diff --git a/examples/systemd/sysconfig.node_exporter b/examples/systemd/sysconfig.node_exporter new file mode 100644 index 0000000..7afdb91 --- /dev/null +++ b/examples/systemd/sysconfig.node_exporter | |||
@@ -0,0 +1 @@ | |||
OPTIONS="-collector.textfile.directory /var/lib/node_exporter/textfile_collector" | |||