diff options
Diffstat (limited to 'app-metrics/alertmanager')
-rw-r--r-- | app-metrics/alertmanager/Manifest | 5 | ||||
-rw-r--r-- | app-metrics/alertmanager/alertmanager-0.14.0-r1.ebuild | 52 | ||||
-rw-r--r-- | app-metrics/alertmanager/files/alertmanager.confd | 2 | ||||
-rw-r--r-- | app-metrics/alertmanager/files/alertmanager.initd | 28 | ||||
-rw-r--r-- | app-metrics/alertmanager/metadata.xml | 11 |
5 files changed, 98 insertions, 0 deletions
diff --git a/app-metrics/alertmanager/Manifest b/app-metrics/alertmanager/Manifest new file mode 100644 index 000000000000..1e80b46537e2 --- /dev/null +++ b/app-metrics/alertmanager/Manifest @@ -0,0 +1,5 @@ +AUX alertmanager.confd 135 BLAKE2B 7a3dd341e63a73e9782d44dc59c8a65ea1c855ae0589ce80e616be6d8faf24224f804c564296955487760c155649c184b3132a2741cf30d171c88dcfdd469583 SHA512 391eb26d67310fba9371d274b1e9552cf0c9c02de1e3616c3e5514ae99bf7d36b52c6caa7e94a96f640b0f8542b15b4dded9d59154173c01d4e9a99ec2219fbc +AUX alertmanager.initd 817 BLAKE2B 74a7e6c292ac52f4d6d00644038e74624be41ed632a6db389a7c226b3a37d43f22f1c8c098d34f652d9b6b9cb407523b375c884e75fe3740578f26e822df21c7 SHA512 34ae9348f5e054543bdbffd29e30d1fb6147d47e74cecb1755c29bf4327bd56ac4fae4cecddf2c515b6ddffbce4ad7151ae3a3e7f283db2d6b74619f5faa44ac +DIST alertmanager-0.14.0.tar.gz 2786623 BLAKE2B e9c773af81153b3062d27464c6b8d1edcafe66575b8d5a6309b162c6546d3dedf7ae5b1afcf4dafb3dfdb6bcf826aeb9119b27cfe596da365a6272ee71b30441 SHA512 e352d51d86b853ff679892df3c494da2c7b4afb918d807e6d63b76e959b586f43a4c773de18bdd9e6a5067d4034748bb304ebdee2f08983b00890c1ae393d0b8 +EBUILD alertmanager-0.14.0-r1.ebuild 1311 BLAKE2B 347ffeaca216e1b1234b6005fe670696ec2d580738b8b0dc7236a28ba8821176d3eba3a37a0d7772f983be3632d7f709fa37f3d75603607c7bdf25a271955be2 SHA512 64a1ceb5cca20a51ad3ba9c5dee50d20c3774acabae01dcb3ace1a185b125eb44dfe1ba1ffc60876c09e5b14d59d421b9950f4e71d2f937c80bb398e65bf5a08 +MISC metadata.xml 333 BLAKE2B eb945c2d22a9d93154b7a021559038b9565f00d54dda86445c00156ddffd6754cd433026ff465a38864d00bf1c44a3c050835fd854dadce82ea92649613151ef SHA512 2059ca45e92e3a833d93097362e1ae79ef085c35f87ec2bcbde4ee2d20f8938cb27fb19647d083990c1224b3d0c06f163a3f1bedfabfb59a6b3b15a90697ac0f diff --git a/app-metrics/alertmanager/alertmanager-0.14.0-r1.ebuild b/app-metrics/alertmanager/alertmanager-0.14.0-r1.ebuild new file mode 100644 index 000000000000..43de943ea4fb --- /dev/null +++ b/app-metrics/alertmanager/alertmanager-0.14.0-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit user golang-build golang-vcs-snapshot + +EGO_PN="github.com/prometheus/alertmanager" +EGIT_COMMIT="v${PV/_rc/-rc.}" +ALERTMANAGER_COMMIT="fb713f6" +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="Alertmanager for alerts sent by client applications such as Prometheus" +HOMEPAGE="https://github.com/prometheus/alertmanager" +SRC_URI="${ARCHIVE_URI}" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +DEPEND="dev-util/promu" + +RESTRICT="test" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + default + sed -i -e "s/{{.Revision}}/${ALERTMANAGER_COMMIT}/" src/${EGO_PN}/.promu.yml || die +} + +src_compile() { + pushd src/${EGO_PN} || die + mkdir -p bin || die + GOPATH="${S}" promu build -v --prefix bin || die + popd || die +} + +src_install() { + pushd src/${EGO_PN} || die + dobin bin/* + dodoc {README,CHANGELOG,CONTRIBUTING}.md + insinto /etc/alertmanager/ + newins doc/examples/simple.yml config.yml.example + popd || die + keepdir /var/lib/alertmanager /var/log/alertmanager + fowners ${PN}:${PN} /var/lib/alertmanager /var/log/alertmanager + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} diff --git a/app-metrics/alertmanager/files/alertmanager.confd b/app-metrics/alertmanager/files/alertmanager.confd new file mode 100644 index 000000000000..57c769e41a76 --- /dev/null +++ b/app-metrics/alertmanager/files/alertmanager.confd @@ -0,0 +1,2 @@ +# arguments for prometheus alertmanager +command_args="--config.file=/etc/alertmanager/config.yml --storage.path=/var/lib/alertmanager" diff --git a/app-metrics/alertmanager/files/alertmanager.initd b/app-metrics/alertmanager/files/alertmanager.initd new file mode 100644 index 000000000000..5d625ac57bb8 --- /dev/null +++ b/app-metrics/alertmanager/files/alertmanager.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 2016-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Prometheus alertmanager" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} + +command="/usr/bin/alertmanager" +command_args="${command_args:---config.file=/etc/alertmanager/config.yml --storage.path=/var/lib/alertmanager}" +command_background="true" +start_stop_daemon_args="--user ${user} --group ${group} \ + --stdout /var/log/alertmanager/${RC_SVCNAME}.log \ + --stderr /var/log/alertmanager/${RC_SVCNAME}.log" + +extra_started_commands="reload" + +depend() { + after net +} + +reload() { + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? "Failed to stop ${SVCNAME}" +} + diff --git a/app-metrics/alertmanager/metadata.xml b/app-metrics/alertmanager/metadata.xml new file mode 100644 index 000000000000..714320b4f365 --- /dev/null +++ b/app-metrics/alertmanager/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mrueg@gentoo.org</email> + <name>Manuel RĂ¼ger</name> + </maintainer> + <upstream> + <remote-id type="github">prometheus/alertmanager</remote-id> + </upstream> +</pkgmetadata> |