1 |
commit: e2f7ef62c8ff7c37ddf48546f6a7d986b5cf6826 |
2 |
Author: William Hubbs <william.hubbs <AT> sony <DOT> com> |
3 |
AuthorDate: Thu Jan 17 21:51:47 2019 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 17 21:54:32 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2f7ef62 |
7 |
|
8 |
app-metrics/process-exporter: 0.4.0-r1 bump |
9 |
|
10 |
Add logging and make pidfile have the same name as the service. |
11 |
|
12 |
Copyright: Sony Interactive Entertainment Inc. |
13 |
Package-Manager: Portage-2.3.56, Repoman-2.3.12 |
14 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
15 |
|
16 |
.../process-exporter/files/process-exporter.initd | 8 ++++-- |
17 |
.../process-exporter-0.4.0-r1.ebuild | 33 ++++++++++++++++++++++ |
18 |
2 files changed, 39 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/app-metrics/process-exporter/files/process-exporter.initd b/app-metrics/process-exporter/files/process-exporter.initd |
21 |
index d739825ecdf..f25eadc2a11 100644 |
22 |
--- a/app-metrics/process-exporter/files/process-exporter.initd |
23 |
+++ b/app-metrics/process-exporter/files/process-exporter.initd |
24 |
@@ -1,8 +1,12 @@ |
25 |
#!/sbin/openrc-run |
26 |
+# Copyright 2019 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
|
29 |
description="Process Exporter for Prometheus" |
30 |
command=/usr/bin/process-exporter |
31 |
command_args="--config.path /etc/process-exporter/all.yaml |
32 |
- --web.listen-address=:9256 ${COMMAND_ARGS}" |
33 |
+ ${COMMAND_ARGS}" |
34 |
command_background=yes |
35 |
-pidfile=/var/run/process-exporter.pid |
36 |
+error_log=/var/log/process-exporter/${RC_SVCNAME}.log |
37 |
+output_log=/var/log/process-exporter/${RC_SVCNAME}.log |
38 |
+pidfile=/var/run/${RC_SVCNAME}.pid |
39 |
|
40 |
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 |
41 |
new file mode 100644 |
42 |
index 00000000000..1ce159062a8 |
43 |
--- /dev/null |
44 |
+++ b/app-metrics/process-exporter/process-exporter-0.4.0-r1.ebuild |
45 |
@@ -0,0 +1,33 @@ |
46 |
+# Copyright 2019 Gentoo Authors |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+ |
49 |
+EAPI=6 |
50 |
+EGO_PN=github.com/ncabatoff/process-exporter |
51 |
+ |
52 |
+inherit golang-build golang-vcs-snapshot systemd |
53 |
+ |
54 |
+DESCRIPTION="Process exporter for prometheus" |
55 |
+HOMEPAGE="https://github.com/ncabatoff/process-exporter" |
56 |
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
57 |
+ |
58 |
+LICENSE="MIT" |
59 |
+SLOT="0" |
60 |
+KEYWORDS="~amd64" |
61 |
+ |
62 |
+RESTRICT="strip" |
63 |
+ |
64 |
+src_compile() { |
65 |
+ pushd "src/${EGO_PN}" || die |
66 |
+ GOPATH="${S}" emake build |
67 |
+} |
68 |
+ |
69 |
+src_install() { |
70 |
+ pushd "src/${EGO_PN}" || die |
71 |
+ dobin ${PN} |
72 |
+dodoc *.md |
73 |
+ insinto /etc/${PN} |
74 |
+ doins packaging/conf/all.yaml |
75 |
+ systemd_dounit packaging/${PN}.service |
76 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
77 |
+ keepdir /var/log/${PN} |
78 |
+} |