From owner-svn-ports-head@freebsd.org Sat Oct 15 05:09:13 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 67E28C12481; Sat, 15 Oct 2016 05:09:13 +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 1ECE06B9; Sat, 15 Oct 2016 05:09:13 +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 u9F59CcW061536; Sat, 15 Oct 2016 05:09:12 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9F59BiJ061529; Sat, 15 Oct 2016 05:09:11 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201610150509.u9F59BiJ061529@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:09:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r424001 - in head: . net-mgmt net-mgmt/prometheus net-mgmt/prometheus/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:09:13 -0000 Author: pi Date: Sat Oct 15 05:09:11 2016 New Revision: 424001 URL: https://svnweb.freebsd.org/changeset/ports/424001 Log: New port: net-mgmt/prometheus Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true. Prometheus' main distinguishing features as compared to other monitoring systems are: - a multi-dimensional data model (timeseries defined by metric name and set of key/value dimensions) - a flexible query language to leverage this dimensionality - no dependency on distributed storage; single server nodes are autonomous - timeseries collection happens via a pull model over HTTP - pushing timeseries is supported via an intermediary gateway - targets are discovered via service discovery or static configuration - multiple modes of graphing and dashboarding support - support for hierarchical and horizontal federation WWW: https://prometheus.io/ PR: 212468 Submitted by: Jev Bjoersell Added: head/net-mgmt/prometheus/ head/net-mgmt/prometheus/Makefile (contents, props changed) head/net-mgmt/prometheus/distinfo (contents, props changed) head/net-mgmt/prometheus/files/ head/net-mgmt/prometheus/files/prometheus.in (contents, props changed) head/net-mgmt/prometheus/pkg-descr (contents, props changed) Modified: head/GIDs head/UIDs head/net-mgmt/Makefile Modified: head/GIDs ============================================================================== --- head/GIDs Sat Oct 15 04:49:01 2016 (r424000) +++ head/GIDs Sat Oct 15 05:09:11 2016 (r424001) @@ -419,7 +419,7 @@ nomad:*:472: # free: 475 # free: 476 # free: 477 -# free: 478 +prometheus:*:478: # free: 479 # free: 480 # free: 481 Modified: head/UIDs ============================================================================== --- head/UIDs Sat Oct 15 04:49:01 2016 (r424000) +++ head/UIDs Sat Oct 15 05:09:11 2016 (r424001) @@ -424,7 +424,7 @@ nomad:*:472:472::0:0:Nomad Daemon:/var/t # free: 475 # free: 476 # free: 477 -# free: 478 +prometheus:*:478:478::0:0:Prometheus Daemon:/var/tmp/prometheus:/usr/sbin/nologin # free: 479 # free: 480 # free: 481 Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Sat Oct 15 04:49:01 2016 (r424000) +++ head/net-mgmt/Makefile Sat Oct 15 05:09:11 2016 (r424001) @@ -271,6 +271,7 @@ SUBDIR += pnp-icinga SUBDIR += pnp-icinga2 SUBDIR += portmon + SUBDIR += prometheus SUBDIR += py-flowtools SUBDIR += py-ipcalc SUBDIR += py-ipy Added: head/net-mgmt/prometheus/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/prometheus/Makefile Sat Oct 15 05:09:11 2016 (r424001) @@ -0,0 +1,39 @@ +# Created by: Jev Björsell +# $FreeBSD$ + +PORTNAME= prometheus +PORTVERSION= 1.2.1 +DISTVERSIONPREFIX= v +CATEGORIES= net-mgmt + +MAINTAINER= ports@ecadlabs.com +COMMENT= Systems monitoring and alerting toolkit + +LICENSE= APACHE20 + +USES= go gmake +USE_GITHUB= yes + +GO_PKGNAME= github.com/${PORTNAME}/${PORTNAME} + +PLIST_FILES= bin/prometheus \ + bin/promtool \ + etc/prometheus.yml + +USE_RC_SUBR= prometheus + +USERS= prometheus +GROUPS= prometheus + +STRIP= # stripping can break go binaries + +do-build: + (cd ${GO_WRKSRC}/cmd/prometheus ; ${SETENV} ${GO_ENV} go install) + (cd ${GO_WRKSRC}/cmd/promtool ; ${SETENV} ${GO_ENV} go install) + +do-install: + ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/prometheus ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/promtool ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml ${STAGEDIR}${LOCALBASE}/etc + +.include Added: head/net-mgmt/prometheus/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/prometheus/distinfo Sat Oct 15 05:09:11 2016 (r424001) @@ -0,0 +1,3 @@ +TIMESTAMP = 1476506739 +SHA256 (prometheus-prometheus-v1.2.1_GH0.tar.gz) = d94b0904fde618ab1c9a2e1bec98da00bb9a29faf621db55dfa313346526f91a +SIZE (prometheus-prometheus-v1.2.1_GH0.tar.gz) = 2638657 Added: head/net-mgmt/prometheus/files/prometheus.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/prometheus/files/prometheus.in Sat Oct 15 05:09:11 2016 (r424001) @@ -0,0 +1,65 @@ +#!/bin/sh + +# PROVIDE: prometheus +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# prometheus_enable (bool): Set to NO by default +# Set it to YES to enable prometheus +# prometheus_user (string): Set user to run prometheus +# Default is "prometheus" +# prometheus_group (string): Set group to run prometheus +# Default is "prometheus" +# prometheus_data_dir (string): Set dir to run prometheus in +# Default is "/var/tmp/prometheus" +# prometheus_log_file (string): Set file that prometheus will log to +# Default is "/var/log/prometheus.log" +# prometheus_args (string): Set additional command line arguments +# Default is "" + +. /etc/rc.subr + +name=prometheus +rcvar=prometheus_enable + +load_rc_config $name + +: ${prometheus_enable:="NO"} +: ${prometheus_user:="prometheus"} +: ${prometheus_group:="prometheus"} +: ${prometheus_config:="%%PREFIX%%/etc/prometheus.yml"} +: ${prometheus_data_dir:="/var/db/prometheus"} +: ${prometheus_log_file:="/var/log/prometheus.log"} +: ${prometheus_args:=""} + +pidfile=/var/run/prometheus.pid +required_files="${prometheus_config}" +command="/usr/sbin/daemon" +procname="%%PREFIX%%/bin/prometheus" +sig_reload=HUP +extra_commands="reload" +command_args="-p ${pidfile} /usr/bin/env ${procname} \ + -config.file=${prometheus_config} \ + -storage.local.path=${prometheus_data_dir} \ + ${prometheus_args} > ${prometheus_log_file} 2>&1" + +start_precmd=prometheus_startprecmd + +prometheus_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${prometheus_user} -g ${prometheus_group} /dev/null ${pidfile}; + fi + if [ ! -f "${prometheus_log_file}" ]; then + install -o ${prometheus_user} -g ${prometheus_group} -m 640 /dev/null ${prometheus_log_file}; + fi + if [ ! -d ${prometheus_data_dir} ]; then + install -d -o ${prometheus_user} -g ${prometheus_group} -m 750 ${prometheus_data_dir} + fi +} + +load_rc_config $name +run_rc_command "$1" Added: head/net-mgmt/prometheus/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/prometheus/pkg-descr Sat Oct 15 05:09:11 2016 (r424001) @@ -0,0 +1,19 @@ +Prometheus is a systems and service monitoring system. It collects metrics +from configured targets at given intervals, evaluates rule expressions, +displays the results, and can trigger alerts if some condition is observed +to be true. + +Prometheus' main distinguishing features as compared to other monitoring +systems are: + +- a multi-dimensional data model (timeseries defined by metric name and + set of key/value dimensions) +- a flexible query language to leverage this dimensionality +- no dependency on distributed storage; single server nodes are autonomous +- timeseries collection happens via a pull model over HTTP +- pushing timeseries is supported via an intermediary gateway +- targets are discovered via service discovery or static configuration +- multiple modes of graphing and dashboarding support +- support for hierarchical and horizontal federation + +WWW: https://prometheus.io/