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 (+39 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
GO_PKGNAME=	github.com/${PORTNAME}/${PORTNAME}
18
19
PLIST_FILES=	bin/prometheus \
20
		bin/promtool \
21
		etc/prometheus.yml
22
23
USE_RC_SUBR=	prometheus
24
25
USERS=		prometheus
26
GROUPS=		prometheus
27
28
STRIP=		# stripping can break go binaries
29
30
do-build:
31
	(cd ${GO_WRKSRC}/cmd/prometheus ; ${SETENV} ${GO_ENV} go install)
32
	(cd ${GO_WRKSRC}/cmd/promtool ; ${SETENV} ${GO_ENV} go install)
33
34
do-install:
35
	${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/prometheus ${STAGEDIR}${PREFIX}/bin
36
	${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/promtool ${STAGEDIR}${PREFIX}/bin
37
	${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml ${STAGEDIR}${LOCALBASE}/etc
38
39
.include <bsd.port.mk>
(-)net-mgmt/prometheus/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1474654640
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/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