Skip to content
Snippets Groups Projects
Verified Commit b6bc7a82 authored by Marino Pascual's avatar Marino Pascual Committed by alice
Browse files

testing/prometheus-libvirt-exporter: new aport

https://github.com/AlexZzz/libvirt-exporter
Adding Prometheus libvirt exporter
parent 341a6042
No related branches found
No related tags found
1 merge request!39304[3.16] main/expat: security upgrade to 2.4.9
# Contributor: Marino Pascual <mpascual@philips.com>
# Maintainer: Marino Pascual <mpascual@philips.com>
pkgname=prometheus-libvirt-exporter
_pkgname=libvirt-exporter
pkgver=2.3.2
pkgrel=0
pkgdesc="Prometheus libvirt exporter"
url="https://github.com/AlexZzz/libvirt-exporter"
arch="all !s390x !riscv64" # libvirt
license="Apache-2.0"
makedepends="go libvirt-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="$_pkgname-$pkgver.tar.gz::https://github.com/AlexZzz/libvirt-exporter/archive/refs/tags/$pkgver.tar.gz
libvirt-exporter.initd
libvirt-exporter.confd
"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check"
build() {
go build
}
package() {
install -Dm755 libvirt-exporter "$pkgdir"/usr/bin/libvirt-exporter
install -Dm755 "$srcdir"/libvirt-exporter.initd "$pkgdir"/etc/init.d/libvirt-exporter
install -Dm644 "$srcdir"/libvirt-exporter.confd "$pkgdir"/etc/conf.d/libvirt-exporter
}
sha512sums="
be2af61b5bd47f61734ec15bef5e634adbbe54c8d9c0572b9940289085c0ddd74c8a980f65cceb6c4081e4c802afc8a98c02c37b11649202635f160a7129b995 libvirt-exporter-2.3.2.tar.gz
7e6868c9bf09dcc9f19de49309d08a96ad8ba12ecf0de468cfd9029e2b1a964c6e1764fb98b7ccc54560f904616469d9d6d45dd147ecede1a0dc21757786ee8f libvirt-exporter.initd
857e48ec1d9e5382733e5b8195f68685768c30b6d25232fb00aa7373154cf03e63d5959da5bd6132bd252a729e6d68a211e63aeceac34516cbb37b0efabec53c libvirt-exporter.confd
"
# /etc/conf.d/libvirt-exporter
# Custom arguments can be specified like:
#
# ARGS="--web.listen-address=:9177 --web.telemetry-path=/metrics"
ARGS=""
# comment out to use traditional service management
supervisor="supervise-daemon"
#!/sbin/openrc-run
name="prometheus-libvirt-exporter"
supervisor=supervise-daemon
command="/usr/bin/libvirt-exporter"
command_args="$ARGS"
command_background="yes"
command_user="prometheus:prometheus"
pidfile="/run/${RC_SVCNAME}.pid"
#!/bin/sh
addgroup -S prometheus 2>/dev/null
adduser -S -D -h /var/lib/prometheus \
-s /sbin/nologin -G prometheus -g prometheus prometheus prometheus 2>/dev/null
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment