aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTobias Florek <me@ibotty.net>2017-04-19 18:54:15 +0200
committerJohannes 'fish' Ziemke <github@freigeist.org>2017-04-19 18:54:15 +0200
commit2a38b57a2a7382896e4eca9957c6c0fd35885ae4 (patch)
tree6ae451e26f1e350037ae0452337289573e819cba /examples
parent536b989aea1549b0e5e07b0d365a0b1a98956f56 (diff)
downloadprometheus_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.md8
-rw-r--r--examples/systemd/node_exporter.service10
-rw-r--r--examples/systemd/sysconfig.node_exporter1
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
3If you are using distribution packages or the copr repository, you don't need to deal with these files!
4
5The unit file in this directory is to be put into `/etc/systemd/system`.
6It needs a user named `node_exporter`, whose shell should be `/sbin/nologin` and should not have any special privileges.
7It needs a sysconfig file in `/etc/sysconfig/node_exporter`.
8A 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]
2Description=Node Exporter
3
4[Service]
5User=node_exporter
6EnvironmentFile=/etc/sysconfig/node_exporter
7ExecStart=/usr/sbin/node_exporter $OPTIONS
8
9[Install]
10WantedBy=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"