summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2018-04-12 22:43:10 +0200
committerManuel Rüger <mrueg@gentoo.org>2018-04-12 22:43:10 +0200
commitd8a2eaa5389cd42ed28700664cc83871e77dd470 (patch)
tree6a395747b0608661c89003a1e0742a43d55a9802 /app-metrics/openvpn_exporter
parentsys-auth/docker_auth: Remove old (diff)
downloadgentoo-d8a2eaa5389cd42ed28700664cc83871e77dd470.tar.gz
gentoo-d8a2eaa5389cd42ed28700664cc83871e77dd470.tar.bz2
gentoo-d8a2eaa5389cd42ed28700664cc83871e77dd470.zip
app-metrics/openvpn_exporter: Initial version
Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'app-metrics/openvpn_exporter')
-rw-r--r--app-metrics/openvpn_exporter/Manifest8
-rw-r--r--app-metrics/openvpn_exporter/files/openvpn_exporter.confd2
-rw-r--r--app-metrics/openvpn_exporter/files/openvpn_exporter.initd19
-rw-r--r--app-metrics/openvpn_exporter/files/openvpn_exporter.logrotated7
-rw-r--r--app-metrics/openvpn_exporter/metadata.xml11
-rw-r--r--app-metrics/openvpn_exporter/openvpn_exporter-0.2.1.ebuild54
6 files changed, 101 insertions, 0 deletions
diff --git a/app-metrics/openvpn_exporter/Manifest b/app-metrics/openvpn_exporter/Manifest
new file mode 100644
index 000000000000..c243e611a742
--- /dev/null
+++ b/app-metrics/openvpn_exporter/Manifest
@@ -0,0 +1,8 @@
+DIST github.com-beorn7-perks-3a771d992973f24aa725d07868b467d1ddfceafb.tar.gz 10800 BLAKE2B 5487155a4d010af70b6ea2625d10ae03b6642507902d7dc168edb5d7cf0efa1777b248d0df34ed1a2564950b12613256c1c6ce1d8c9723cc34977ed883b21c8d SHA512 c6aa5df262ab607c0a5f64372fc2fec1ddda9e5624e9d9a22cdd1bc11822c99736d88bdf5e3fc6050217b5084548417cb2926c3940e156da9397d828d59ce277
+DIST github.com-golang-protobuf-e09c5db296004fbe3f74490e84dcd62c3c5ddb1b.tar.gz 269725 BLAKE2B a62a3f96c49d77776103a9bece69b615e00d4140c9de8b42fb7edac979c8a8d172bd21062d3d6e24ae01dba10b320ff208ff8c6916da2d84118da448afc8caf7 SHA512 f64fa42e7ed9701860e16b1cdedc9f6b029630b6f534ee403ede1223c0c7542c731735995ea9763f093b56146776902b6633e5b1691b1f1dd4ab84dea0092099
+DIST github.com-matttproud-golang_protobuf_extensions-c12348ce28de40eed0136aa2b644d0ee0650e56c.tar.gz 37215 BLAKE2B b3b007f925a4a1c1862c8cbe34c5cd225dfa610ad8c56b5328e6920a44b507680daeea97209370bd6b259654d0ca5791f4bcc54b8bd8970b9aaf994eada16d4f SHA512 2f78290d1448cfc041d10210092d6da6f3df2b9b6c16ff730750e976e450dafe2645ba945319a0a3064c88f9c18652c69c0e0cf69d8931c08d23ffe65a8cc07d
+DIST github.com-prometheus-client_golang-f504d69affe11ec1ccb2e5948127f86878c9fd57.tar.gz 106949 BLAKE2B b5ee911f6d478ae21a71c2827f541ecd174dee7dbf23fff58a517e739f0e16bf91451a6aabf3f3f786b62256e2c4ee8481cc3169d01819425d56a0eb802a36c9 SHA512 234ad2fa57751901ab2a0e5843bce17689166d8fc285d63f9de0da412cfe7176e8a9f96c0bf5342184985fbb564def31087255bf11766331636c3624fe85eb62
+DIST github.com-prometheus-client_model-99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c.tar.gz 54718 BLAKE2B 1dec6ac40fc5103117c2cf0538e138fc57c7b9795516c530b3c0dc2f5983f88c2d0eb1b094859815397fb14d50648240556fb6b11a8935586eca29eb66b4e958 SHA512 99bc72ca0887df4c7ab5a006af9c59afdc1281fe6d6d17f2897428a06da80d63d6ccd476deacb933cb208357500f14a7b96e99b9c5a7582e65a7aae87aaf2c50
+DIST github.com-prometheus-common-38c53a9f4bfcd932d1b00bfc65e256a7fba6b37a.tar.gz 63007 BLAKE2B a62f727ef9dd42d52f495ab7449cbafbe7c7fcdb1bc171df97c40348dcb7fe12788223d7a2aea3398cae7dd17ec73ae6349b5e5f35f4785f2796cc9a16c2d420 SHA512 4f1ab6cffc309a00ed68959b9372e1d3ea4f8d597b8c462a4e365cf22737245e601b8bda0764bbd1f0172d773805d16e90a8aa90cb95e9462e35320043e04060
+DIST github.com-prometheus-procfs-780932d4fbbe0e69b84c34c20f5c8d0981e109ea.tar.gz 56873 BLAKE2B 31ae12d51b6a28c285bd5854b137d2634499d0db3c2c65c0404ca5a902ffec2e9bf689261ea51c2fe1643733f09a780c437f7a7899a5e6c3e3d100a36e07b897 SHA512 a548c6bc71456c9878cb34ad1514d92c8737e01b555e953f848cc1ae7944424b06a14a8ab0c6de4d99dbb189a0f29e2bb9ae09b5adffc327c28f5c50c2819892
+DIST openvpn_exporter-0.2.1.tar.gz 10126 BLAKE2B 06899bdc151232b6588e865ccdb69c4cc0b4f618de8b8d03240d72c7fe2acade2c65b60597f744936c19c603da0e0f924b8910a5898349a42884f91deb882e59 SHA512 9cbf859be78337e15c1e3ba0c2dc687afc18b4879af68b7b9fe823aebb415c8b430aedb7e31ffdd1685c582632db1427504a1fb874aac49c8ef11df4345ecca1
diff --git a/app-metrics/openvpn_exporter/files/openvpn_exporter.confd b/app-metrics/openvpn_exporter/files/openvpn_exporter.confd
new file mode 100644
index 000000000000..5aef9b6d5a79
--- /dev/null
+++ b/app-metrics/openvpn_exporter/files/openvpn_exporter.confd
@@ -0,0 +1,2 @@
+# arguments for prometheus openvpn exporter
+command_args="-openvpn.status_paths /etc/openvpn/openvpn-status.log"
diff --git a/app-metrics/openvpn_exporter/files/openvpn_exporter.initd b/app-metrics/openvpn_exporter/files/openvpn_exporter.initd
new file mode 100644
index 000000000000..50fa4dab4fb2
--- /dev/null
+++ b/app-metrics/openvpn_exporter/files/openvpn_exporter.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 2016-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus Exporter for OpenVPN status Metrics"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+
+command="/usr/bin/openvpn_exporter"
+command_args="${command_args:--openvpn.status_paths /etc/openvpn/openvpn-status.log}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+
+depend() {
+ after net
+}
diff --git a/app-metrics/openvpn_exporter/files/openvpn_exporter.logrotated b/app-metrics/openvpn_exporter/files/openvpn_exporter.logrotated
new file mode 100644
index 000000000000..37ffbe501421
--- /dev/null
+++ b/app-metrics/openvpn_exporter/files/openvpn_exporter.logrotated
@@ -0,0 +1,7 @@
+/var/log/openvpn_exporter/openvpn_exporter.log {
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/app-metrics/openvpn_exporter/metadata.xml b/app-metrics/openvpn_exporter/metadata.xml
new file mode 100644
index 000000000000..b3817548e304
--- /dev/null
+++ b/app-metrics/openvpn_exporter/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">kumina/openvpn_exporter</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-metrics/openvpn_exporter/openvpn_exporter-0.2.1.ebuild b/app-metrics/openvpn_exporter/openvpn_exporter-0.2.1.ebuild
new file mode 100644
index 000000000000..7f7dc1158ef8
--- /dev/null
+++ b/app-metrics/openvpn_exporter/openvpn_exporter-0.2.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_VENDOR=(
+ "github.com/prometheus/client_golang f504d69affe11ec1ccb2e5948127f86878c9fd57"
+ "github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb"
+ "github.com/golang/protobuf e09c5db296004fbe3f74490e84dcd62c3c5ddb1b"
+ "github.com/prometheus/client_model 99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"
+ "github.com/prometheus/common 38c53a9f4bfcd932d1b00bfc65e256a7fba6b37a"
+ "github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c"
+ "github.com/prometheus/procfs 780932d4fbbe0e69b84c34c20f5c8d0981e109ea"
+ )
+
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="github.com/kumina/openvpn_exporter"
+ARCHIVE_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Prometheus Exporter for OpenVPN"
+HOMEPAGE="https://github.com/kumina/openvpn_exporter"
+SRC_URI="${ARCHIVE_URI}
+ ${EGO_VENDOR_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+rc_compile() {
+ pushd src/${EGO_PN} || die
+ GOPATH="${S}" \
+ go build -v -o ${PN} || die
+ popd || die
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc src/${EGO_PN}/{CHANGELOG,README}.md
+ local dir
+ for dir in /var/{lib,log}/${PN}; do
+ keepdir "${dir}"
+ fowners ${PN}:${PN} "${dir}"
+ done
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+}