forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-metrics/ceph_exporter: initial import
Signed-off-by: William Hubbs <[email protected]>
- Loading branch information
Showing
5 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DIST ceph_exporter-4.0.1-deps.tar.xz 7402752 BLAKE2B 4619eba4c1630cd683193fec8f449698587dc8d17c26992e033fa7495934de26bcca84fac4ac174e25e7f405c27033fc324703748cac59f90b6e58c2548f8cd2 SHA512 893a6d246c640647ac55f5f32d657cbd80bec3c9404e1484e6188e4e045a20d01d50559723105f179d438019f66d904938a24ce164f85a41631930067d92f7ba | ||
DIST ceph_exporter-4.0.1.tar.gz 143653 BLAKE2B 2a8c907fb5ff06bc629644aab94b450646f6b25ff057d2b01485f0131cef3e64e3b159f029f29cf78c8d6b450ff9b750858799fe079256509e31e5b8bcf3e012 SHA512 154e75cc397635450d2b99e5e56c829fd5816e9aad95707eff42500ce21fd92a6d12772a58530b580b8e14e5db7c32d2d24f395175f414df9d89fbcbb8239ece |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
inherit go-module | ||
|
||
DESCRIPTION="Prometheus exporter that scrapes metrics from a ceph cluster" | ||
HOMEPAGE="https://github.com/digitalocean/ceph_exporter" | ||
SRC_URI="https://github.com/digitalocean/ceph_exporter/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="~amd64" | ||
|
||
RDEPEND=" | ||
acct-group/ceph | ||
acct-user/ceph | ||
=sys-cluster/ceph-16* | ||
" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND=">=dev-lang/go-1.18" | ||
|
||
src_compile() { | ||
go build -o bin/ceph_exporter || die | ||
} | ||
|
||
src_install() { | ||
dobin bin/ceph_exporter | ||
dodoc {README,CONTRIBUTING}.md exporter.yml | ||
newconfd "${FILESDIR}"/${PN}.confd ${PN} | ||
newinitd "${FILESDIR}"/${PN}.initd ${PN} | ||
keepdir /var/lib/ceph_exporter /var/log/ceph_exporter | ||
fowners ceph:ceph /var/lib/ceph_exporter /var/log/ceph_exporter | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# arguments for ceph exporter | ||
# command_args="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 2016-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
description="Prometheus ceph metrics exporter" | ||
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} | ||
user=${user:-ceph} | ||
group=${group:-ceph} | ||
|
||
command="/usr/bin/ceph_exporter" | ||
command_background="true" | ||
output_log="/var/log/ceph_exporter/${RC_SVCNAME}.log" | ||
error_log="/var/log/ceph_exporter/${RC_SVCNAME}.log" | ||
start_stop_daemon_args="--user ${user} --group ${group}" | ||
|
||
depend() { | ||
after net | ||
} | ||
|
||
start_pre() { | ||
if [ ! -f "/etc/ceph/ceph.${user}.keyring" ]; then | ||
eerror "keyring not found, exporter won't be able to connect to the cluster!" | ||
exit 1 | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>William Hubbs</name> | ||
</maintainer> | ||
</pkgmetadata> |