Page MenuHomeFreeBSD

D14537.id39804.diff
No OneTemporary

D14537.id39804.diff

Index: sysutils/blackbox_exporter/Makefile
===================================================================
--- sysutils/blackbox_exporter/Makefile
+++ sysutils/blackbox_exporter/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTNAME= blackbox_exporter
+PORTVERSION= 0.12.0
+DISTVERSIONPREFIX= v
+CATEGORIES= sysutils
+
+MAINTAINER= fabian.freyer@physik.tu-berlin.de
+COMMENT= Blackbox prober for prometheus
+
+LICENSE= APACHE20
+
+USES= go
+USE_GITHUB= yes
+USE_RC_SUBR= blackbox_exporter
+SUB_FILES= pkg-message
+SUB_LIST+= GH_TAGNAME=${GH_TAGNAME}
+
+GH_ACCOUNT= 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
+ ${CP} ${GO_WRKSRC}/example.yml ${STAGEDIR}${PREFIX}/etc/blackbox_exporter.example.yml
+
+.include <bsd.port.mk>
Index: sysutils/blackbox_exporter/distinfo
===================================================================
--- sysutils/blackbox_exporter/distinfo
+++ 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: sysutils/blackbox_exporter/files/blackbox_exporter.in
===================================================================
--- sysutils/blackbox_exporter/files/blackbox_exporter.in
+++ sysutils/blackbox_exporter/files/blackbox_exporter.in
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# 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 "nobody".
+# blackbox_exporter_group (string): Set group that blackbox_exporter will run under
+# Default is "nobody".
+# 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
+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:="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
+ if [ ! -d ${blackbox_exporter_textfile_dir} ]; then
+ install -d -o ${blackbox_exporter_user} -g ${blackbox_exporter_group} -m 1755 ${blackbox_exporter_textfile_dir}
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
Index: sysutils/blackbox_exporter/files/pkg-message.in
===================================================================
--- sysutils/blackbox_exporter/files/pkg-message.in
+++ sysutils/blackbox_exporter/files/pkg-message.in
@@ -0,0 +1,14 @@
+To start blackbox_exporter, create a configuration file at
+%%LOCALBASE%%/etc/blackbox_exporter.yml and set the
+blackbox_exporter_enable="YES" rcvar.
+
+An example configuration file can be found at
+%%LOCALBASE%%/etc/blackbox_exporter.example.yml.
+
+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.
Index: sysutils/blackbox_exporter/pkg-descr
===================================================================
--- sysutils/blackbox_exporter/pkg-descr
+++ 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: sysutils/blackbox_exporter/pkg-plist
===================================================================
--- sysutils/blackbox_exporter/pkg-plist
+++ sysutils/blackbox_exporter/pkg-plist
@@ -0,0 +1,2 @@
+bin/blackbox_exporter
+etc/blackbox_exporter.example.yml

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 19, 6:07 AM (1 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27733481
Default Alt Text
D14537.id39804.diff (5 KB)

Event Timeline