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:
parent
783ddb9d86
commit
8f0f02c256
@ -1,7 +1,7 @@
|
|||||||
PORTNAME= blackbox_exporter
|
PORTNAME= blackbox_exporter
|
||||||
DISTVERSIONPREFIX= v
|
DISTVERSIONPREFIX= v
|
||||||
DISTVERSION= 0.24.0
|
DISTVERSION= 0.24.0
|
||||||
PORTREVISION= 4
|
PORTREVISION= 5
|
||||||
CATEGORIES= net-mgmt
|
CATEGORIES= net-mgmt
|
||||||
|
|
||||||
MAINTAINER= eduardo@FreeBSD.org
|
MAINTAINER= eduardo@FreeBSD.org
|
||||||
|
|||||||
@ -19,6 +19,12 @@
|
|||||||
# Default is "localhost:9115".
|
# Default is "localhost:9115".
|
||||||
# blackbox_exporter_config (string): Set configuration file of blackbox_exporter
|
# blackbox_exporter_config (string): Set configuration file of blackbox_exporter
|
||||||
# Default is "%%PREFIX%%/etc/blackbox_exporter.yml".
|
# 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
|
. /etc/rc.subr
|
||||||
|
|
||||||
@ -33,11 +39,17 @@ load_rc_config $name
|
|||||||
: ${blackbox_exporter_group:=prometheus}
|
: ${blackbox_exporter_group:=prometheus}
|
||||||
: ${blackbox_exporter_listen_address=localhost:9115}
|
: ${blackbox_exporter_listen_address=localhost:9115}
|
||||||
: ${blackbox_exporter_config="%%PREFIX%%/etc/blackbox_exporter.yml"}
|
: ${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
|
pidfile=/var/run/blackbox_exporter.pid
|
||||||
command=/usr/sbin/daemon
|
command=/usr/sbin/daemon
|
||||||
procname="%%PREFIX%%/bin/blackbox_exporter"
|
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} \
|
/usr/bin/env ${procname} \
|
||||||
--web.listen-address=${blackbox_exporter_listen_address} \
|
--web.listen-address=${blackbox_exporter_listen_address} \
|
||||||
--config.file=${blackbox_exporter_config} \
|
--config.file=${blackbox_exporter_config} \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user