1 |
commit: f9d7aa4ddb50ad0a34454a5d14646340731e2102 |
2 |
Author: William Hubbs <william.hubbs <AT> sony <DOT> com> |
3 |
AuthorDate: Thu Jan 10 22:05:01 2019 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 10 22:06:20 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9d7aa4d |
7 |
|
8 |
app-metrics/process-exporter: mine /proc to report process stats for prometheus |
9 |
|
10 |
Copyright: Sony Interactive Entertainment Inc. |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.12 |
12 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
13 |
|
14 |
app-metrics/process-exporter/Manifest | 1 + |
15 |
.../process-exporter/files/process-exporter.initd | 8 ++++++ |
16 |
app-metrics/process-exporter/metadata.xml | 8 ++++++ |
17 |
.../process-exporter/process-exporter-0.4.0.ebuild | 32 ++++++++++++++++++++++ |
18 |
4 files changed, 49 insertions(+) |
19 |
|
20 |
diff --git a/app-metrics/process-exporter/Manifest b/app-metrics/process-exporter/Manifest |
21 |
new file mode 100644 |
22 |
index 00000000000..8cdb45f2e46 |
23 |
--- /dev/null |
24 |
+++ b/app-metrics/process-exporter/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST process-exporter-0.4.0.tar.gz 378006 BLAKE2B 053379e8e0cb95f099cebf53289c48c39d6c8ef22c8b0dcf0bd128453e601da98be9205bb5c7cda8a05d5f50addabbcb46f6ece44926da17c1bd8616e452783a SHA512 88f6f0e07bb7f3ea6c593ba359c09ace47eb0830ff0759b1f4dd64219a6c9069dc2891a328a90bdef13ea02efc576fb71de7ff095788b4dd45c2683c90904363 |
27 |
|
28 |
diff --git a/app-metrics/process-exporter/files/process-exporter.initd b/app-metrics/process-exporter/files/process-exporter.initd |
29 |
new file mode 100644 |
30 |
index 00000000000..d739825ecdf |
31 |
--- /dev/null |
32 |
+++ b/app-metrics/process-exporter/files/process-exporter.initd |
33 |
@@ -0,0 +1,8 @@ |
34 |
+#!/sbin/openrc-run |
35 |
+ |
36 |
+description="Process Exporter for Prometheus" |
37 |
+command=/usr/bin/process-exporter |
38 |
+command_args="--config.path /etc/process-exporter/all.yaml |
39 |
+ --web.listen-address=:9256 ${COMMAND_ARGS}" |
40 |
+command_background=yes |
41 |
+pidfile=/var/run/process-exporter.pid |
42 |
|
43 |
diff --git a/app-metrics/process-exporter/metadata.xml b/app-metrics/process-exporter/metadata.xml |
44 |
new file mode 100644 |
45 |
index 00000000000..c36c37139fa |
46 |
--- /dev/null |
47 |
+++ b/app-metrics/process-exporter/metadata.xml |
48 |
@@ -0,0 +1,8 @@ |
49 |
+<?xml version="1.0" encoding="UTF-8"?> |
50 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
51 |
+<pkgmetadata> |
52 |
+ <maintainer type="person"> |
53 |
+ <email>williamh@g.o</email> |
54 |
+ <name>William Hubbs</name> |
55 |
+ </maintainer> |
56 |
+</pkgmetadata> |
57 |
|
58 |
diff --git a/app-metrics/process-exporter/process-exporter-0.4.0.ebuild b/app-metrics/process-exporter/process-exporter-0.4.0.ebuild |
59 |
new file mode 100644 |
60 |
index 00000000000..4ea9b6f62fa |
61 |
--- /dev/null |
62 |
+++ b/app-metrics/process-exporter/process-exporter-0.4.0.ebuild |
63 |
@@ -0,0 +1,32 @@ |
64 |
+# Copyright 2019 Gentoo Authors |
65 |
+# Distributed under the terms of the GNU General Public License v2 |
66 |
+ |
67 |
+EAPI=6 |
68 |
+EGO_PN=github.com/ncabatoff/process-exporter |
69 |
+ |
70 |
+inherit golang-build golang-vcs-snapshot systemd |
71 |
+ |
72 |
+DESCRIPTION="Process exporter for prometheus" |
73 |
+HOMEPAGE="https://github.com/ncabatoff/process-exporter" |
74 |
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
75 |
+ |
76 |
+LICENSE="MIT" |
77 |
+SLOT="0" |
78 |
+KEYWORDS="~amd64" |
79 |
+ |
80 |
+RESTRICT="strip" |
81 |
+ |
82 |
+src_compile() { |
83 |
+ pushd "src/${EGO_PN}" || die |
84 |
+ GOPATH="${S}" emake build |
85 |
+} |
86 |
+ |
87 |
+src_install() { |
88 |
+ pushd "src/${EGO_PN}" || die |
89 |
+ dobin ${PN} |
90 |
+dodoc *.md |
91 |
+ insinto /etc/${PN} |
92 |
+ doins packaging/conf/all.yaml |
93 |
+ systemd_dounit packaging/${PN}.service |
94 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
95 |
+} |