summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <william.hubbs@sony.com>2019-01-17 15:51:47 -0600
committerWilliam Hubbs <williamh@gentoo.org>2019-01-17 15:54:32 -0600
commite2f7ef62c8ff7c37ddf48546f6a7d986b5cf6826 (patch)
treec20547f0cae2751abd23a3482073515fef33934e /app-metrics/process-exporter
parentmedia-gfx/flam3: Remove outdated live ebuild. Repo is gone. (diff)
downloadgentoo-e2f7ef62c8ff7c37ddf48546f6a7d986b5cf6826.tar.gz
gentoo-e2f7ef62c8ff7c37ddf48546f6a7d986b5cf6826.tar.bz2
gentoo-e2f7ef62c8ff7c37ddf48546f6a7d986b5cf6826.zip
app-metrics/process-exporter: 0.4.0-r1 bump
Add logging and make pidfile have the same name as the service. Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.56, Repoman-2.3.12 Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'app-metrics/process-exporter')
-rw-r--r--app-metrics/process-exporter/files/process-exporter.initd8
-rw-r--r--app-metrics/process-exporter/process-exporter-0.4.0-r1.ebuild33
2 files changed, 39 insertions, 2 deletions
diff --git a/app-metrics/process-exporter/files/process-exporter.initd b/app-metrics/process-exporter/files/process-exporter.initd
index d739825ecdfc..f25eadc2a11f 100644
--- a/app-metrics/process-exporter/files/process-exporter.initd
+++ b/app-metrics/process-exporter/files/process-exporter.initd
@@ -1,8 +1,12 @@
#!/sbin/openrc-run
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
description="Process Exporter for Prometheus"
command=/usr/bin/process-exporter
command_args="--config.path /etc/process-exporter/all.yaml
- --web.listen-address=:9256 ${COMMAND_ARGS}"
+ ${COMMAND_ARGS}"
command_background=yes
-pidfile=/var/run/process-exporter.pid
+error_log=/var/log/process-exporter/${RC_SVCNAME}.log
+output_log=/var/log/process-exporter/${RC_SVCNAME}.log
+pidfile=/var/run/${RC_SVCNAME}.pid
diff --git a/app-metrics/process-exporter/process-exporter-0.4.0-r1.ebuild b/app-metrics/process-exporter/process-exporter-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..1ce159062a86
--- /dev/null
+++ b/app-metrics/process-exporter/process-exporter-0.4.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+EGO_PN=github.com/ncabatoff/process-exporter
+
+inherit golang-build golang-vcs-snapshot systemd
+
+DESCRIPTION="Process exporter for prometheus"
+HOMEPAGE="https://github.com/ncabatoff/process-exporter"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="strip"
+
+src_compile() {
+ pushd "src/${EGO_PN}" || die
+ GOPATH="${S}" emake build
+}
+
+src_install() {
+ pushd "src/${EGO_PN}" || die
+ dobin ${PN}
+dodoc *.md
+ insinto /etc/${PN}
+ doins packaging/conf/all.yaml
+ systemd_dounit packaging/${PN}.service
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ keepdir /var/log/${PN}
+}