From owner-svn-ports-head@freebsd.org Sun Dec 8 10:28:15 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D79291DFAC1; Sun, 8 Dec 2019 10:28:15 +0000 (UTC) (envelope-from joneum@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47W2bM5KZNz3PXc; Sun, 8 Dec 2019 10:28:15 +0000 (UTC) (envelope-from joneum@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 971F1B60; Sun, 8 Dec 2019 10:28:15 +0000 (UTC) (envelope-from joneum@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xB8ASFZ2028334; Sun, 8 Dec 2019 10:28:15 GMT (envelope-from joneum@FreeBSD.org) Received: (from joneum@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xB8ASDjW028323; Sun, 8 Dec 2019 10:28:13 GMT (envelope-from joneum@FreeBSD.org) Message-Id: <201912081028.xB8ASDjW028323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: joneum set sender to joneum@FreeBSD.org using -f From: Jochen Neumeister Date: Sun, 8 Dec 2019 10:28:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r519285 - in head/www: . nginx-vts-exporter nginx-vts-exporter/files X-SVN-Group: ports-head X-SVN-Commit-Author: joneum X-SVN-Commit-Paths: in head/www: . nginx-vts-exporter nginx-vts-exporter/files X-SVN-Commit-Revision: 519285 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.29 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: Sun, 08 Dec 2019 10:28:15 -0000 Author: joneum Date: Sun Dec 8 10:28:13 2019 New Revision: 519285 URL: https://svnweb.freebsd.org/changeset/ports/519285 Log: New Port: www/nginx-vts-exportr Simple server that scrapes Nginx vts stats and exports them via HTTP for Prometheus consumption. WWW: https://github.com/hnlq715/nginx-vts-exporter Sponsored by: Netzkommune GmbH Differential Revision: https://reviews.freebsd.org/D22705 Added: head/www/nginx-vts-exporter/ head/www/nginx-vts-exporter/Makefile (contents, props changed) head/www/nginx-vts-exporter/distinfo (contents, props changed) head/www/nginx-vts-exporter/files/ head/www/nginx-vts-exporter/files/newsyslog.conf.in (contents, props changed) head/www/nginx-vts-exporter/files/nginx_vts_exporter.in (contents, props changed) head/www/nginx-vts-exporter/files/syslog.d.conf.in (contents, props changed) head/www/nginx-vts-exporter/pkg-descr (contents, props changed) head/www/nginx-vts-exporter/pkg-message (contents, props changed) Modified: head/www/Makefile Modified: head/www/Makefile ============================================================================== --- head/www/Makefile Sun Dec 8 10:19:38 2019 (r519284) +++ head/www/Makefile Sun Dec 8 10:28:13 2019 (r519285) @@ -453,6 +453,7 @@ SUBDIR += nginx-lite SUBDIR += nginx-naxsi SUBDIR += nginx-prometheus-exporter + SUBDIR += nginx-vts-exporter SUBDIR += nibbleblog SUBDIR += nift SUBDIR += node Added: head/www/nginx-vts-exporter/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-vts-exporter/Makefile Sun Dec 8 10:28:13 2019 (r519285) @@ -0,0 +1,54 @@ +# $FreeBSD$ + +PORTNAME= nginx-vts-exporter +DISTVERSIONPREFIX= v +DISTVERSION= 0.10.3 +CATEGORIES= www + +MAINTAINER= joneum@FreeBSD.org +COMMENT= Server that scraps NGINX vts stats and export them via HTTP + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= gmake go +USE_RC_SUBR= nginx_vts_exporter +USE_GITHUB= yes +GH_ACCOUNT= hnlq715 + +GO_BUILDFLAGS= -v -ldflags "${LD_FLAG_STRING}" + +SUB_FILES= newsyslog.conf nginx_vts_exporter syslog.d.conf + +SUB_LIST= NGINX_VTS_EXPORTER_LOG_FILE=/var/log/nginx_vts_exporter \ + NGINX_VTS_EXPORTER_LOG_TAG=nginx_vts_exporter + +BUILD_USER?= ${USER} +LD_FLAG_X_PREFIX= -X ${GO_PKGNAME}/vendor/github.com/prometheus/common/version +LD_FLAG_STRING= -s \ + ${LD_FLAG_X_PREFIX}.Branch=release-${PORTVERSION:R} \ + ${LD_FLAG_X_PREFIX}.BuildUser=${BUILD_USER} \ + ${LD_FLAG_X_PREFIX}.Revision=${PORTREVISION} \ + ${LD_FLAG_X_PREFIX}.Version=${PORTVERSION} + +PLIST_FILES= bin/nginx_vts_exporter \ + etc/newsyslog.conf.d/nginx-vts-exporter.conf \ + etc/syslog.d/nginx-vts-exporter.conf + +do-install: + ${INSTALL_PROGRAM} \ + ${GO_WRKDIR_BIN}/${PORTNAME} \ + ${STAGEDIR}${PREFIX}/bin/nginx_vts_exporter + + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/syslog.d + + ${INSTALL_DATA} \ + ${WRKDIR}/newsyslog.conf \ + ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/${PORTNAME}.conf + + ${INSTALL_DATA} \ + ${WRKDIR}/syslog.d.conf \ + ${STAGEDIR}${PREFIX}/etc/syslog.d/${PORTNAME}.conf + +.include Added: head/www/nginx-vts-exporter/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-vts-exporter/distinfo Sun Dec 8 10:28:13 2019 (r519285) @@ -0,0 +1,3 @@ +TIMESTAMP = 1575626942 +SHA256 (hnlq715-nginx-vts-exporter-v0.10.3_GH0.tar.gz) = a07e0a6170ac490f96a8e505795dcbfa0233976cf1efd36057014cff49622d95 +SIZE (hnlq715-nginx-vts-exporter-v0.10.3_GH0.tar.gz) = 149578 Added: head/www/nginx-vts-exporter/files/newsyslog.conf.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-vts-exporter/files/newsyslog.conf.in Sun Dec 8 10:28:13 2019 (r519285) @@ -0,0 +1,4 @@ +# newsyslog(8) file for net-mgmt/nginx-vts-exporter +# See newsyslog.conf(5) for details. + +%%NGINX_VTS_EXPORTER_LOG_FILE%% 640 7 * @T00 JC Added: head/www/nginx-vts-exporter/files/nginx_vts_exporter.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-vts-exporter/files/nginx_vts_exporter.in Sun Dec 8 10:28:13 2019 (r519285) @@ -0,0 +1,52 @@ +#!/bin/sh + +# PROVIDE: nginx_vts_exporter +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# nginx_vts_exporter_enable (bool): Set to NO by default +# Set it to YES to enable nginx-vts-exporter +# nginx_vts_exporter_user (string): Set user to run nginx-vts-exporter +# Default is "nobody" +# nginx_vts_exporter_group (string): Set group to run nginx-vts-exporter +# Default is "nobody" +# nginx_vts_exporter_args (string): Set additional command line arguments +# Default is "" +# + +. /etc/rc.subr + +name=nginx_vts_exporter +rcvar=nginx_vts_exporter_enable + +load_rc_config $name + +: ${nginx_vts_exporter_enable:="NO"} +: ${nginx_vts_exporter_user:="nobody"} +: ${nginx_vts_exporter_group:="nobody"} +: ${nginx_vts_exporter_args:=""} + +pidfile="/var/run/${name}.pid" +command="/usr/sbin/daemon" +procname="%%PREFIX%%/bin/${name}" +command_args="-p ${pidfile} -m 3 -T ${name} \ + /usr/bin/env ${procname} \ + ${nginx_vts_exporter_args}" + +start_precmd=nginx_vts_exporter_startprecmd + +nginx_vts_exporter_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install \ + -o ${nginx_vts_exporter_user} \ + -g ${nginx_vts_exporter_group} \ + /dev/null ${pidfile}; + fi +} + +load_rc_config $name +run_rc_command "$1" Added: head/www/nginx-vts-exporter/files/syslog.d.conf.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-vts-exporter/files/syslog.d.conf.in Sun Dec 8 10:28:13 2019 (r519285) @@ -0,0 +1,6 @@ +# syslogd(8) configuration file for net-mgmt/nginx-vts-exporter +# +# See syslog.conf(5) for details. + +!%%NGINX_VTS_EXPORTER_LOG_TAG%% +daemon.* %%NGINX_VTS_EXPORTER_LOG_FILE%% Added: head/www/nginx-vts-exporter/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-vts-exporter/pkg-descr Sun Dec 8 10:28:13 2019 (r519285) @@ -0,0 +1,4 @@ +Simple server that scrapes Nginx vts stats and exports +them via HTTP for Prometheus consumption. + +WWW: https://github.com/hnlq715/nginx-vts-exporter Added: head/www/nginx-vts-exporter/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx-vts-exporter/pkg-message Sun Dec 8 10:28:13 2019 (r519285) @@ -0,0 +1,13 @@ +[ +{ type: install + message: <