summaryrefslogtreecommitdiff
path: root/app-metrics/prometheus-bin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-02-05 18:44:56 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-02-05 18:44:56 +0000
commit29aabba0ea759c6a2864ff5631735b67ee38e5e0 (patch)
treeab466b4dfa7abecb401b2f8039d08af4689306bb /app-metrics/prometheus-bin
parentd42200bec37eef2a7478d88988ff00addd0a9202 (diff)
gentoo resync : 05.02.2020
Diffstat (limited to 'app-metrics/prometheus-bin')
-rw-r--r--app-metrics/prometheus-bin/Manifest5
-rw-r--r--app-metrics/prometheus-bin/files/prometheus.confd2
-rw-r--r--app-metrics/prometheus-bin/files/prometheus.initd34
-rw-r--r--app-metrics/prometheus-bin/metadata.xml8
-rw-r--r--app-metrics/prometheus-bin/prometheus-bin-2.15.2.ebuild48
5 files changed, 97 insertions, 0 deletions
diff --git a/app-metrics/prometheus-bin/Manifest b/app-metrics/prometheus-bin/Manifest
new file mode 100644
index 000000000000..c77ba667c584
--- /dev/null
+++ b/app-metrics/prometheus-bin/Manifest
@@ -0,0 +1,5 @@
+AUX prometheus.confd 43 BLAKE2B c83afa8ad1133c9e93abd40c862ff5b3ac9a3b3c4447b915ae1482d92096dec9f200d089de2458a6cdb0e72d2bf0652d56e3afd6d5a3cd8a3ed7a6c9a0e3e42c SHA512 37468e897cd34b50b0edc65ada3f0c2e05459c3d96bb7f82d58b6de5bf10a127f1bf7912af93d83d94e3ea7287cfeb2311e36535f291d01a11d152a0b438591c
+AUX prometheus.initd 929 BLAKE2B d48650b11b77d4d04b5458682456fb20f8085dc3efe9d0ddd2a6c75751ddae156bbb83c20082bc7b6833395602c24da61e2f7610bdff291e05e3eeb4fb651317 SHA512 504122eb8ed19beac81987b77eb78bba9b36b2ef15f28b1a542804271046e06363baf464f3c303982f647eba65fbc2b5459235f56625e1ff3fed9834937cd0d2
+DIST prometheus-2.15.2.linux-amd64.tar.gz 59204993 BLAKE2B 700d61063cddea02ca4445257b11b782c3b6fc84ed3d48f8d196c5602819f0d44b218d15b870281293bf0661929b02930b937e66fec34918b81cd3d010a6fa21 SHA512 a3b95fe6101d5587329d84adb18c0c261babe5a909e62ab1a39f42df28c058d311b0b2ea9ecbdad9227789ed83c0fae4a12776348999cda3a70cdc457f6d3611
+EBUILD prometheus-bin-2.15.2.ebuild 1503 BLAKE2B f99d34d3633e91878c7c64223ee071c717dfe6aa438e7ff548cbcd62a10b62d1802a946c44486f539b263076f8b14dcb9705d1de5355d5945fc19f18f06ebca3 SHA512 54ae33cb31f85b53735eb29c6f0b0377f94b73eb5b7838a762c2a0c649f887c46e5de6437e88493961b5f871eb6a0e5d058405cd9343309a7cd0ffd52e631e2e
+MISC metadata.xml 248 BLAKE2B 5d9c3678c604aac0f24c5d5015e28f02b9ce83bb6a179755a44adeb3d69e4dd50be4acc30a6317649f5be23bcf13ac210bbe4712aa403e9c4cf2de351b39c941 SHA512 dc5b06a888be6367909895d5891a08189f4657bcee602e5ff0021be2ad3677e58ec7387ff244625be66a142138666e7eac790d2a7b1e298f0ad644725b5e57e0
diff --git a/app-metrics/prometheus-bin/files/prometheus.confd b/app-metrics/prometheus-bin/files/prometheus.confd
new file mode 100644
index 000000000000..93b41b31624c
--- /dev/null
+++ b/app-metrics/prometheus-bin/files/prometheus.confd
@@ -0,0 +1,2 @@
+# arguments for Prometheus
+command_args=""
diff --git a/app-metrics/prometheus-bin/files/prometheus.initd b/app-metrics/prometheus-bin/files/prometheus.initd
new file mode 100644
index 000000000000..f7371f8ca060
--- /dev/null
+++ b/app-metrics/prometheus-bin/files/prometheus.initd
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 2016-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus monitoring system and time series database"
+pidfile=/var/run/${RC_SVCNAME}.pid
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+command_user=${user}:${group}
+
+command="/usr/bin/prometheus"
+command_args="${command_args:---config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/data}"
+command_background="true"
+error_log=/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log
+output_log=/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log
+
+extra_started_commands="reload"
+
+depend() {
+ after net
+}
+
+reload() {
+ ebegin "Reloading configuration for ${RC_SVCNAME}"
+ case "$supervisor" in
+ supervise-daemon)
+ supervise-daemon ${RC_SVCNAME} --signal HUP
+ ;;
+ *)
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ ;;
+ esac
+ eend $? "Failed to reload ${RC_SVCNAME}"
+}
diff --git a/app-metrics/prometheus-bin/metadata.xml b/app-metrics/prometheus-bin/metadata.xml
new file mode 100644
index 000000000000..c36c37139fad
--- /dev/null
+++ b/app-metrics/prometheus-bin/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>
diff --git a/app-metrics/prometheus-bin/prometheus-bin-2.15.2.ebuild b/app-metrics/prometheus-bin/prometheus-bin-2.15.2.ebuild
new file mode 100644
index 000000000000..89e508d0cf53
--- /dev/null
+++ b/app-metrics/prometheus-bin/prometheus-bin-2.15.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="prometheus monitoring system and time series database"
+HOMEPAGE="http://prometheus.io"
+MY_PN=${PN%%-bin}
+MY_P=${MY_PN}-${PV}
+SRC_URI="https://github.com/prometheus/prometheus/releases/download/v${PV}/${MY_P}.linux-amd64.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+QA_PREBUILT=".*"
+RESTRICT="strip"
+
+DEPEND="acct-group/prometheus
+ acct-user/prometheus
+ !app-metrics/prometheus"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}.linux-amd64"
+
+src_install() {
+ dobin prometheus promtool tsdb
+ insinto /usr/share/prometheus
+ doins -r console_libraries consoles
+ insinto /etc/prometheus
+ doins prometheus.yml
+ dosym ../../usr/share/prometheus/console_libraries /etc/prometheus/console_libraries
+ dosym ../../usr/share/prometheus/consoles /etc/prometheus/consoles
+
+ newinitd "${FILESDIR}"/prometheus.initd prometheus
+ newconfd "${FILESDIR}"/prometheus.confd prometheus
+ keepdir /var/log/prometheus /var/lib/prometheus
+ fowners prometheus:prometheus /var/log/prometheus /var/lib/prometheus
+}
+
+pkg_postinst() {
+ if has_version '<net-analyzer/prometheus-2.0.0_rc0'; then
+ ewarn "Old prometheus 1.x TSDB won't be converted to the new prometheus 2.0 format"
+ ewarn "Be aware that the old data currently cannot be accessed with prometheus 2.0"
+ ewarn "This release requires a clean storage directory and is not compatible with"
+ ewarn "files created by previous beta releases"
+ fi
+}