Date: Sat, 15 Oct 2016 05:09:11 +0000 (UTC) From: Kurt Jaeger <pi@FreeBSD.org> 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 Message-ID: <201610150509.u9F59BiJ061529@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <jev@ecadlabs.com> 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 <ports@ecadlabs.com> +# $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 <bsd.port.mk> 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610150509.u9F59BiJ061529>