Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Mar 2018 17:55:55 +0000 (UTC)
From:      Boris Samorodov <bsam@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r463983 - in head/net-mgmt/blackbox_exporter: . files
Message-ID:  <201803091755.w29Htt7B017848@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bsam
Date: Fri Mar  9 17:55:55 2018
New Revision: 463983
URL: https://svnweb.freebsd.org/changeset/ports/463983

Log:
  net-mgmt/blackbox_exporter: Update to version 0.12.0
  
    [FEATURE] Allow specifying source address for DNS, TCP, and ICMP probes
    [BUGFIX] Fix probe_http_content_length metric name
    [BUGFIX] Add missing validation of HTTPClientConfig
  
  Other changes:
  . do not start as nobody;
  . add pkg-message;
  . do not listen on public address by default;
  . rclint.
  
  PR:		226399  [1]
  Submitted by:	 David O'Rourke <dor.bsd@xm0.uk>  [1]
  			Fabian Freyer <fabian@freyer_physik.tu-berlin.de>  [2]
  Differential Revision:	D14596  [2]

Added:
  head/net-mgmt/blackbox_exporter/files/pkg-message.in   (contents, props changed)
Modified:
  head/net-mgmt/blackbox_exporter/Makefile
  head/net-mgmt/blackbox_exporter/distinfo
  head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in

Modified: head/net-mgmt/blackbox_exporter/Makefile
==============================================================================
--- head/net-mgmt/blackbox_exporter/Makefile	Fri Mar  9 17:49:19 2018	(r463982)
+++ head/net-mgmt/blackbox_exporter/Makefile	Fri Mar  9 17:55:55 2018	(r463983)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	blackbox_exporter
-PORTVERSION=	0.11.0
-PORTREVISION=	1
+PORTVERSION=	0.12.0
 DISTVERSIONPREFIX=v
 CATEGORIES=	net-mgmt
 
@@ -15,8 +14,13 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 USES=		go
 USE_GITHUB=	yes
-
 GH_ACCOUNT=	prometheus
+USE_RC_SUBR=    blackbox_exporter
+SUB_FILES=      pkg-message
+SUB_LIST=       GH_TAGNAME=${GH_TAGNAME}
+
+USERS=		prometheus
+GROUPS=		prometheus
 
 GO_PKGNAME=	github.com/${GH_ACCOUNT}/${PORTNAME}
 GO_TARGET=	github.com/${GH_ACCOUNT}/${PORTNAME}

Modified: head/net-mgmt/blackbox_exporter/distinfo
==============================================================================
--- head/net-mgmt/blackbox_exporter/distinfo	Fri Mar  9 17:49:19 2018	(r463982)
+++ head/net-mgmt/blackbox_exporter/distinfo	Fri Mar  9 17:55:55 2018	(r463983)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1512052617
-SHA256 (prometheus-blackbox_exporter-v0.11.0_GH0.tar.gz) = 6ba223b7254fd261e19b9cf96c760505a53b977a6328d5479e6744734e28deb6
-SIZE (prometheus-blackbox_exporter-v0.11.0_GH0.tar.gz) = 2143849
+TIMESTAMP = 1520362217
+SHA256 (prometheus-blackbox_exporter-v0.12.0_GH0.tar.gz) = 8d5c2236b555af0c1ef00e6973f1aac76a38bbb5220aa6a39c1837a9b29e2a50
+SIZE (prometheus-blackbox_exporter-v0.12.0_GH0.tar.gz) = 2202465

Modified: head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in
==============================================================================
--- head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in	Fri Mar  9 17:49:19 2018	(r463982)
+++ head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in	Fri Mar  9 17:55:55 2018	(r463983)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+# $FreeBSD$
+#
 # PROVIDE: blackbox_exporter
 # REQUIRE: LOGIN
 # KEYWORD: shutdown
@@ -10,13 +12,13 @@
 # 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 "nobody".
+#               Default is "prometheus".
 # blackbox_exporter_group (string):         Set group that blackbox_exporter will run under
-#               Default is "nobody".
+#               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 ":9115".
+#               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
@@ -25,20 +27,20 @@
 . /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:="nobody"}
-: ${blackbox_exporter_group:="nobody"}
-: ${blackbox_exporter_args:=""}
-: ${blackbox_exporter_listen_address:=":9115"}
-: ${blackbox_exporter_config:="%%PREFIX%%/etc/blackbox_exporter.yml"}
-: ${blackbox_exporter_log_file:="/var/log/blackbox_exporter.log"}
+: ${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"
+command=/usr/sbin/daemon
 procname="%%PREFIX%%/bin/blackbox_exporter"
 command_args="-p ${pidfile} /usr/bin/env ${procname} \
     --web.listen-address=${blackbox_exporter_listen_address} \
@@ -54,6 +56,8 @@ blackbox_exporter_startprecmd()
             -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 \
@@ -61,8 +65,9 @@ blackbox_exporter_startprecmd()
             -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
 }
 
-load_rc_config $name
 run_rc_command "$1"

Added: head/net-mgmt/blackbox_exporter/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/blackbox_exporter/files/pkg-message.in	Fri Mar  9 17:55:55 2018	(r463983)
@@ -0,0 +1,15 @@
+To start blackbox_exporter, create a configuration file at
+%%PREFIX%%/etc/blackbox_exporter.yml and run
+"sysrc blackbox_exporter_enable=yes".
+
+For details about the configuration file format, visit
+https://github.com/prometheus/blackbox_exporter/blob/%%GH_TAGNAME%%/CONFIGURATION.md
+
+Since blackbox_exporter allows setting arbitrary probe
+targets via HTTP parameters, it is set to listen on localhost
+only by default. To change the listen address, set the
+blackbox_exporter_listen_address rcvar.
+
+To use the 'ping' module, blackbox_exporter needs to run with
+root privileges. To run blackbox_exporter with root privileges,
+run "sysrc blackbox_exporter_user=root".



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803091755.w29Htt7B017848>