diff options
Diffstat (limited to 'app-metrics')
-rw-r--r-- | app-metrics/chrony_exporter/Manifest | 2 | ||||
-rw-r--r-- | app-metrics/chrony_exporter/chrony_exporter-0.10.1.ebuild | 31 | ||||
-rw-r--r-- | app-metrics/chrony_exporter/files/chrony_exporter.confd | 2 | ||||
-rw-r--r-- | app-metrics/chrony_exporter/files/chrony_exporter.initd | 17 | ||||
-rw-r--r-- | app-metrics/chrony_exporter/metadata.xml | 15 |
5 files changed, 67 insertions, 0 deletions
diff --git a/app-metrics/chrony_exporter/Manifest b/app-metrics/chrony_exporter/Manifest new file mode 100644 index 000000000000..cc41592ed45d --- /dev/null +++ b/app-metrics/chrony_exporter/Manifest @@ -0,0 +1,2 @@ +DIST chrony_exporter-0.10.1-deps.tar.xz 8939432 BLAKE2B 91fa640e67ab1b158992808d93093204a040e4487e75443f0c223a3b0d624e8c065785443eaaaa21fa2395df38a49285d209bd35bc95ab72013adc8559b5b99c SHA512 d027d4031ef8635ffbbc9a8d349b60ff1eb26ad17a2d27bd2d56f5a3422983b84891c367d70c43f7ee0ece3165428104611a51e0bc01e35ce1c2a4bd89c648b4 +DIST chrony_exporter-0.10.1.tar.gz 21438 BLAKE2B 9be912ab6569de2a5e6e39055ba54cc619d8a7c29d0043abda97af13ded6ee7766c97d97cc12cfc3404c4adbb1c779e444a9b3f18bf5ca615ba33f8cd62c70b9 SHA512 4e8f321b38605bad448d453e5754c6fe10518fe35ee063552a6dad6c01fbcc2156b1eb40873ba157a324fffc899acdaa8fb33b5464bdfe2c2b620c7849224c2a diff --git a/app-metrics/chrony_exporter/chrony_exporter-0.10.1.ebuild b/app-metrics/chrony_exporter/chrony_exporter-0.10.1.ebuild new file mode 100644 index 000000000000..b24bc02e2e57 --- /dev/null +++ b/app-metrics/chrony_exporter/chrony_exporter-0.10.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module + +DESCRIPTION="Chrony NTP exporter for Prometheus" +HOMEPAGE="https://github.com/SuperQ/chrony_exporter" + +SRC_URI="https://github.com/SuperQ/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://www.applied-asynchrony.com/distfiles/${P}-deps.tar.xz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="acct-group/chrony_exporter + acct-user/chrony_exporter" + +BDEPEND="dev-util/promu" + +src_compile() { + promu build -v --cgo --prefix bin || die +} + +src_install() { + newbin bin/${P} ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} diff --git a/app-metrics/chrony_exporter/files/chrony_exporter.confd b/app-metrics/chrony_exporter/files/chrony_exporter.confd new file mode 100644 index 000000000000..0fa8c6ec9b45 --- /dev/null +++ b/app-metrics/chrony_exporter/files/chrony_exporter.confd @@ -0,0 +1,2 @@ +# arguments for chrony_exporter +command_args="--collector.tracking --collector.sources" diff --git a/app-metrics/chrony_exporter/files/chrony_exporter.initd b/app-metrics/chrony_exporter/files/chrony_exporter.initd new file mode 100644 index 000000000000..7cddf925322e --- /dev/null +++ b/app-metrics/chrony_exporter/files/chrony_exporter.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Prometheus chrony metrics exporter" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} + +command="/usr/bin/chrony_exporter" +command_args="${command_args}" +command_background="true" +start_stop_daemon_args="--user ${user} --group ${group}" + +depend() { + after chronyd +} diff --git a/app-metrics/chrony_exporter/metadata.xml b/app-metrics/chrony_exporter/metadata.xml new file mode 100644 index 000000000000..d5b482f753d9 --- /dev/null +++ b/app-metrics/chrony_exporter/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>holger@applied-asynchrony.com</email> + <name>Holger Hoffstätte</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">SuperQ/chrony_exporter</remote-id> + </upstream> +</pkgmetadata> |