diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
commit | 623ee73d661e5ed8475cb264511f683407d87365 (patch) | |
tree | 993eb27c93ec7a2d2d19550300d888fc1fed9e69 /app-metrics/node_exporter/files | |
parent | ceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff) |
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'app-metrics/node_exporter/files')
-rw-r--r-- | app-metrics/node_exporter/files/node_exporter.initd | 23 | ||||
-rw-r--r-- | app-metrics/node_exporter/files/node_exporter.service | 10 |
2 files changed, 33 insertions, 0 deletions
diff --git a/app-metrics/node_exporter/files/node_exporter.initd b/app-metrics/node_exporter/files/node_exporter.initd new file mode 100644 index 000000000000..3ccddf757a89 --- /dev/null +++ b/app-metrics/node_exporter/files/node_exporter.initd @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 2016-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Prometheus machine metrics exporter" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} + +command="/usr/sbin/node_exporter" +command_args="${command_args:---collector.textfile.directory=/var/lib/node_exporter/}" +command_background="true" +start_stop_daemon_args="--user ${user} --group ${group} \ + --stdout /var/log/node_exporter/${RC_SVCNAME}.log \ + --stderr /var/log/node_exporter/${RC_SVCNAME}.log" + +depend() { + after net +} + +start_pre() { + checkpath -q -d -m 0755 -o ${user}:${group} /var/log/node_exporter +} diff --git a/app-metrics/node_exporter/files/node_exporter.service b/app-metrics/node_exporter/files/node_exporter.service new file mode 100644 index 000000000000..3235924f7850 --- /dev/null +++ b/app-metrics/node_exporter/files/node_exporter.service @@ -0,0 +1,10 @@ +[Unit] +Description=Node Exporter + +[Service] +User=node_exporter +EnvironmentFile=/etc/sysconfig/node_exporter +ExecStart=/usr/bin/node_exporter $OPTIONS + +[Install] +WantedBy=multi-user.target |