net-mgmt/adguard-exporter: New port
PR: 260586
This commit is contained in:
parent
0f5b6cdfcf
commit
db92ba1e2b
@ -3,6 +3,7 @@
|
||||
SUBDIR += 2ping
|
||||
SUBDIR += TkTopNetFlows
|
||||
SUBDIR += adcli
|
||||
SUBDIR += adguard-exporter
|
||||
SUBDIR += aggregate
|
||||
SUBDIR += aircrack-ng
|
||||
SUBDIR += alertmanager
|
||||
|
38
net-mgmt/adguard-exporter/Makefile
Normal file
38
net-mgmt/adguard-exporter/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
# Created by: Christer Edwards <christer.edwards@gmail.com>
|
||||
|
||||
PORTNAME= adguard-exporter
|
||||
PORTVERSION= 1.14
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= net-mgmt
|
||||
MAINTAINER= christer.edwards@gmail.com
|
||||
COMMENT= Prometheus metrics exporter for AdGuard Home DNS
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
USES= go
|
||||
USE_GITHUB= yes
|
||||
USE_RC_SUBR= adguard_exporter
|
||||
|
||||
GH_ACCOUNT= ebrianne
|
||||
GH_TUPLE= beorn7:perks:4c0e845:perks/vendor/github.com/beorn7/perks \
|
||||
cespare:xxhash:v2.1.1:cespare_xxhash_v2/vendor/github.com/cespare/xxhash/v2 \
|
||||
golang:net:4c5254603344:net/vendor/golang.org/x/net \
|
||||
golang:protobuf:2bba060:protobuf/vendor/github.com/golang/protobuf \
|
||||
heetch:confita:v0.9.2:confita/vendor/github.com/heetch/confita \
|
||||
matttproud:golang_protobuf_extensions:c12348c:extensions/vendor/github.com/matttproud/golang_protobuf_extensions \
|
||||
mitchellh:mapstructure:v1.1.2:mapstructure/vendor/github.com/mitchellh/mapstructure \
|
||||
pkg:errors:v0.9.1:pkg_errors/vendor/github.com/pkg/errors \
|
||||
prometheus:client_golang:3fb53d:client_golang/vendor/github.com/prometheus/client_golang \
|
||||
prometheus:client_model:6f38060:client_model/vendor/github.com/prometheus/client_model \
|
||||
prometheus:common:49fee29:common/vendor/github.com/prometheus/common \
|
||||
prometheus:procfs:a1dba9c:procfs/vendor/github.com/prometheus/procfs
|
||||
|
||||
|
||||
GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
|
||||
|
||||
USERS= nobody
|
||||
GROUPS= nobody
|
||||
|
||||
PLIST_FILES= bin/adguard-exporter
|
||||
|
||||
.include <bsd.port.mk>
|
27
net-mgmt/adguard-exporter/distinfo
Normal file
27
net-mgmt/adguard-exporter/distinfo
Normal file
@ -0,0 +1,27 @@
|
||||
TIMESTAMP = 1639375250
|
||||
SHA256 (ebrianne-adguard-exporter-v1.14_GH0.tar.gz) = df4e9febef2bfae2d823083cb8ca4f3a799a9312603896c17825b8af85f758ef
|
||||
SIZE (ebrianne-adguard-exporter-v1.14_GH0.tar.gz) = 331223
|
||||
SHA256 (beorn7-perks-4c0e845_GH0.tar.gz) = 2d0c7784d2695b09c87710bc8c3c3d5b88ffeece31a650ed901763d215615478
|
||||
SIZE (beorn7-perks-4c0e845_GH0.tar.gz) = 10593
|
||||
SHA256 (cespare-xxhash-v2.1.1_GH0.tar.gz) = 0ee31178d2c5a1249be4e26294a2f428008dc4e1ecbbfbe47f74e41026df1148
|
||||
SIZE (cespare-xxhash-v2.1.1_GH0.tar.gz) = 9292
|
||||
SHA256 (golang-net-4c5254603344_GH0.tar.gz) = 5957e628f2676d9e6c9517890bdcec334e8cac53d0f000b42ed6364a0550e152
|
||||
SIZE (golang-net-4c5254603344_GH0.tar.gz) = 1177478
|
||||
SHA256 (golang-protobuf-2bba060_GH0.tar.gz) = ae917f15fd7de724cdce087b451326e6f364a898f03dc453a912ed7918e87742
|
||||
SIZE (golang-protobuf-2bba060_GH0.tar.gz) = 245284
|
||||
SHA256 (heetch-confita-v0.9.2_GH0.tar.gz) = 2b8be16b62e119f2e4661bfdb5b9ada4a9defbee86e8e0864b427150660f9588
|
||||
SIZE (heetch-confita-v0.9.2_GH0.tar.gz) = 28593
|
||||
SHA256 (matttproud-golang_protobuf_extensions-c12348c_GH0.tar.gz) = da165c9275b77a0994b815bc7d761dcb2e4799a90fe49eec08d8bdff3a683f48
|
||||
SIZE (matttproud-golang_protobuf_extensions-c12348c_GH0.tar.gz) = 37200
|
||||
SHA256 (mitchellh-mapstructure-v1.1.2_GH0.tar.gz) = 53fbc06b125ff1c9c73a4eb1764346932671a29c67a45a92e2ebc6855635069b
|
||||
SIZE (mitchellh-mapstructure-v1.1.2_GH0.tar.gz) = 20980
|
||||
SHA256 (pkg-errors-v0.9.1_GH0.tar.gz) = 56bfd893023daa498508bfe161de1be83299fcf15376035e7df79cbd7d6fa608
|
||||
SIZE (pkg-errors-v0.9.1_GH0.tar.gz) = 13415
|
||||
SHA256 (prometheus-client_golang-3fb53d_GH0.tar.gz) = 778ce90fdb4610cfc7c6382db9455ba15ca63c48c3f0e21cff9f1d0efeef98d3
|
||||
SIZE (prometheus-client_golang-3fb53d_GH0.tar.gz) = 129739
|
||||
SHA256 (prometheus-client_model-6f38060_GH0.tar.gz) = 6b4cc049a4588d8e93b7acf6cffa6a53034d5410128ae3752263f2bacf9e606c
|
||||
SIZE (prometheus-client_model-6f38060_GH0.tar.gz) = 54645
|
||||
SHA256 (prometheus-common-49fee29_GH0.tar.gz) = c38dd9ce34f65921f8e7604e6be471f4a49626b63e7312db21f98d65085a7be6
|
||||
SIZE (prometheus-common-49fee29_GH0.tar.gz) = 59151
|
||||
SHA256 (prometheus-procfs-a1dba9c_GH0.tar.gz) = 1702ef1142513b687bd544962828432f88195e12bbb079cbd68670b00c3e2d18
|
||||
SIZE (prometheus-procfs-a1dba9c_GH0.tar.gz) = 31615
|
60
net-mgmt/adguard-exporter/files/adguard_exporter.in
Normal file
60
net-mgmt/adguard-exporter/files/adguard_exporter.in
Normal file
@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: adguard_exporter
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# adguard_exporter_enable (bool): Set to YES to enable exporter (default: NO)
|
||||
# adguard_exporter_user (string): Set user to run adguard_exporter (default: nobody)
|
||||
# adguard_exporter_group (string): Set group to run adguard_exporter (default: nobody)
|
||||
# adguard_exporter_port (string): Set adguard home port (default: 80)
|
||||
# adguard_exporter_interval (string): Set exporter fetch interval (default: 10s)
|
||||
# adguard_exporter_protocol (string): Set adguard protocol (default: http)
|
||||
# adguard_exporter_hostname (string): Set adguard hostname (default: 127.0.0.1)
|
||||
# adguard_exporter_username (string): Set AdGuard interface login username (default: "")
|
||||
# adguard_exporter_password (string): Set AdGuard interface login password (default: "")
|
||||
# adguard_exporter_server_port (string): Set AdGuard exporter metrics port (default: 9617)
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=adguard_exporter
|
||||
rcvar=adguard_exporter_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${adguard_exporter_enable:=NO}
|
||||
: ${adguard_exporter_user:=nobody}
|
||||
: ${adguard_exporter_group:=nobody}
|
||||
: ${adguard_exporter_port:=80}
|
||||
: ${adguard_exporter_interval:=10s}
|
||||
: ${adguard_exporter_protocol:=http}
|
||||
: ${adguard_exporter_hostname:=127.0.0.1}
|
||||
: ${adguard_exporter_username:=""}
|
||||
: ${adguard_exporter_password:=""}
|
||||
: ${adguard_exporter_server_port:=9617}
|
||||
|
||||
pidfile=/var/run/adguard_exporter.pid
|
||||
command=/usr/sbin/daemon
|
||||
procname="%%PREFIX%%/bin/adguard-exporter"
|
||||
command_args="-f -p ${pidfile} /usr/bin/env ${procname} \
|
||||
-adguard_port ${adguard_exporter_port} \
|
||||
-adguard_protocol ${adguard_exporter_protocol} \
|
||||
-adguard_hostname ${adguard_exporter_hostname} \
|
||||
-adguard_username ${adguard_exporter_username} \
|
||||
-adguard_password ${adguard_exporter_password} \
|
||||
-interval ${adguard_exporter_interval} \
|
||||
-server_port ${adguard_exporter_server_port}"
|
||||
|
||||
start_precmd=adguard_exporter_startprecmd
|
||||
|
||||
adguard_exporter_startprecmd()
|
||||
{
|
||||
if [ ! -e ${pidfile} ]; then
|
||||
install -o ${adguard_exporter_user} -g ${adguard_exporter_group} /dev/null ${pidfile};
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
4
net-mgmt/adguard-exporter/pkg-descr
Normal file
4
net-mgmt/adguard-exporter/pkg-descr
Normal file
@ -0,0 +1,4 @@
|
||||
adguard-exporter connects to AdGuard Home and returns the data as
|
||||
Prometheus metrics. Based on the original pihole-exporter.
|
||||
|
||||
WWW: https://github.com/ebrianne/adguard-exporter
|
Loading…
Reference in New Issue
Block a user