From owner-svn-ports-head@freebsd.org Sat Oct 15 05:24:31 2016 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 852FDC128E3; Sat, 15 Oct 2016 05:24:31 +0000 (UTC) (envelope-from pi@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 46062D76; Sat, 15 Oct 2016 05:24:31 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9F5OUko068836; Sat, 15 Oct 2016 05:24:30 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9F5OTlU068831; Sat, 15 Oct 2016 05:24:29 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201610150524.u9F5OTlU068831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Sat, 15 Oct 2016 05:24:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r424002 - in head/sysutils: . node_exporter node_exporter/files X-SVN-Group: ports-head 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: Sat, 15 Oct 2016 05:24:31 -0000 Author: pi Date: Sat Oct 15 05:24:29 2016 New Revision: 424002 URL: https://svnweb.freebsd.org/changeset/ports/424002 Log: New port: sysutils/node_exporter node_exporter is a prometheus exporter for machine metrics, written in Go with pluggable metric collectors. WWW: https://github.com/prometheus/node_exporter PR: 212467 Submitted by: Jev Bjoersell Added: head/sysutils/node_exporter/ head/sysutils/node_exporter/Makefile (contents, props changed) head/sysutils/node_exporter/distinfo (contents, props changed) head/sysutils/node_exporter/files/ head/sysutils/node_exporter/files/node_exporter.in (contents, props changed) head/sysutils/node_exporter/pkg-descr (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Sat Oct 15 05:09:11 2016 (r424001) +++ head/sysutils/Makefile Sat Oct 15 05:24:29 2016 (r424002) @@ -648,6 +648,7 @@ SUBDIR += nfsping SUBDIR += nitrogen SUBDIR += no-login + SUBDIR += node_exporter SUBDIR += nomad SUBDIR += npadmin SUBDIR += nrg2iso Added: head/sysutils/node_exporter/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/node_exporter/Makefile Sat Oct 15 05:24:29 2016 (r424002) @@ -0,0 +1,30 @@ +# Created by: Jev Björsell +# $FreeBSD$ + +PORTNAME= node_exporter +PORTVERSION= 0.12.0 +CATEGORIES= sysutils + +MAINTAINER= ports@ecadlabs.com +COMMENT= Prometheus exporter for machine metrics + +LICENSE= APACHE20 + +USES= go +USE_GITHUB= yes + +GH_ACCOUNT= prometheus + +GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} +GO_TARGET= github.com/${GH_ACCOUNT}/${PORTNAME} + +PLIST_FILES= bin/node_exporter + +USE_RC_SUBR= node_exporter + +STRIP= # stripping can break go binaries + +do-install: + ${INSTALL_PROGRAM} ${WRKDIR}/bin/node_exporter ${STAGEDIR}${PREFIX}/bin + +.include Added: head/sysutils/node_exporter/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/node_exporter/distinfo Sat Oct 15 05:24:29 2016 (r424002) @@ -0,0 +1,3 @@ +TIMESTAMP = 1473276147 +SHA256 (prometheus-node_exporter-0.12.0_GH0.tar.gz) = 75e522aa29ec9bd0ea400517d1d556f1e5d0dfc9bc02d9406a1c6c426c80a508 +SIZE (prometheus-node_exporter-0.12.0_GH0.tar.gz) = 735286 Added: head/sysutils/node_exporter/files/node_exporter.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/node_exporter/files/node_exporter.in Sat Oct 15 05:24:29 2016 (r424002) @@ -0,0 +1,59 @@ +#!/bin/sh + +# PROVIDE: node_exporter +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# node_exporter_enable (bool): Set to NO by default. +# Set it to YES to enable node_exporter. +# node_exporter_user (string): Set user that node_exporter will run under +# Default is "nobody". +# node_exporter_group (string): Set group that node_exporter will run under +# Default is "nobody". +# node_exporter_args (string): Set extra arguments to pass to node_exporter +# Default is "". +# node_exporter_listen_address (string):Set ip:port that node_exporter will listen on +# Default is ":9100". +# node_exporter_textfile_dir (string): Set directory that node_exporter will watch +# Default is "/var/tmp/node_exporter". + +. /etc/rc.subr + +name=node_exporter +rcvar=node_exporter_enable + +load_rc_config $name + +: ${node_exporter_enable:="NO"} +: ${node_exporter_user:="nobody"} +: ${node_exporter_group:="nobody"} +: ${node_exporter_args:=""} +: ${node_exporter_listen_address:=":9100"} +: ${node_exporter_textfile_dir:="/var/tmp/node_exporter"} + + +pidfile=/var/run/node_exporter.pid +command="/usr/sbin/daemon" +procname="%%PREFIX%%/bin/node_exporter" +command_args="-p ${pidfile} /usr/bin/env ${procname} \ + -web.listen-address=${node_exporter_listen_address} \ + -collector.textfile.directory=${node_exporter_textfile_dir} \ + ${node_exporter_args}" + +start_precmd=node_exporter_startprecmd + +node_exporter_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${node_exporter_user} -g ${node_exporter_group} /dev/null ${pidfile}; + fi + if [ ! -d ${node_exporter_textfile_dir} ]; then + install -d -o ${node_exporter_user} -g ${node_exporter_group} -m 1755 ${node_exporter_textfile_dir} + fi +} + +load_rc_config $name +run_rc_command "$1" Added: head/sysutils/node_exporter/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/node_exporter/pkg-descr Sat Oct 15 05:24:29 2016 (r424002) @@ -0,0 +1,4 @@ +node_exporter is a prometheus exporter for machine metrics, written in Go +with pluggable metric collectors. + +WWW: https://github.com/prometheus/node_exporter