Skip to content

Commit 75cc032

Browse files
authored
create nutcracker exporter for prometheus (#835)
1 parent a285c4a commit 75cc032

File tree

7 files changed

+71
-0
lines changed

7 files changed

+71
-0
lines changed

app-metrics/twemproxy_exporter/Manifest

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# arguments for ceph exporter
2+
command_args="-web.listen-address 0.0.0.0:9012 -twemproxy.stats-address localhost:12"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/sbin/openrc-run
2+
# Copyright 2016-2017 Gentoo Foundation
3+
# Distributed under the terms of the GNU General Public License v2
4+
5+
description="Nutcracker metrics exporter"
6+
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
7+
user=${user:-nobody}
8+
group=${group:-nobody}
9+
10+
command="/usr/bin/nutcracker_exporter"
11+
command_background="true"
12+
start_stop_daemon_args="--user ${user} --group ${group}"
13+
14+
depend() {
15+
after net
16+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# arguments for ceph exporter
2+
command_args="-web.listen-address 0.0.0.0:9146 -twemproxy.stats-address localhost:146"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/sbin/openrc-run
2+
# Copyright 2016-2017 Gentoo Foundation
3+
# Distributed under the terms of the GNU General Public License v2
4+
5+
description="Nutcracker metrics exporter"
6+
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
7+
user=${user:-nobody}
8+
group=${group:-nobody}
9+
10+
command="/usr/bin/nutcracker_exporter"
11+
command_background="true"
12+
start_stop_daemon_args="--user ${user} --group ${group}"
13+
14+
depend() {
15+
after net
16+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
3+
<pkgmetadata>
4+
<maintainer type="person">
5+
<email>sherif@adjust.com</email>
6+
<name>Sherif Labib</name>
7+
</maintainer>
8+
</pkgmetadata>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 1999-2023 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=7
5+
inherit go-module
6+
inherit git-r3
7+
8+
DESCRIPTION="Prometheus exporter that scrapes metrics from a nutcracker"
9+
HOMEPAGE="https://github.com/stuartnelson3/twemproxy_exporter"
10+
EGIT_REPO_URI="https://github.com/stuartnelson3/twemproxy_exporter.git"
11+
LICENSE="Apache-2.0"
12+
SLOT="0"
13+
KEYWORDS="~amd64"
14+
15+
DEPEND="dev-lang/go"
16+
17+
src_compile() {
18+
go build -o nutcracker_exporter || die
19+
}
20+
21+
src_install() {
22+
dobin nutcracker_exporter
23+
newconfd "${FILESDIR}"/nutcracker_exporter.confd nutcracker_exporter
24+
newinitd "${FILESDIR}"/nutcracker_exporter.initd nutcracker_exporter
25+
newconfd "${FILESDIR}"/nutcracker_socket_exporter.confd nutcracker_socket_exporter
26+
newinitd "${FILESDIR}"/nutcracker_socket_exporter.initd nutcracker_socket_exporter
27+
}

0 commit comments

Comments
 (0)