From 53579f6ef52737f51a1c3ea771be3790162ae8a9 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 16 Jan 2019 18:22:18 -0600 Subject: app-metrics/grok_exporter: Unstructured log data exporter for Prometheus Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.56, Repoman-2.3.12 Signed-off-by: William Hubbs --- app-metrics/grok_exporter/Manifest | 9 +++ .../grok_exporter/files/grok_exporter.initd | 18 ++++++ .../grok_exporter/grok_exporter-0.2.6.ebuild | 64 ++++++++++++++++++++++ app-metrics/grok_exporter/metadata.xml | 8 +++ 4 files changed, 99 insertions(+) create mode 100644 app-metrics/grok_exporter/Manifest create mode 100644 app-metrics/grok_exporter/files/grok_exporter.initd create mode 100644 app-metrics/grok_exporter/grok_exporter-0.2.6.ebuild create mode 100644 app-metrics/grok_exporter/metadata.xml (limited to 'app-metrics/grok_exporter') diff --git a/app-metrics/grok_exporter/Manifest b/app-metrics/grok_exporter/Manifest new file mode 100644 index 000000000000..87a8a5165a8c --- /dev/null +++ b/app-metrics/grok_exporter/Manifest @@ -0,0 +1,9 @@ +DIST github.com-beorn7-perks-3a771d992973f24aa725d07868b467d1ddfceafb.tar.gz 10800 BLAKE2B 5487155a4d010af70b6ea2625d10ae03b6642507902d7dc168edb5d7cf0efa1777b248d0df34ed1a2564950b12613256c1c6ce1d8c9723cc34977ed883b21c8d SHA512 c6aa5df262ab607c0a5f64372fc2fec1ddda9e5624e9d9a22cdd1bc11822c99736d88bdf5e3fc6050217b5084548417cb2926c3940e156da9397d828d59ce277 +DIST github.com-go-yaml-yaml-51d6538a90f86fe93ac480b35f37b2be17fef232.tar.gz 70766 BLAKE2B 3ea4412e259626b25145feacbe68b529d2bcf353bd098899c3a906d01f75bac5f93ec20967f7261feb388356d7b12fa945ec73822e21e029e38ce7c0b27855e7 SHA512 dec54681845fb5cdb159d44bf91cb703bb38a6af1821566d7b11a0668ee50247f542e3b7bfc21571198f9bda8ff31ce32cf67f98a8c906dee7ea9194643699f9 +DIST github.com-golang-protobuf-347cf4a86c1cb8d262994d8ef5924d4576c5b331.tar.gz 329489 BLAKE2B 828678cee603917e7f4efee2dd0902730a73932b94b12d4f4b35f0fcecaa329cdc39c3fa9926ce3706f86cc52c0aa4984f68ee0943ecc6d9571b0175ff671ab0 SHA512 de4307b91923a6890ab2f8eaf2ed4f7f32a45a4a0cc7b0d6f53ce31c5fe3ed08f378072075456d2c99c89a3b5acbca315814b8e5ec70e6ceb0ca62f7013f618c +DIST github.com-matttproud-golang_protobuf_extensions-c182affec369e30f25d3eb8cd8a478dee585ae7d.tar.gz 37541 BLAKE2B f78899afa1390aca6cb1b412271713c60107771d512ead83482e0bb1716d175b791b4b04bd24b7f469cc1a29176eadcf0545ac3bf166c5b350602420d3c05aec SHA512 141b1b781a4d1c59f5eb1af93c966343b80ed405a5f63774e6cda9f12c34536e892c7a84699d6cf2e9c775457a4c2ad5d5d0b4d302fc25a923ab81d46ad65580 +DIST github.com-prometheus-client_golang-18d13eacc9cce330610a70daf4ed0fef2e846589.tar.gz 133489 BLAKE2B 75ba882c9378d9062ed510af425f39e81e1d980dbd183f4e1228110880b3143cac74fecaa5d224e8516afcab71886041d1fbcff0832c8ab604976bbf34977eb3 SHA512 80142c7e659c3213a0990f1f871b3578b2899b14c5082a04d8eb67048da768203bb7228b2fa33d2f49d0f57596f6ad12fed47b54790a3c16d8a4cd43eb35005d +DIST github.com-prometheus-client_model-56726106282f1985ea77d5305743db7231b0c0a8.tar.gz 57192 BLAKE2B 83bbc3c756f993a8bbf3b3f4bd5437b466b8fddc1f434554f1138eb6a830dd76ac495ceaa8b8a324498b05513c4ae67d571f263cce2de5275d87cadc2bf9691a SHA512 531b3e185f96ef23c8d5791f3caa7ccbb78870811343a4630d79dcf3e217a1f9a176390752cbb427ba3550bebb984e31ade8529a2b56ea93af2ab6b7a2e98320 +DIST github.com-prometheus-common-2998b132700a7d019ff618c06a234b47c1f3f681.tar.gz 87368 BLAKE2B fc6c6e197d4cc61afefa9fb8e3a8d6b36ab029f62e3cf9adf8359e4885554f94427f17218d45c90c9d7f4a6985b2e4143a4d304d39f806bd70d2c6f05de29bc2 SHA512 b2095da96596fc500ece6b331cda2558f8c813720853f2489aee3dec65de95eb13f7b0853e3812433fdc040f16990d2f05b2a6b8b41275210c504ff333ca625d +DIST github.com-prometheus-procfs-b1a0a9a36d7453ba0f62578b99712f3a6c5f82d1.tar.gz 61720 BLAKE2B 2f9b25506527aaf6e1bf560a1b680b958d1281acbaa2bb896bfea50b5b7de8992d10e8e812f8ae449ab67145c88179c15afe1f719851d1717b28963071088082 SHA512 5938b4a8fa9a5ee32be995fed0d0e6b26941765470aca4eda63a7c42db457e83da43fde2f33b2d4ded3545e5643f607ec7060406b0a1b15e64cc732bb2badd4a +DIST grok_exporter-0.2.6.tar.gz 478354 BLAKE2B 082331eb7606517fb103af7a74088bae75740ae77d2b1fdeaee87791c4a0be706883ca505cb723f3853d3786692477086183b303de0ad82833499b231fc55909 SHA512 5204974702a8d29cc80fb7857a46f3242c78019d8a37e18e595d4bfc2f64662dbd48f9e0d5cae7b2f4f2390c35b0d621a7212718bf3c88d675601af2977de874 diff --git a/app-metrics/grok_exporter/files/grok_exporter.initd b/app-metrics/grok_exporter/files/grok_exporter.initd new file mode 100644 index 000000000000..d38d0af63ab3 --- /dev/null +++ b/app-metrics/grok_exporter/files/grok_exporter.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Unstructured log data exporter for Prometheus" +config_file="${config_file:-/etc/${RC_SVCNAME}/${RC_SVCNAME}.yml}" +command=/usr/bin/grok_exporter +command_background=yes +command_user=${RC_SVCNAME}:${RC_SVCNAME} +pidfile=/var/run/${RC_SVCNAME}.pid +error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" +output_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" +required_files="${config_file}" +command_args="-config \"${config_file}\"" + +depend() { + after net +} diff --git a/app-metrics/grok_exporter/grok_exporter-0.2.6.ebuild b/app-metrics/grok_exporter/grok_exporter-0.2.6.ebuild new file mode 100644 index 000000000000..328fd97b74fd --- /dev/null +++ b/app-metrics/grok_exporter/grok_exporter-0.2.6.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_PN=github.com/fstab/grok_exporter +EGO_REVISION=81c0afe +EGO_VENDOR=( + "github.com/prometheus/client_model 56726106282f1985ea77d5305743db7231b0c0a8" + "github.com/prometheus/common 2998b132700a7d019ff618c06a234b47c1f3f681" + "github.com/prometheus/client_golang 18d13eacc9cce330610a70daf4ed0fef2e846589" + "github.com/prometheus/procfs b1a0a9a36d7453ba0f62578b99712f3a6c5f82d1" + "github.com/matttproud/golang_protobuf_extensions c182affec369e30f25d3eb8cd8a478dee585ae7d" + "github.com/golang/protobuf 347cf4a86c1cb8d262994d8ef5924d4576c5b331" + "github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb" + "gopkg.in/yaml.v2 51d6538a90f86fe93ac480b35f37b2be17fef232 github.com/go-yaml/yaml" # branch v2.2.2 +) + +inherit user golang-build golang-vcs-snapshot + +DESCRIPTION="Unstructured log data exporter for Prometheus" +HOMEPAGE="https://github.com/fstab/Grok_exporter" +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + ${EGO_VENDOR_URI}" +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=">=dev-libs/oniguruma-6.9.0" +RDEPEND=">=dev-libs/oniguruma-6.9.0:=" + +RESTRICT="strip" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_compile() { + cd src/${EGO_PN} || die + GOPATH="${S}" go build -ldflags=" + -X ${EGO_PN}/exporter.Version=${PV} + -X ${EGO_PN}/exporter.BuildDate=$(date +%Y-%m-%d) + -X ${EGO_PN}/exporter.Branch=master + -X ${EGO_PN}/exporter.Revision=${EGO_REVISION}" || die "compile failed" +} + +src_install() { + cd src/${EGO_PN} || die + dobin ${PN} + dodoc -r *.md example + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} +keepdir /etc/"${PN}" +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "You need to create /etc/${PN}/${PN}.yml" + elog "Please see /usr/share/doc/${PVR} for examples" + fi +} diff --git a/app-metrics/grok_exporter/metadata.xml b/app-metrics/grok_exporter/metadata.xml new file mode 100644 index 000000000000..c36c37139fad --- /dev/null +++ b/app-metrics/grok_exporter/metadata.xml @@ -0,0 +1,8 @@ + + + + + williamh@gentoo.org + William Hubbs + + -- cgit v1.2.3-65-gdbad