1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

net-mgmt/blackbox_exporter: Make syslog output configurable

Add the following new options, based on net-mgmt/ping_exporter:

+# blackbox_exporter_syslog_output_tag (str):      Set syslog tag.
+#               Default is "blackbox_exporter". See daemon(8).
+# blackbox_exporter_syslog_output_priority (str): Set syslog priority.
+#               Default is "notice". See daemon(8).
+# blackbox_exporter_syslog_output_facility (str): Set syslog facility.
+#               Default is "daemon". See daemon(8).

the defaults are unchanged from before, i.e. it outputs at daemon.notice.

PR:		276992
This commit is contained in:
Lexi Winter 2024-02-12 09:10:01 +00:00 committed by Nuno Teixeira
parent 783ddb9d86
commit 8f0f02c256
2 changed files with 14 additions and 2 deletions

View File

@ -1,7 +1,7 @@
PORTNAME= blackbox_exporter
DISTVERSIONPREFIX= v
DISTVERSION= 0.24.0
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= net-mgmt
MAINTAINER= eduardo@FreeBSD.org

View File

@ -19,6 +19,12 @@
# Default is "localhost:9115".
# blackbox_exporter_config (string): Set configuration file of blackbox_exporter
# Default is "%%PREFIX%%/etc/blackbox_exporter.yml".
# blackbox_exporter_syslog_output_tag (str): Set syslog tag.
# Default is "blackbox_exporter". See daemon(8).
# blackbox_exporter_syslog_output_priority (str): Set syslog priority.
# Default is "notice". See daemon(8).
# blackbox_exporter_syslog_output_facility (str): Set syslog facility.
# Default is "daemon". See daemon(8).
. /etc/rc.subr
@ -33,11 +39,17 @@ load_rc_config $name
: ${blackbox_exporter_group:=prometheus}
: ${blackbox_exporter_listen_address=localhost:9115}
: ${blackbox_exporter_config="%%PREFIX%%/etc/blackbox_exporter.yml"}
: ${blackbox_exporter_syslog_output_tag=${name}}
: ${blackbox_exporter_syslog_output_priority=notice}
: ${blackbox_exporter_syslog_output_facility=daemon}
pidfile=/var/run/blackbox_exporter.pid
command=/usr/sbin/daemon
procname="%%PREFIX%%/bin/blackbox_exporter"
command_args="-p ${pidfile} -t ${name} -T ${name} -S \
command_args="-p ${pidfile} -t ${name} -S \
-T ${blackbox_exporter_syslog_output_tag} \
-s ${blackbox_exporter_syslog_output_priority} \
-l ${blackbox_exporter_syslog_output_facility} \
/usr/bin/env ${procname} \
--web.listen-address=${blackbox_exporter_listen_address} \
--config.file=${blackbox_exporter_config} \