Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133511327
D14537.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D14537.diff
View Options
Index: head/sysutils/Makefile
===================================================================
--- head/sysutils/Makefile
+++ head/sysutils/Makefile
@@ -103,6 +103,7 @@
SUBDIR += biosfont
SUBDIR += bkpupsd
SUBDIR += bksh
+ SUBDIR += blackbox_exporter
SUBDIR += boxbackup
SUBDIR += boxbackup-devel
SUBDIR += brasero
Index: head/sysutils/blackbox_exporter/Makefile
===================================================================
--- head/sysutils/blackbox_exporter/Makefile
+++ head/sysutils/blackbox_exporter/Makefile
@@ -0,0 +1,30 @@
+# $FreeBSD$
+
+PORTNAME= blackbox_exporter
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.12.0
+CATEGORIES= sysutils
+
+MAINTAINER= fabian.freyer@physik.tu-berlin.de
+COMMENT= Blackbox prober for prometheus
+
+LICENSE= APACHE20
+
+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}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKDIR}/bin/blackbox_exporter ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${GO_WRKSRC}/example.yml ${STAGEDIR}${PREFIX}/etc/blackbox_exporter.yml.sample
+
+.include <bsd.port.mk>
Index: head/sysutils/blackbox_exporter/distinfo
===================================================================
--- head/sysutils/blackbox_exporter/distinfo
+++ head/sysutils/blackbox_exporter/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1519753337
+SHA256 (prometheus-blackbox_exporter-v0.12.0_GH0.tar.gz) = 8d5c2236b555af0c1ef00e6973f1aac76a38bbb5220aa6a39c1837a9b29e2a50
+SIZE (prometheus-blackbox_exporter-v0.12.0_GH0.tar.gz) = 2202465
Index: head/sysutils/blackbox_exporter/files/blackbox_exporter.in
===================================================================
--- head/sysutils/blackbox_exporter/files/blackbox_exporter.in
+++ head/sysutils/blackbox_exporter/files/blackbox_exporter.in
@@ -0,0 +1,57 @@
+#!/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_file (string) Set the location of the blackbox_exporter config
+# configuration file.
+# Default is "%%PREFIX%%/etc/blackbox_exporter.yml"
+
+. /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_file:="%%PREFIX%%/etc/blackbox_exporter.yml"}
+
+pidfile=/var/run/blackbox_exporter.pid
+command=/usr/sbin/daemon
+procname="%%PREFIX%%/bin/blackbox_exporter"
+command_args="-p ${pidfile} /usr/bin/env ${procname} \
+ --web.listen-address=${blackbox_exporter_listen_address} \
+ --config.file=${blackbox_exporter_config_file} \
+ ${blackbox_exporter_args}"
+
+start_precmd=blackbox_exporter_startprecmd
+
+blackbox_exporter_startprecmd()
+{
+ if [ ! -e ${pidfile} ]; then
+ install -o ${blackbox_exporter_user} -g ${blackbox_exporter_group} /dev/null ${pidfile};
+ fi
+}
+
+run_rc_command "$1"
Index: head/sysutils/blackbox_exporter/files/pkg-message.in
===================================================================
--- head/sysutils/blackbox_exporter/files/pkg-message.in
+++ head/sysutils/blackbox_exporter/files/pkg-message.in
@@ -0,0 +1,15 @@
+To start blackbox_exporter, create a configuration file at
+%%LOCALBASE%%/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".
Index: head/sysutils/blackbox_exporter/pkg-descr
===================================================================
--- head/sysutils/blackbox_exporter/pkg-descr
+++ head/sysutils/blackbox_exporter/pkg-descr
@@ -0,0 +1,5 @@
+blackbox_exporter is a prometheus exporter that allows
+blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP
+and ICMP.
+
+WWW: https://github.com/prometheus/blackbox_exporter
Index: head/sysutils/blackbox_exporter/pkg-plist
===================================================================
--- head/sysutils/blackbox_exporter/pkg-plist
+++ head/sysutils/blackbox_exporter/pkg-plist
@@ -0,0 +1,2 @@
+bin/blackbox_exporter
+@sample etc/blackbox_exporter.yml.sample
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 27, 7:37 AM (18 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24281628
Default Alt Text
D14537.diff (5 KB)
Attached To
Mode
D14537: NEW PORT: sysutils/blackbox_exporter
Attached
Detach File
Event Timeline
Log In to Comment