From 9e80ba44814a08825c84d19bf3c79f84cdf0a635 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 23 Oct 2019 12:33:43 -0500 Subject: app-metrics/dnsmasq_exporter: prometheus exporter for dnsmasq Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: William Hubbs --- app-metrics/dnsmasq_exporter/Manifest | 18 ++++++++ .../dnsmasq_exporter/dnsmasq_exporter-0.2.0.ebuild | 51 ++++++++++++++++++++++ .../dnsmasq_exporter/files/dnsmasq_exporter.confd | 3 ++ .../dnsmasq_exporter/files/dnsmasq_exporter.initd | 15 +++++++ app-metrics/dnsmasq_exporter/metadata.xml | 8 ++++ 5 files changed, 95 insertions(+) create mode 100644 app-metrics/dnsmasq_exporter/Manifest create mode 100644 app-metrics/dnsmasq_exporter/dnsmasq_exporter-0.2.0.ebuild create mode 100644 app-metrics/dnsmasq_exporter/files/dnsmasq_exporter.confd create mode 100644 app-metrics/dnsmasq_exporter/files/dnsmasq_exporter.initd create mode 100644 app-metrics/dnsmasq_exporter/metadata.xml (limited to 'app-metrics') diff --git a/app-metrics/dnsmasq_exporter/Manifest b/app-metrics/dnsmasq_exporter/Manifest new file mode 100644 index 000000000000..69bc6ed4b326 --- /dev/null +++ b/app-metrics/dnsmasq_exporter/Manifest @@ -0,0 +1,18 @@ +DIST dnsmasq_exporter-0.2.0.tar.gz 12912 BLAKE2B e4166ff1648b4f6780da767ec2b1ea144d132190d6fc53f77c0ebcc73a8515bbdc198d7f34e1ae806b8c76ae41ed90d60c69cb82294a67397022b522fc22f9d8 SHA512 5f1eb899da3b20c384c19cff0bfe0a8b09a0078b683cabacdaa78ab07153ecf35ddf94bf04cae64891eca83b18c6e027d9096afa9cf2dd2e4d3a2040e3daed0c +DIST github.com-alecthomas-kingpin-v2.2.6.tar.gz 44383 BLAKE2B 91841e6353af639c9d1ad4ecb0fec797ba1d497c223c0d457e1999dc7560a84e1d75f209f5a18386874a499939c5c7d6a450ed61ebf265b6706077131fda486c SHA512 09c6bb5782639efc7068ed7606fe22c463b2397dc95a89c27ba567a58da10660bfea60d7836b63dcedf7db702f79fe7247575c33a503990f5ba6ca92e29b06b3 +DIST github.com-alecthomas-template-a0175ee3bccc.tar.gz 55291 BLAKE2B fbd48545b6a5809d210629ca3aeb03c366051601d5b2f7718f79a96ec18fa09f18922c1a3ffcbac3abcd9b8955871b5bb4c71c23a1839cf7f17d8372bc3478fe SHA512 5ca546170725c3bdd4d9b27ca3976d6dc6376be8db685e6e26cfaef4a51560f78702b7babbe5ed0b2d934d0c32867bc69b11ae757071dc143a4453e6e7ffabdf +DIST github.com-alecthomas-units-2efee857e7cf.tar.gz 3442 BLAKE2B bb3a4acac34764b249cbec5f21fd260ab6dea6810183d12e13943657037903b874a209686b6913e8529a578cec4fb364adad475577c28456bf92add7f5ac9498 SHA512 855f15eeb83bdc16981694f522aa1e200a3857ed11ae87fca9b0cc70734eac76f5082bc3ed92f843b818da14b58dc921dbb1aed4ea35de056c087a64b7e25fe4 +DIST github.com-beorn7-perks-v1.0.0.tar.gz 10866 BLAKE2B bebb0b77adef45fd5c89302ba637e3b5e8e918276ff798dbeb11fbf9d490f3efa760cf4685b21c8a736469fbe7ebce3f20bbcc66092766e418a654d149caa401 SHA512 23a6660dd9e806efc841fe3acf702dc3471808770c86cbfa3353adfa9d9534eb6d20591bb60be2c798ebf8823907b2d5188339869f4b0f61bb2e9ecf74b4ea77 +DIST github.com-golang-crypto-0709b304e793.tar.gz 1637789 BLAKE2B 282b99cde27b7ba60063373e43e0ac173991656bc397276becaff8d1931310218530470633e620c3f380e508ea288ee1c3909147fdb20e62df553ec84eb957b2 SHA512 82a5eb757560d66659fdfab8d4476d28bd3d70666d6e302b99398ac2b5e501141bd78491b9f4770f2f94f46c7397f7001d6e0ad0aaec14aeabbfa5deb9211610 +DIST github.com-golang-net-adae6a3d119a.tar.gz 967436 BLAKE2B 408acec685eb1c3125434555733c6db80ce4d95897b78b73554db4e0a8f1af82e6cd3e43a42486352eed183cda049c1d25aea441cced841256d650f908276124 SHA512 8b997e24a583a5598a555c864d9350683be275b403ccf7acae7de451fe0934f55d2dfdde0785fb2e138162cb5b4f9f63170d2bb9ef87a3c45f6d5edd2b04d5c8 +DIST github.com-golang-protobuf-v1.3.1.tar.gz 310884 BLAKE2B 704efef653d39b4954798537e7451d15dd1d913c67d1332ffc016b396b028a0dd03487765a89b0bc5f920b75cf4f51be79a8da9d3291e0f02873c47601360080 SHA512 7dfc6d7851c7181e1a73effe9e8a97752bb428bf207a44b065412a8e87e0e3e200b5eef3d8c68af33a0721d12a8b98bfa88b22add074b19b6e1759e9268abf25 +DIST github.com-golang-sync-112230192c58.tar.gz 16835 BLAKE2B 51efe53ea7ab1f11f8ff078fbfa91526b97a1d918101bdbc755aa500424dda860d3a11195c1e44d033eaf7e0d09e7f327e404ad9af84f4b9747d8805b53dcf10 SHA512 bd90bb14e688fa7613d83dc8718bbb688a2f05cc8eb8c3dfbbf71daa7dc08e35044803c4bf8e5d5aab625a612e986e6f76c822c437f52132581ac37e0e2e92f9 +DIST github.com-golang-sys-5ac8a444bdc5.tar.gz 1112270 BLAKE2B af06a2e7c9d88879fea35573d5fc85f99f890505775298c4d32fb66da152a66f37f51868d93ad4d4e5964bb86acc8559616d8c38b9583b540ce938b3f91df9a2 SHA512 02a02cebe1aaf77a8d885c9f775866c7524a9af615243a839ed99d1e3a96faa700d1d32fa55efa4da97582b319dd61e77588aadadd89cf58d7881b9db2dfd9c5 +DIST github.com-konsorten-go-windows-terminal-sequences-v1.0.1.tar.gz 1909 BLAKE2B edc8dc8f9a9c27d724b98614c2d937f5fed94977c1590f542cb1c8724478a63bba61cd6569fc7daed1e870bc59fc5ca0f5acd501f58e7c93e5c69517c9ca80ac SHA512 8c781a4c17df20623b8ab5af9757fedf6fae9362c10f195eaaeb821a0520ab9407de30607fb085a38a04915eb180bb8d5c4940f91db4fca7ce1cf69a8276bbe7 +DIST github.com-matttproud-golang_protobuf_extensions-v1.0.1.tar.gz 37184 BLAKE2B 9ad023f9b70938f45e6dd44624a7008c1895e488e63124bcd8f8492292ef98479e966ed627a62de32e0fe84a57e60710227e02e4a276aabece81f021af9408a5 SHA512 63d9963502e967e47253f638a19dfbeaa2b63efab74ed790539ceaa9b4a0b695aa107f9e0c920c0da547ac1abe81af22d47f6de547c500deeb005fd8a5e22660 +DIST github.com-miekg-dns-v1.1.14.tar.gz 1692529 BLAKE2B fbef157464c74b6906f3940ec61e1a96bc65bca62193f066d6a52714618fede3585d066076c4c94c197e8e6b36398e82835fc100a7977e9ea57c258348669791 SHA512 322def7c1905aa078113c5709599ac9e91833aa84a46495d4e422e9c4dc4958868cc3bc66aac69c3bb411ab006b7d7edb566f0ad2ec63231f902af1e58189574 +DIST github.com-prometheus-client_golang-v0.9.4.tar.gz 142795 BLAKE2B dcf60337b5afe26825c58b88db415cefeeda1127d529eca1708a8b79594cb7cf677c32bd644408a1864258a47b28268d7b650416db2ca67c6298831ceb1e91a2 SHA512 45c07c0673c2db1c5a7a6bb47d26d0a33c71efac52ed38d6540bb81cfdc37f4160d112614a7d771ff70dbdf59b6837854c4c44674d63fd2df62e8d26606f1d4e +DIST github.com-prometheus-client_model-fd36f4220a90.tar.gz 57542 BLAKE2B 16f73bf9a1dfde0dd3152e11ab4d3a49271209b02541951471664a1226c9211f1b77ef4a32faf3e184888b080d0c76e3d02d03e21d688399d7e3c14629df738f SHA512 bee4b4ffdb56633ac763dd624d03db5b0dae433e2a2d1e4ff925e34444d62cbdb879d68574c7f8133f11d718cce3bdc1d686508acfb470e7dea0109c98266b1d +DIST github.com-prometheus-common-v0.4.1.tar.gz 98631 BLAKE2B 1f2d4780c6e0bac957320ebdfb83c6ab9de28abe8b5ea6f75d76d8af76ecef37231da82a070da28c5e05886241c7db0f9538cf85e0b26d20aad610639310e9a4 SHA512 36860b02c9ed11fa02aea619e2e7bcb58f2ade54dae2210194d6b83200ea76e743b07e62d8ac8c20f31806bb0ec680c579da359d41d4400ce50ed6c902e9b534 +DIST github.com-prometheus-procfs-v0.0.2.tar.gz 78550 BLAKE2B cded530ef80939cda11dde97d02289ffc1033cd90e7c7eb758468ccbad9f9bde7a259324c067c84b9d16c45be0c2971bc2652b507118045acb23b2a7b36a8f9b SHA512 93635aa795027e71cb79bbd35cf5141617634b09e2d56cad578abfb69edeb54fbda4971b9c81fccd51eb7837fc23f6773fd723b250dd6b16a25acb41aa37bcf4 +DIST github.com-sirupsen-logrus-v1.2.0.tar.gz 37794 BLAKE2B 64961dca081f64cd8154a4a583b2a1cc72aeff581d9c6f0fc8786a654f5da4c17f53512f3b26f346a7d491b84f7c8aa25d02bfa08996fdd2a63118efc9ce29ad SHA512 7f582175fb13e926c172cf780409a2ef7b11ee72c4a139df6b59553068cc146a81db53243b141d998a86ec0ec0fe467d4354c7335b76192a494384865bc6ad9d diff --git a/app-metrics/dnsmasq_exporter/dnsmasq_exporter-0.2.0.ebuild b/app-metrics/dnsmasq_exporter/dnsmasq_exporter-0.2.0.ebuild new file mode 100644 index 000000000000..f7d8c48ba78d --- /dev/null +++ b/app-metrics/dnsmasq_exporter/dnsmasq_exporter-0.2.0.ebuild @@ -0,0 +1,51 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit go-module + +DESCRIPTION="prometheus exporter for dnsmasq" +HOMEPAGE="https://github.com/google/prometheus_exporter" + +EGO_VENDOR=( + "github.com/alecthomas/template a0175ee3bccc" + "github.com/alecthomas/units 2efee857e7cf" + "github.com/beorn7/perks v1.0.0" + "github.com/golang/protobuf v1.3.1" + "github.com/konsorten/go-windows-terminal-sequences v1.0.1" + "github.com/matttproud/golang_protobuf_extensions v1.0.1" + "github.com/miekg/dns v1.1.14" + "github.com/prometheus/client_golang v0.9.4" + "github.com/prometheus/client_model fd36f4220a90" + "github.com/prometheus/common v0.4.1" + "github.com/prometheus/procfs v0.0.2" + "github.com/sirupsen/logrus v1.2.0" + "golang.org/x/crypto 0709b304e793 github.com/golang/crypto" + "golang.org/x/net adae6a3d119a github.com/golang/net" + "golang.org/x/sync 112230192c58 github.com/golang/sync" + "golang.org/x/sys 5ac8a444bdc5 github.com/golang/sys" + "gopkg.in/alecthomas/kingpin.v2 v2.2.6 github.com/alecthomas/kingpin" +) +SRC_URI="https://github.com/google/dnsmasq_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz + $(go-module_vendor_uris)" + +LICENSE="BSD MIT Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + acct-group/dnsmasq_exporter + acct-user/dnsmasq_exporter" + RDEPEND="${DEPEND}" + +src_compile() { + go build || die +} + +src_install() { + dobin dnsmasq_exporter + keepdir /var/log/ddnsmasq_exporter + fowners ${PN}:${PN} /var/log/ddnsmasq_exporter + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} diff --git a/app-metrics/dnsmasq_exporter/files/dnsmasq_exporter.confd b/app-metrics/dnsmasq_exporter/files/dnsmasq_exporter.confd new file mode 100644 index 000000000000..f655cc32abfe --- /dev/null +++ b/app-metrics/dnsmasq_exporter/files/dnsmasq_exporter.confd @@ -0,0 +1,3 @@ +# Please set the flags you wish to pass to dnsmasq_exporter in +# command_args +# command_args="" diff --git a/app-metrics/dnsmasq_exporter/files/dnsmasq_exporter.initd b/app-metrics/dnsmasq_exporter/files/dnsmasq_exporter.initd new file mode 100644 index 000000000000..7c600efdbbaf --- /dev/null +++ b/app-metrics/dnsmasq_exporter/files/dnsmasq_exporter.initd @@ -0,0 +1,15 @@ +#!/sbin/openrc-run +# Copyright 2016-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="dnsmasq Exporter for Prometheus" +command="/usr/bin/dnsmasq_exporter" +command_background=true +command_user="${RC_SVCNAME}:${RC_SVCNAME}" +error_log=/var/log/dnsmasq_exporter/${RC_SVCNAME}.log +output_log=/var/log/dnsmasq_exporter/${RC_SVCNAME}.log +pidfile=/var/run/${RC_SVCNAME}.pid + +depend() { + after dnsmasq net +} diff --git a/app-metrics/dnsmasq_exporter/metadata.xml b/app-metrics/dnsmasq_exporter/metadata.xml new file mode 100644 index 000000000000..c36c37139fad --- /dev/null +++ b/app-metrics/dnsmasq_exporter/metadata.xml @@ -0,0 +1,8 @@ + + + + + williamh@gentoo.org + William Hubbs + + -- cgit v1.2.3-65-gdbad