-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-metrics/unbound_exporter: add 9999
- Loading branch information
Showing
6 changed files
with
125 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,16 @@ | ||
command_args="" | ||
|
||
# Prometheus-unbound-exporter supports the following options: | ||
|
||
# -web.listen-address | ||
# Address to listen on for web interface and telemetry. (Default: ":9167") | ||
# -web.telemetry-path | ||
# Path under which to expose metrics. (Default: "/metrics") | ||
# -unbound.host | ||
# Unbound control socket hostname and port number. (Default: "localhost:8953") | ||
# -unbound.ca | ||
# Unbound server certificate. (Default "/etc/unbound/unbound_server.pem") | ||
# -unbound.cert | ||
# Unbound client certificate. (Default: "/etc/unbound/unbound_control.pem") | ||
# -unbound.key | ||
# Unbound client key. (Default: "/etc/unbound/unbound_control.key") |
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,23 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
description="Prometheus unbound exporter" | ||
pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"} | ||
user=${user:-prometheus-exporter} | ||
|
||
command="/usr/bin/${SVCNAME}" | ||
command_args="${command_args}" | ||
command_background="true" | ||
start_stop_daemon_args="--user ${user} \ | ||
--stdout /var/log/prometheus/${SVCNAME}.log \ | ||
--stderr /var/log/prometheus/${SVCNAME}.log" | ||
|
||
depend() { | ||
need net | ||
after net | ||
} | ||
|
||
start_pre() { | ||
checkpath -d -m 0755 -o "${user}" "${pidfile%/*}" | ||
} |
17 changes: 17 additions & 0 deletions
17
app-metrics/unbound_exporter/files/unbound_exporter.service
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,17 @@ | ||
[Unit] | ||
Description=Prometheus unbound exporter | ||
Documentation=https://github.com/kumina/unbound_exporter | ||
After=network-online.target | ||
|
||
[Service] | ||
EnvironmentFile=/etc/default/%p | ||
User=prometheus-exporter | ||
Restart=on-failure | ||
ExecStart=/usr/bin/%p $ARGS | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
TimeoutStopSec=20s | ||
SendSIGKILL=no | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
19 changes: 19 additions & 0 deletions
19
app-metrics/unbound_exporter/files/unbound_exporter.service.conf
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,19 @@ | ||
[Service] | ||
# Set the command-line arguments to pass to the server. | ||
#Environment="ARGS=" | ||
|
||
# Prometheus-unbound-exporter supports the following options: | ||
|
||
# -web.listen-address | ||
# Address to listen on for web interface and telemetry. (Default: ":9167") | ||
# -web.telemetry-path | ||
# Path under which to expose metrics. (Default: "/metrics") | ||
# -unbound.host | ||
# Unbound control socket hostname and port number. (Default: "localhost:8953") | ||
# -unbound.ca | ||
# Unbound server certificate. (Default "/etc/unbound/unbound_server.pem") | ||
# -unbound.cert | ||
# Unbound client certificate. (Default: "/etc/unbound/unbound_control.pem") | ||
# -unbound.key | ||
# Unbound client key. (Default: "/etc/unbound/unbound_control.key") | ||
|
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,11 @@ | ||
<?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>Vadim Misbakh-Soloviov</name> | ||
</maintainer> | ||
<upstream> | ||
<remote-id type="github">letsencrypt/unbound_exporter</remote-id> | ||
</upstream> | ||
</pkgmetadata> |
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,39 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit go-module systemd git-r3 | ||
|
||
DESCRIPTION="Prometheus exporter for PostgreSQL metrics" | ||
HOMEPAGE="https://github.com/letsencrypt/unbound_exporter" | ||
EGIT_REPO_URI="https://github.com/letsencrypt/unbound_exporter" | ||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
|
||
RDEPEND=" | ||
acct-user/prometheus | ||
acct-group/prometheus | ||
" | ||
DOCS=(README.md) | ||
|
||
src_unpack() { | ||
default | ||
git-r3_src_unpack | ||
go-module_live_vendor | ||
} | ||
|
||
src_compile() { | ||
ego build -o "${PN}" | ||
} | ||
|
||
src_install() { | ||
dobin "${PN}" | ||
|
||
newinitd "${FILESDIR}/${PN}.initd" "${PN}" | ||
newconfd "${FILESDIR}/${PN}.confd" "${PN}" | ||
systemd_dounit "${FILESDIR}/${PN}.service" | ||
systemd_install_serviced "${FILESDIR}/${PN}.service.conf" | ||
|
||
einstalldocs | ||
} |