diff options
author | William Hubbs <william.hubbs@sony.com> | 2019-01-08 17:48:41 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2019-01-08 17:50:56 -0600 |
commit | 6fad516a76fc9ee1d6e1c75fb26667a0e53d7c5c (patch) | |
tree | e9de71722ab522cd85a971aeb65d8632495ad76b /app-metrics/memcached_exporter | |
parent | media-libs/alsa-oss: Bump to version 1.1.8 (diff) | |
download | gentoo-6fad516a76fc9ee1d6e1c75fb26667a0e53d7c5c.tar.gz gentoo-6fad516a76fc9ee1d6e1c75fb26667a0e53d7c5c.tar.bz2 gentoo-6fad516a76fc9ee1d6e1c75fb26667a0e53d7c5c.zip |
app-metrics/memcached_exporter: memcached exporter for prometheus
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'app-metrics/memcached_exporter')
5 files changed, 69 insertions, 0 deletions
diff --git a/app-metrics/memcached_exporter/Manifest b/app-metrics/memcached_exporter/Manifest new file mode 100644 index 000000000000..cd83175830c9 --- /dev/null +++ b/app-metrics/memcached_exporter/Manifest @@ -0,0 +1 @@ +DIST memcached_exporter-0.5.0.tar.gz 1350752 BLAKE2B e9a326ca155e0e0a89dd556f0a97ba9bbe73e3e02a905497c55a5390be2cbf211dde9dda37355dd043b711258c78cf911c79ae898b6e0934f2d4b2ddef7ae946 SHA512 62ec7f9cefc88425ea3b53a634b2d5ff1534624b6e149c962372e81a7271fc1bf3c01c7d8641dc49250b8d124bec740b3c2768e62d51cfdc025a29f71a49b428 diff --git a/app-metrics/memcached_exporter/files/memcached_exporter.confd b/app-metrics/memcached_exporter/files/memcached_exporter.confd new file mode 100644 index 000000000000..ec7b89ec9cfe --- /dev/null +++ b/app-metrics/memcached_exporter/files/memcached_exporter.confd @@ -0,0 +1,2 @@ +# arguments for prometheus memcached exporter +command_args="" diff --git a/app-metrics/memcached_exporter/files/memcached_exporter.initd b/app-metrics/memcached_exporter/files/memcached_exporter.initd new file mode 100644 index 000000000000..fa21bea18d19 --- /dev/null +++ b/app-metrics/memcached_exporter/files/memcached_exporter.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 2016-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Prometheus memcached exporter" +pidfile="/var/run/${RC_SVCNAME}.pid" +command="/usr/bin/memcached_exporter" +command_user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} +command_background="true" +errror_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" +output_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" +start_stop_daemon_args="--group ${group}" diff --git a/app-metrics/memcached_exporter/memcached_exporter-0.5.0.ebuild b/app-metrics/memcached_exporter/memcached_exporter-0.5.0.ebuild new file mode 100644 index 000000000000..b7ee78d65607 --- /dev/null +++ b/app-metrics/memcached_exporter/memcached_exporter-0.5.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit golang-build user + +EGO_PN=github.com/prometheus/memcached_exporter +DESCRIPTION="Prometheus exporter for memcached" +HOMEPAGE="https://github.com/prometheus/memcached_exporter" +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="dev-util/promu" + +RESTRICT="strip" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + mkdir -p "${HOME}/go/src/${EGO_PN%/*}" || die "mkdir failed" + ln -snf "${S}" "${HOME}/go/src/${EGO_PN}" || die "ln failed" + default +} + +src_compile() { + # needed since we use the default GOPATH + unset GOPATH + mkdir -p bin || die + promu build -v --prefix bin || die +} + +src_install() { + newbin bin/${P} ${PN} + dodoc *.md + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} diff --git a/app-metrics/memcached_exporter/metadata.xml b/app-metrics/memcached_exporter/metadata.xml new file mode 100644 index 000000000000..c36c37139fad --- /dev/null +++ b/app-metrics/memcached_exporter/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>williamh@gentoo.org</email> + <name>William Hubbs</name> + </maintainer> +</pkgmetadata> |