-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create nutcracker exporter for prometheus (#835)
- Loading branch information
1 parent
a285c4a
commit 75cc032
Showing
7 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
2 changes: 2 additions & 0 deletions
2
app-metrics/twemproxy_exporter/files/nutcracker_exporter.confd
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="-web.listen-address 0.0.0.0:9012 -twemproxy.stats-address localhost:12" |
16 changes: 16 additions & 0 deletions
16
app-metrics/twemproxy_exporter/files/nutcracker_exporter.initd
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,16 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 2016-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
description="Nutcracker metrics exporter" | ||
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} | ||
user=${user:-nobody} | ||
group=${group:-nobody} | ||
|
||
command="/usr/bin/nutcracker_exporter" | ||
command_background="true" | ||
start_stop_daemon_args="--user ${user} --group ${group}" | ||
|
||
depend() { | ||
after net | ||
} |
2 changes: 2 additions & 0 deletions
2
app-metrics/twemproxy_exporter/files/nutcracker_socket_exporter.confd
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="-web.listen-address 0.0.0.0:9146 -twemproxy.stats-address localhost:146" |
16 changes: 16 additions & 0 deletions
16
app-metrics/twemproxy_exporter/files/nutcracker_socket_exporter.initd
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,16 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 2016-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
description="Nutcracker metrics exporter" | ||
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} | ||
user=${user:-nobody} | ||
group=${group:-nobody} | ||
|
||
command="/usr/bin/nutcracker_exporter" | ||
command_background="true" | ||
start_stop_daemon_args="--user ${user} --group ${group}" | ||
|
||
depend() { | ||
after net | ||
} |
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>Sherif Labib</name> | ||
</maintainer> | ||
</pkgmetadata> |
27 changes: 27 additions & 0 deletions
27
app-metrics/twemproxy_exporter/twemproxy_exporter-0.1.0.ebuild
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,27 @@ | ||
# Copyright 1999-2023 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
inherit go-module | ||
inherit git-r3 | ||
|
||
DESCRIPTION="Prometheus exporter that scrapes metrics from a nutcracker" | ||
HOMEPAGE="https://github.com/stuartnelson3/twemproxy_exporter" | ||
EGIT_REPO_URI="https://github.com/stuartnelson3/twemproxy_exporter.git" | ||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="~amd64" | ||
|
||
DEPEND="dev-lang/go" | ||
|
||
src_compile() { | ||
go build -o nutcracker_exporter || die | ||
} | ||
|
||
src_install() { | ||
dobin nutcracker_exporter | ||
newconfd "${FILESDIR}"/nutcracker_exporter.confd nutcracker_exporter | ||
newinitd "${FILESDIR}"/nutcracker_exporter.initd nutcracker_exporter | ||
newconfd "${FILESDIR}"/nutcracker_socket_exporter.confd nutcracker_socket_exporter | ||
newinitd "${FILESDIR}"/nutcracker_socket_exporter.initd nutcracker_socket_exporter | ||
} |