View | Details | Raw Unified | Return to bug 212468 | Differences between
and this patch

Collapse All | Expand All

(-)GIDs (-1 / +1 lines)
Lines 419-425 Link Here
419
# free: 475
419
# free: 475
420
# free: 476
420
# free: 476
421
# free: 477
421
# free: 477
422
# free: 478
422
prometheus:*:478:
423
# free: 479
423
# free: 479
424
# free: 480
424
# free: 480
425
# free: 481
425
# free: 481
(-)UIDs (-1 / +1 lines)
Lines 424-430 Link Here
424
# free: 475
424
# free: 475
425
# free: 476
425
# free: 476
426
# free: 477
426
# free: 477
427
# free: 478
427
prometheus:*:478:478::0:0:Prometheus Daemon:/var/tmp/prometheus:/usr/sbin/nologin
428
# free: 479
428
# free: 479
429
# free: 480
429
# free: 480
430
# free: 481
430
# free: 481
(-)net-mgmt/prometheus/Makefile (+40 lines)
Line 0 Link Here
1
# Created by: Jev Björsell <ports@ecadlabs.com>
2
# $FreeBSD$
3
4
PORTNAME=	prometheus
5
PORTVERSION=	1.1.3
6
DISTVERSIONPREFIX=	v
7
CATEGORIES=	net-mgmt
8
9
MAINTAINER=	ports@ecadlabs.com
10
COMMENT=	Systems monitoring and alerting toolkit
11
12
LICENSE=	APACHE20
13
14
USES=		go gmake
15
USE_GITHUB=	yes
16
17
GH_PROJECT=	prometheus
18
19
GO_PKGNAME=	github.com/${GH_ACCOUNT}/${PORTNAME}
20
21
PLIST_FILES=	bin/prometheus \
22
		bin/promtool \
23
		etc/prometheus.yml
24
25
USE_RC_SUBR=	prometheus
26
27
USERS=		prometheus
28
GROUPS=		prometheus
29
30
STRIP=		# stripping can break go binaries
31
32
do-build:
33
	(cd ${GO_WRKSRC} ; ${SETENV} ${GO_ENV} PREFIX=${GO_WRKSRC} ${GMAKE} build)
34
35
do-install:
36
	${INSTALL_PROGRAM} ${WRKSRC}/promtool ${STAGEDIR}${PREFIX}/bin
37
	${INSTALL_PROGRAM} ${WRKSRC}/prometheus ${STAGEDIR}${PREFIX}/bin
38
	${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml ${STAGEDIR}${LOCALBASE}/etc
39
40
.include <bsd.port.mk>
(-)net-mgmt/prometheus/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1474579163
2
SHA256 (prometheus-prometheus-v1.1.3_GH0.tar.gz) = 6a27ddc47c90a50090fc787300fd79ae97e1fa172e0544cc1cc021f8104a64a3
3
SIZE (prometheus-prometheus-v1.1.3_GH0.tar.gz) = 2556454
(-)net-mgmt/prometheus/files/patch-Makefile (+11 lines)
Line 0 Link Here
1
--- Makefile.orig	2016-09-09 15:46:12 UTC
2
+++ Makefile
3
@@ -13,7 +13,7 @@
4
 
5
 GO           := GO15VENDOREXPERIMENT=1 go
6
 FIRST_GOPATH := $(firstword $(subst :, ,$(GOPATH)))
7
-PROMU        := $(FIRST_GOPATH)/bin/promu
8
+PROMU        := $(FIRST_GOPATH)/bin/promu -v
9
 pkgs          = $(shell $(GO) list ./... | grep -v /vendor/)
10
 
11
 PREFIX                  ?= $(shell pwd)
(-)net-mgmt/prometheus/files/prometheus.in (+65 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# PROVIDE: prometheus
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
#
7
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
8
# to enable this service:
9
#
10
# prometheus_enable (bool):     Set to NO by default
11
#                               Set it to YES to enable prometheus
12
# prometheus_user (string):     Set user to run prometheus
13
#                               Default is "prometheus"
14
# prometheus_group (string):    Set group to run prometheus
15
#                               Default is "prometheus"
16
# prometheus_data_dir (string): Set dir to run prometheus in
17
#                               Default is "/var/tmp/prometheus"
18
# prometheus_log_file (string): Set file that prometheus will log to
19
#                               Default is "/var/log/prometheus.log"
20
# prometheus_args (string):     Set additional command line arguments
21
#                               Default is ""
22
23
. /etc/rc.subr
24
25
name=prometheus
26
rcvar=prometheus_enable
27
28
load_rc_config $name
29
30
: ${prometheus_enable:="NO"}
31
: ${prometheus_user:="prometheus"}
32
: ${prometheus_group:="prometheus"}
33
: ${prometheus_config:="%%PREFIX%%/etc/prometheus.yml"}
34
: ${prometheus_data_dir:="/var/db/prometheus"}
35
: ${prometheus_log_file:="/var/log/prometheus.log"}
36
: ${prometheus_args:=""}
37
38
pidfile=/var/run/prometheus.pid
39
required_files="${prometheus_config}"
40
command="/usr/sbin/daemon"
41
procname="%%PREFIX%%/bin/prometheus"
42
sig_reload=HUP
43
extra_commands="reload"
44
command_args="-p ${pidfile} /usr/bin/env ${procname} \
45
                -config.file=${prometheus_config} \
46
                -storage.local.path=${prometheus_data_dir} \
47
                ${prometheus_args} > ${prometheus_log_file} 2>&1"
48
49
start_precmd=prometheus_startprecmd
50
51
prometheus_startprecmd()
52
{
53
    if [ ! -e ${pidfile} ]; then
54
        install -o ${prometheus_user} -g ${prometheus_group} /dev/null ${pidfile};
55
    fi
56
    if [ ! -f "${prometheus_log_file}" ]; then
57
        install -o ${prometheus_user} -g ${prometheus_group} -m 640 /dev/null ${prometheus_log_file};
58
    fi
59
    if [ ! -d ${prometheus_data_dir} ]; then
60
        install -d -o ${prometheus_user} -g ${prometheus_group} -m 750 ${prometheus_data_dir}
61
    fi
62
}
63
64
load_rc_config $name
65
run_rc_command "$1"
(-)net-mgmt/prometheus/pkg-descr (+19 lines)
Line 0 Link Here
1
Prometheus is a systems and service monitoring system. It collects metrics
2
from configured targets at given intervals, evaluates rule expressions,
3
displays the results, and can trigger alerts if some condition is observed
4
to be true.
5
6
Prometheus' main distinguishing features as compared to other monitoring
7
systems are:
8
9
- a multi-dimensional data model (timeseries defined by metric name and
10
  set of key/value dimensions) 
11
- a flexible query language to leverage this dimensionality 
12
- no dependency on distributed storage; single server nodes are autonomous
13
- timeseries collection happens via a pull model over HTTP
14
- pushing timeseries is supported via an intermediary gateway
15
- targets are discovered via service discovery or static configuration
16
- multiple modes of graphing and dashboarding support
17
- support for hierarchical and horizontal federation
18
19
WWW: https://prometheus.io/

Return to bug 212468