From owner-svn-ports-head@freebsd.org Mon Jul 17 20:30:14 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AB73D9FF15; Mon, 17 Jul 2017 20:30:14 +0000 (UTC) (envelope-from bsam@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45274702E5; Mon, 17 Jul 2017 20:30:14 +0000 (UTC) (envelope-from bsam@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HKUD6u037834; Mon, 17 Jul 2017 20:30:13 GMT (envelope-from bsam@FreeBSD.org) Received: (from bsam@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HKUCbR037828; Mon, 17 Jul 2017 20:30:12 GMT (envelope-from bsam@FreeBSD.org) Message-Id: <201707172030.v6HKUCbR037828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bsam set sender to bsam@FreeBSD.org using -f From: Boris Samorodov Date: Mon, 17 Jul 2017 20:30:12 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r446114 - in head/net-mgmt: . blackbox_exporter blackbox_exporter/files X-SVN-Group: ports-head X-SVN-Commit-Author: bsam X-SVN-Commit-Paths: in head/net-mgmt: . blackbox_exporter blackbox_exporter/files X-SVN-Commit-Revision: 446114 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 20:30:14 -0000 Author: bsam Date: Mon Jul 17 20:30:12 2017 New Revision: 446114 URL: https://svnweb.freebsd.org/changeset/ports/446114 Log: blackbox_exporter is a prometheus exporter. The blackbox exporter allows blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP. WWW: https://github.com/prometheus/blackbox_exporter Added: head/net-mgmt/blackbox_exporter/ head/net-mgmt/blackbox_exporter/Makefile (contents, props changed) head/net-mgmt/blackbox_exporter/distinfo (contents, props changed) head/net-mgmt/blackbox_exporter/files/ head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in (contents, props changed) head/net-mgmt/blackbox_exporter/pkg-descr (contents, props changed) head/net-mgmt/blackbox_exporter/pkg-plist (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Mon Jul 17 20:25:49 2017 (r446113) +++ head/net-mgmt/Makefile Mon Jul 17 20:30:12 2017 (r446114) @@ -19,6 +19,7 @@ SUBDIR += bgpq SUBDIR += bgpq3 SUBDIR += bgpuma + SUBDIR += blackbox_exporter SUBDIR += bpft SUBDIR += braa SUBDIR += bsnmp-jails Added: head/net-mgmt/blackbox_exporter/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/blackbox_exporter/Makefile Mon Jul 17 20:30:12 2017 (r446114) @@ -0,0 +1,33 @@ +# Created by: Boris Samorodov +# $FreeBSD$ + +PORTNAME= blackbox_exporter +PORTVERSION= 0.6.0 +DISTVERSIONPREFIX=v +CATEGORIES= net-mgmt + +MAINTAINER= bsam@FreeBSD.org +COMMENT= Prometheus exporter for endpoints over HTTP(S), DNS, TCP and ICMP + +LICENSE= APACHE20 + +USES= go +USE_GITHUB= yes + +GH_ACCOUNT= prometheus + +GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} +GO_TARGET= github.com/${GH_ACCOUNT}/${PORTNAME} + +USE_RC_SUBR= ${PORTNAME} + +STRIP= # stripping can break go binaries + +PORTEXAMPLES= ${WRKSRC}/*.yml + +do-install: + ${INSTALL_PROGRAM} ${WRKDIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/*.yml ${STAGEDIR}${EXAMPLESDIR} + +.include Added: head/net-mgmt/blackbox_exporter/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/blackbox_exporter/distinfo Mon Jul 17 20:30:12 2017 (r446114) @@ -0,0 +1,3 @@ +TIMESTAMP = 1500301013 +SHA256 (prometheus-blackbox_exporter-v0.6.0_GH0.tar.gz) = 0f7711b1994873aef6db4480a2fcb0635cd2e35244c84b3e02836214b4df4a1d +SIZE (prometheus-blackbox_exporter-v0.6.0_GH0.tar.gz) = 948058 Added: head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in Mon Jul 17 20:30:12 2017 (r446114) @@ -0,0 +1,55 @@ +#!/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 ":9115". +# blackbox_exporter_config (string): Set configuration file of blackbox_exporter +# 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:=":9115"} +: ${blackbox_exporter_config:="%%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} \ + ${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 +} + +load_rc_config $name +run_rc_command "$1" Added: head/net-mgmt/blackbox_exporter/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/blackbox_exporter/pkg-descr Mon Jul 17 20:30:12 2017 (r446114) @@ -0,0 +1,5 @@ +blackbox_exporter is a prometheus exporter. The blackbox exporter +allows blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and +ICMP. + +WWW: https://github.com/prometheus/blackbox_exporter Added: head/net-mgmt/blackbox_exporter/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/blackbox_exporter/pkg-plist Mon Jul 17 20:30:12 2017 (r446114) @@ -0,0 +1,4 @@ +bin/blackbox_exporter +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blackbox.yml +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/circle.yml +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example.yml