Index: head/net-mgmt/blackbox_exporter/Makefile =================================================================== --- head/net-mgmt/blackbox_exporter/Makefile (revision 541758) +++ head/net-mgmt/blackbox_exporter/Makefile (revision 541759) @@ -1,43 +1,47 @@ # Created by: Boris Samorodov # $FreeBSD$ PORTNAME= blackbox_exporter PORTVERSION= 0.17.0 +PORTREVISION= 1 DISTVERSIONPREFIX=v CATEGORIES= net-mgmt MAINTAINER= bsam@FreeBSD.org COMMENT= Prometheus exporter for endpoints over HTTP(S), DNS, TCP and ICMP LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:modules USE_GITHUB= yes GH_ACCOUNT= prometheus GH_TUPLE= golang:net:83d349e8ac1a:golang_net/vendor/golang.org/x/net_83d349e8ac1a USE_RC_SUBR= blackbox_exporter USERS= prometheus GROUPS= prometheus PORTEXAMPLES= ${WRKSRC}/*.yml OPTIONS_DEFINE= EXAMPLES SUB_FILES= pkg-message SUB_LIST= GH_TAGNAME=${GH_TAGNAME} -PLIST_FILES= bin/blackbox_exporter \ - ${EXAMPLESDIR}/blackbox.yml \ - ${EXAMPLESDIR}/example.yml post-extract: ${RM} -r ${WRKSRC}/vendor/golang.org/x/net ${MV} ${WRKSRC}/vendor/golang.org/x/net_83d349e8ac1a ${WRKSRC}/vendor/golang.org/x/net post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/*.yml ${STAGEDIR}${EXAMPLESDIR} + ${MKDIR} ${STAGEDIR}${DATADIR}/syslog.d \ + ${STAGEDIR}${DATADIR}/newsyslog.conf.d + ${INSTALL_DATA} ${PATCHDIR}/blackbox_exporter.syslog \ + ${STAGEDIR}${DATADIR}/syslog.d/blackbox_exporter.conf + ${INSTALL_DATA} ${PATCHDIR}/blackbox_exporter.newsyslog \ + ${STAGEDIR}${DATADIR}/newsyslog.conf.d/blackbox_exporter.conf .include Index: head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in =================================================================== --- head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in (revision 541758) +++ head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in (revision 541759) @@ -1,73 +1,62 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: blackbox_exporter # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # blackbox_exporter_enable (bool): Set to NO by default. # Set it to YES to enable blackbox_exporter. # blackbox_exporter_user (string): Set user that blackbox_exporter will run under # Default is "prometheus". # blackbox_exporter_group (string): Set group that blackbox_exporter will run under # Default is "prometheus". # blackbox_exporter_args (string): Set extra arguments to pass to blackbox_exporter # Default is "". # blackbox_exporter_listen_address (string):Set ip:port that blackbox_exporter will listen on # Default is "localhost:9115". # blackbox_exporter_config (string): Set configuration file of blackbox_exporter # Default is "%%PREFIX%%/etc/blackbox_exporter.yml". -# blackbox_exporter_log_file (string): Set log file of blackbox_exporter -# Default is "/var/log/blackbox_exporter.log". . /etc/rc.subr name=blackbox_exporter desc="Blackbox exporter for use with Prometheus" rcvar=blackbox_exporter_enable load_rc_config $name : ${blackbox_exporter_enable:=NO} : ${blackbox_exporter_user:=prometheus} : ${blackbox_exporter_group:=prometheus} : ${blackbox_exporter_listen_address=localhost:9115} : ${blackbox_exporter_config="%%PREFIX%%/etc/blackbox_exporter.yml"} -: ${blackbox_exporter_log_file=/var/log/blackbox_exporter.log} pidfile=/var/run/blackbox_exporter.pid command=/usr/sbin/daemon procname="%%PREFIX%%/bin/blackbox_exporter" -command_args="-p ${pidfile} /usr/bin/env ${procname} \ +command_args="-p ${pidfile} -t ${name} -T ${name} -S \ + /usr/bin/env ${procname} \ --web.listen-address=${blackbox_exporter_listen_address} \ --config.file=${blackbox_exporter_config} \ - ${blackbox_exporter_args} >> ${blackbox_exporter_log_file} 2>&1" + ${blackbox_exporter_args} 2>&1" start_precmd=blackbox_exporter_startprecmd blackbox_exporter_startprecmd() { if [ ! -e ${pidfile} ]; then install \ -o ${blackbox_exporter_user} \ -g ${blackbox_exporter_group} \ /dev/null ${pidfile}; else chown ${blackbox_exporter_user}:${blackbox_exporter_group} ${pidfile}; - fi - if [ ! -e ${blackbox_exporter_log_file} ]; then - install \ - -o ${blackbox_exporter_user} \ - -g ${blackbox_exporter_group} \ - -m 640 \ - /dev/null ${blackbox_exporter_log_file}; - else - chown ${blackbox_exporter_user}:${blackbox_exporter_group} ${blackbox_exporter_log_file}; fi } run_rc_command "$1" Property changes on: head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/net-mgmt/blackbox_exporter/files/blackbox_exporter.newsyslog =================================================================== --- head/net-mgmt/blackbox_exporter/files/blackbox_exporter.newsyslog (nonexistent) +++ head/net-mgmt/blackbox_exporter/files/blackbox_exporter.newsyslog (revision 541759) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +/var/log/blackbox_exporter.log 644 7 1000 * J Property changes on: head/net-mgmt/blackbox_exporter/files/blackbox_exporter.newsyslog ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/blackbox_exporter/files/blackbox_exporter.syslog =================================================================== --- head/net-mgmt/blackbox_exporter/files/blackbox_exporter.syslog (nonexistent) +++ head/net-mgmt/blackbox_exporter/files/blackbox_exporter.syslog (revision 541759) @@ -0,0 +1,3 @@ +# $FreeBSD$ +!blackbox_exporter +*.* /var/log/blackbox_exporter.log Property changes on: head/net-mgmt/blackbox_exporter/files/blackbox_exporter.syslog ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/blackbox_exporter/files/pkg-message.in =================================================================== --- head/net-mgmt/blackbox_exporter/files/pkg-message.in (revision 541758) +++ head/net-mgmt/blackbox_exporter/files/pkg-message.in (revision 541759) @@ -1,21 +1,25 @@ [ { type: install message: <