diff options
author | Manuel Rüger <mrueg@gentoo.org> | 2017-06-05 17:24:05 +0200 |
---|---|---|
committer | Manuel Rüger <mrueg@gentoo.org> | 2017-06-05 17:24:05 +0200 |
commit | 4bc00c61a80e4fb21fa62b702797c9976366b923 (patch) | |
tree | f8842cea9c764f46c27c5fe429af265626ea9b06 /net-analyzer/prometheus-node_exporter | |
parent | app-misc/go-jira: Initial version (diff) | |
download | gentoo-4bc00c61a80e4fb21fa62b702797c9976366b923.tar.gz gentoo-4bc00c61a80e4fb21fa62b702797c9976366b923.tar.bz2 gentoo-4bc00c61a80e4fb21fa62b702797c9976366b923.zip |
net-analyzer/prometheus-node_exporter: Version bump to 0.14.0
* Rename to node_exporter
* Rename user/group to prometheus-node_exporter
* Store textfiles in /var/node_exporter/textfiles
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'net-analyzer/prometheus-node_exporter')
4 files changed, 57 insertions, 8 deletions
diff --git a/net-analyzer/prometheus-node_exporter/Manifest b/net-analyzer/prometheus-node_exporter/Manifest index 20d2caed2d6c..13c74cd4e9c3 100644 --- a/net-analyzer/prometheus-node_exporter/Manifest +++ b/net-analyzer/prometheus-node_exporter/Manifest @@ -1,2 +1,3 @@ +DIST prometheus-node_exporter-0.14.0.tar.gz 1086402 SHA256 312d7e1c07d6a7548f2f116b983da87f7b3a7630f9332eb41c306fd71b2e6ec1 SHA512 28b1c3a17b0065f7005636f0751e535f9455675f7c17546a584fb709f43f2608e4854fe4e7f0e3790b89eff21016b41dccb0a96f16eae466de1040b57c4b1c98 WHIRLPOOL 176eb95a76fefb388817fa27f0b43fca9b1ed235d39e73e97254ef829025d7493f710ce0ef2cf11b00ffa509c08f7b12664cdff38939a5ea62eb79e7991c0bd3 DIST prometheus-node_exporter-0.14.0_rc1.tar.gz 1054858 SHA256 bcc2c544e1bac46d6768d4ddb59ec08fa4dfda2f370145c44dc80adff8a35b17 SHA512 1b54ddb48984408909a7112c411cb4dee9c8fc05fc3fabd1e1d9a4ff5c2e85b2d5dedd9c70027b2b4df7539d8b0e8d1958bb5e05f9a1abd08ad3e09d6c59b321 WHIRLPOOL d5b253ec6d67415eb0c82794f75f4d1d659fecb9d880429ef5c021bbe45ccef1304a6823c545b78175dbb01c37b06120008b9c92f44e9a6defa83bcfe2df4549 DIST prometheus-node_exporter-0.14.0_rc2.tar.gz 1084859 SHA256 e5d8a3245668e8a7453a86c929e04d2200a5730a497618715ef14f4642bdf364 SHA512 17800439eddb85bb8ec1e3fd5c1054610e41c419f5ec159a2f989d3d76ad5077350911773d866353912fc23bb12c0565f6f0a74e24825ab1c628723867a4a6ac WHIRLPOOL e4ce1c854d79bc6500bc04527a4b1dc3f7489ed34e0f2705cb2b9ddb7049aacb4dd0c13929d286ff80ca076662d78f08a77b42f2a3edcbb9b84e75b79613a6e7 diff --git a/net-analyzer/prometheus-node_exporter/files/prometheus-node_exporter.confd b/net-analyzer/prometheus-node_exporter/files/prometheus-node_exporter.confd index 2ada24d5cab7..da59867f7e60 100644 --- a/net-analyzer/prometheus-node_exporter/files/prometheus-node_exporter.confd +++ b/net-analyzer/prometheus-node_exporter/files/prometheus-node_exporter.confd @@ -1,2 +1,2 @@ # arguments for docker-registry -command_args="--collector.textfile.directory=/etc/prometheus-exporter" +command_args="--collector.textfile.directory=/var/node_exporter/" diff --git a/net-analyzer/prometheus-node_exporter/files/prometheus-node_exporter.initd b/net-analyzer/prometheus-node_exporter/files/prometheus-node_exporter.initd index 36dd35f93585..2009f854c6e1 100644 --- a/net-analyzer/prometheus-node_exporter/files/prometheus-node_exporter.initd +++ b/net-analyzer/prometheus-node_exporter/files/prometheus-node_exporter.initd @@ -1,18 +1,18 @@ #!/sbin/openrc-run -# Copyright 2016 Gentoo Foundation +# Copyright 2016-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 description="Prometheus machine metrics exporter" pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"} -user=${user:-prometheus-exporter} -group=${group:-prometheus-exporter} +user=${user:-${SVCNAME}} +group=${group:-${SVCNAME}} -command="/usr/bin/prometheus-node_exporter" -command_args="${command_args:--collector.textfile.directory=/etc/prometheus-exporter}" +command="/usr/bin/node_exporter" +command_args="${command_args:--collector.textfile.directory=/var/node_exporter/}" command_background="true" start_stop_daemon_args="--user ${user} --group ${group} \ - --stdout /var/log/prometheus-exporter/${SVCNAME}.log \ - --stderr /var/log/prometheus-exporter/${SVCNAME}.log" + --stdout /var/log/node_exporter/${SVCNAME}.log \ + --stderr /var/log/node_exporter/${SVCNAME}.log" depend() { need net diff --git a/net-analyzer/prometheus-node_exporter/prometheus-node_exporter-0.14.0.ebuild b/net-analyzer/prometheus-node_exporter/prometheus-node_exporter-0.14.0.ebuild new file mode 100644 index 000000000000..7632511c4c1e --- /dev/null +++ b/net-analyzer/prometheus-node_exporter/prometheus-node_exporter-0.14.0.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2017 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/node_exporter" +EGIT_COMMIT="v${PV/_rc/-rc.}" +NODE_EXPORTER_COMMIT="840ba5d" +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="Prometheus exporter for machine metrics" +HOMEPAGE="https://github.com/prometheus/prometheus" +SRC_URI="${ARCHIVE_URI}" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +DEPEND="dev-util/promu" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + default + sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die +} + +src_compile() { + pushd src/${EGO_PN} || die + mkdir -p bin || die + GOPATH="${S}" promu build -v --prefix node_exporter || die + popd || die +} + +src_install() { + pushd src/${EGO_PN} || die + dobin node_exporter + dodoc {README,CHANGELOG,CONTRIBUTING}.md + popd || die + keepdir /var/node_exporter /var/log/node_exporter + fowners ${PN}:${PN} /var/node_exporter /var/log/node_exporter + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} |