aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLexi Winter <lexi.freebsd@le-fay.org>2024-02-12 09:10:01 +0000
committerNuno Teixeira <eduardo@FreeBSD.org>2024-02-12 09:12:03 +0000
commit8f0f02c25643fcc0be1c488f4fa4f8e95a67716c (patch)
tree07c3665caa6dcecc959d1c1627a361c947fa0039
parent783ddb9d8659d433db7e4ef0c2949edd090768c0 (diff)
downloadports-8f0f02c25643fcc0be1c488f4fa4f8e95a67716c.tar.gz
ports-8f0f02c25643fcc0be1c488f4fa4f8e95a67716c.zip
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
-rw-r--r--net-mgmt/blackbox_exporter/Makefile2
-rw-r--r--net-mgmt/blackbox_exporter/files/blackbox_exporter.in14
2 files changed, 14 insertions, 2 deletions
diff --git a/net-mgmt/blackbox_exporter/Makefile b/net-mgmt/blackbox_exporter/Makefile
index 8fdf03698d1a..7cabf70f70a6 100644
--- a/net-mgmt/blackbox_exporter/Makefile
+++ b/net-mgmt/blackbox_exporter/Makefile
@@ -1,7 +1,7 @@
PORTNAME= blackbox_exporter
DISTVERSIONPREFIX= v
DISTVERSION= 0.24.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= net-mgmt
MAINTAINER= eduardo@FreeBSD.org
diff --git a/net-mgmt/blackbox_exporter/files/blackbox_exporter.in b/net-mgmt/blackbox_exporter/files/blackbox_exporter.in
index a00a9f0e5cc5..1ce33146773d 100644
--- a/net-mgmt/blackbox_exporter/files/blackbox_exporter.in
+++ b/net-mgmt/blackbox_exporter/files/blackbox_exporter.in
@@ -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} \