1 |
commit: b1f8f72551df2bd5bb3357bc0e05b6857ac68f50 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 5 22:31:42 2022 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 5 22:33:04 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1f8f725 |
7 |
|
8 |
app-metrics/ceph_exporter: initial import |
9 |
|
10 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
11 |
|
12 |
app-metrics/ceph_exporter/Manifest | 2 ++ |
13 |
.../ceph_exporter/ceph_exporter-4.0.1.ebuild | 35 ++++++++++++++++++++++ |
14 |
.../ceph_exporter/files/ceph_exporter.confd | 2 ++ |
15 |
.../ceph_exporter/files/ceph_exporter.initd | 25 ++++++++++++++++ |
16 |
app-metrics/ceph_exporter/metadata.xml | 8 +++++ |
17 |
5 files changed, 72 insertions(+) |
18 |
|
19 |
diff --git a/app-metrics/ceph_exporter/Manifest b/app-metrics/ceph_exporter/Manifest |
20 |
new file mode 100644 |
21 |
index 000000000000..2f4769c7b1ce |
22 |
--- /dev/null |
23 |
+++ b/app-metrics/ceph_exporter/Manifest |
24 |
@@ -0,0 +1,2 @@ |
25 |
+DIST ceph_exporter-4.0.1-deps.tar.xz 7402752 BLAKE2B 4619eba4c1630cd683193fec8f449698587dc8d17c26992e033fa7495934de26bcca84fac4ac174e25e7f405c27033fc324703748cac59f90b6e58c2548f8cd2 SHA512 893a6d246c640647ac55f5f32d657cbd80bec3c9404e1484e6188e4e045a20d01d50559723105f179d438019f66d904938a24ce164f85a41631930067d92f7ba |
26 |
+DIST ceph_exporter-4.0.1.tar.gz 143653 BLAKE2B 2a8c907fb5ff06bc629644aab94b450646f6b25ff057d2b01485f0131cef3e64e3b159f029f29cf78c8d6b450ff9b750858799fe079256509e31e5b8bcf3e012 SHA512 154e75cc397635450d2b99e5e56c829fd5816e9aad95707eff42500ce21fd92a6d12772a58530b580b8e14e5db7c32d2d24f395175f414df9d89fbcbb8239ece |
27 |
|
28 |
diff --git a/app-metrics/ceph_exporter/ceph_exporter-4.0.1.ebuild b/app-metrics/ceph_exporter/ceph_exporter-4.0.1.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..ef1c3479b0c1 |
31 |
--- /dev/null |
32 |
+++ b/app-metrics/ceph_exporter/ceph_exporter-4.0.1.ebuild |
33 |
@@ -0,0 +1,35 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+inherit go-module |
39 |
+ |
40 |
+DESCRIPTION="Prometheus exporter that scrapes metrics from a ceph cluster" |
41 |
+HOMEPAGE="https://github.com/digitalocean/ceph_exporter" |
42 |
+SRC_URI="https://github.com/digitalocean/ceph_exporter/archive/${PV}.tar.gz -> ${P}.tar.gz" |
43 |
+SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" |
44 |
+ |
45 |
+LICENSE="Apache-2.0" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64" |
48 |
+ |
49 |
+RDEPEND=" |
50 |
+ acct-group/ceph |
51 |
+ acct-user/ceph |
52 |
+ =sys-cluster/ceph-16* |
53 |
+" |
54 |
+DEPEND="${RDEPEND}" |
55 |
+BDEPEND=">=dev-lang/go-1.18" |
56 |
+ |
57 |
+src_compile() { |
58 |
+ go build -o bin/ceph_exporter || die |
59 |
+} |
60 |
+ |
61 |
+src_install() { |
62 |
+ dobin bin/ceph_exporter |
63 |
+ dodoc {README,CONTRIBUTING}.md exporter.yml |
64 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
65 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
66 |
+ keepdir /var/lib/ceph_exporter /var/log/ceph_exporter |
67 |
+ fowners ceph:ceph /var/lib/ceph_exporter /var/log/ceph_exporter |
68 |
+} |
69 |
|
70 |
diff --git a/app-metrics/ceph_exporter/files/ceph_exporter.confd b/app-metrics/ceph_exporter/files/ceph_exporter.confd |
71 |
new file mode 100644 |
72 |
index 000000000000..46da635f4264 |
73 |
--- /dev/null |
74 |
+++ b/app-metrics/ceph_exporter/files/ceph_exporter.confd |
75 |
@@ -0,0 +1,2 @@ |
76 |
+# arguments for ceph exporter |
77 |
+# command_args="" |
78 |
|
79 |
diff --git a/app-metrics/ceph_exporter/files/ceph_exporter.initd b/app-metrics/ceph_exporter/files/ceph_exporter.initd |
80 |
new file mode 100644 |
81 |
index 000000000000..59632972d1be |
82 |
--- /dev/null |
83 |
+++ b/app-metrics/ceph_exporter/files/ceph_exporter.initd |
84 |
@@ -0,0 +1,25 @@ |
85 |
+#!/sbin/openrc-run |
86 |
+# Copyright 2016-2017 Gentoo Foundation |
87 |
+# Distributed under the terms of the GNU General Public License v2 |
88 |
+ |
89 |
+description="Prometheus ceph metrics exporter" |
90 |
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} |
91 |
+user=${user:-ceph} |
92 |
+group=${group:-ceph} |
93 |
+ |
94 |
+command="/usr/bin/ceph_exporter" |
95 |
+command_background="true" |
96 |
+output_log="/var/log/ceph_exporter/${RC_SVCNAME}.log" |
97 |
+error_log="/var/log/ceph_exporter/${RC_SVCNAME}.log" |
98 |
+start_stop_daemon_args="--user ${user} --group ${group}" |
99 |
+ |
100 |
+depend() { |
101 |
+ after net |
102 |
+} |
103 |
+ |
104 |
+start_pre() { |
105 |
+ if [ ! -f "/etc/ceph/ceph.${user}.keyring" ]; then |
106 |
+ eerror "keyring not found, exporter won't be able to connect to the cluster!" |
107 |
+ exit 1 |
108 |
+ fi |
109 |
+} |
110 |
|
111 |
diff --git a/app-metrics/ceph_exporter/metadata.xml b/app-metrics/ceph_exporter/metadata.xml |
112 |
new file mode 100644 |
113 |
index 000000000000..3b2a9c591010 |
114 |
--- /dev/null |
115 |
+++ b/app-metrics/ceph_exporter/metadata.xml |
116 |
@@ -0,0 +1,8 @@ |
117 |
+<?xml version="1.0" encoding="UTF-8"?> |
118 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
119 |
+<pkgmetadata> |
120 |
+<maintainer type="person"> |
121 |
+<email>williamh@g.o</email> |
122 |
+<name>William Hubbs</name> |
123 |
+</maintainer> |
124 |
+</pkgmetadata> |