# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # prometheus2 # prometheus2/pkg-descr # prometheus2/pkg-message # prometheus2/distinfo # prometheus2/files # prometheus2/files/prometheus2.in # prometheus2/Makefile # prometheus2/pkg-plist # echo c - prometheus2 mkdir -p prometheus2 > /dev/null 2>&1 echo x - prometheus2/pkg-descr sed 's/^X//' >prometheus2/pkg-descr << '5096e5d6235bdb35be63d43ad32fc23e' XPrometheus is a systems and service monitoring system. It collects metrics Xfrom configured targets at given intervals, evaluates rule expressions, Xdisplays the results, and can trigger alerts if some condition is observed Xto be true. X XPrometheus' main distinguishing features as compared to other monitoring Xsystems are: X X- a multi-dimensional data model (timeseries defined by metric name and X set of key/value dimensions) X- a flexible query language to leverage this dimensionality X- no dependency on distributed storage; single server nodes are autonomous X- timeseries collection happens via a pull model over HTTP X- pushing timeseries is supported via an intermediary gateway X- targets are discovered via service discovery or static configuration X- multiple modes of graphing and dashboarding support X- support for hierarchical and horizontal federation X XWWW: https://prometheus.io/ 5096e5d6235bdb35be63d43ad32fc23e echo x - prometheus2/pkg-message sed 's/^X//' >prometheus2/pkg-message << '4d53c27abc41efd9682c192a49e61717' XIf you are a user of Prometheus 1.x, the following information may be relevant. X XPrometheus 2.0 contains a number of breaking changes, including: X - Changes to how command line flags are parsed X - Removal of some command line flags X - Alert Manager options moved into prometheus.yaml X - Alerting / Recording Rules format changes X - Rules are now in YAML format X - Changes to the storage engine X - These changes mean that old data will be unreadable by Prometheus 2, X refer to the Prometheus 2 migration guide for more information on this X issue X XYou will likely wish to review the Prometheus 2.0 migration guide at Xhttps://prometheus.io/docs/prometheus/2.0/migration/ X XMaking this migration path available to users is the primary reason for the Xcreation of this prometheus2 port and is why the various binaries, files, Xdirectories, and rc variables have been renamed to include 2 in their names. XThis enables you to run the prometheus 1.x package for the migration path for Xas long as needed. 4d53c27abc41efd9682c192a49e61717 echo x - prometheus2/distinfo sed 's/^X//' >prometheus2/distinfo << '794e9532bfcd4e0a68afb51e2e3fee22' XTIMESTAMP = 1516749966 XSHA256 (prometheus-prometheus-v2.1.0_GH0.tar.gz) = c6fc92d695c9af30574eb41af5e0e89f4fde9a04a3169ba58aa2b2f80d5862a4 XSIZE (prometheus-prometheus-v2.1.0_GH0.tar.gz) = 5669858 794e9532bfcd4e0a68afb51e2e3fee22 echo c - prometheus2/files mkdir -p prometheus2/files > /dev/null 2>&1 echo x - prometheus2/files/prometheus2.in sed 's/^X//' >prometheus2/files/prometheus2.in << 'f525d1ec90c62806b04b24498825bac5' X#!/bin/sh X X# PROVIDE: prometheus2 X# REQUIRE: LOGIN X# KEYWORD: shutdown X# X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf X# to enable this service: X# X# prometheus2_enable (bool): Set to NO by default X# Set it to YES to enable prometheus X# prometheus2_user (string): Set user to run prometheus X# Default is "prometheus" X# prometheus2_group (string): Set group to run prometheus X# Default is "prometheus" X# prometheus2_data_dir (string): Set dir to run prometheus in X# Default is "/var/db/prometheus2" X# prometheus2_log_file (string): Set file that prometheus will log to X# Default is "/var/log/prometheus2.log" X# prometheus2_args (string): Set additional command line arguments X# Default is "" X X. /etc/rc.subr X Xname=prometheus2 Xrcvar=prometheus2_enable X Xload_rc_config $name X X: ${prometheus2_enable:="NO"} X: ${prometheus2_user:="prometheus"} X: ${prometheus2_group:="prometheus"} X: ${prometheus2_config:="%%PREFIX%%/etc/prometheus2.yml"} X: ${prometheus2_data_dir:="/var/db/prometheus2"} X: ${prometheus2_log_file:="/var/log/prometheus2.log"} X: ${prometheus2_args:=""} X Xpidfile=/var/run/prometheus2.pid Xrequired_files="${prometheus_config}" Xcommand="/usr/sbin/daemon" Xprocname="%%PREFIX%%/bin/prometheus2" Xsig_reload=HUP Xextra_commands="reload" Xcommand_args="-p ${pidfile} /usr/bin/env ${procname} \ X --config.file=${prometheus2_config} \ X --storage.tsdb.path=${prometheus2_data_dir} \ X ${prometheus2_args} >> ${prometheus2_log_file} 2>&1" X Xstart_precmd=prometheus_startprecmd X Xprometheus_startprecmd() X{ X if [ ! -e ${pidfile} ]; then X install \ X -o ${prometheus2_user} \ X -g ${prometheus2_group} \ X /dev/null ${pidfile}; X fi X if [ ! -f "${prometheus2_log_file}" ]; then X install \ X -o ${prometheus2_user} \ X -g ${prometheus2_group} \ X -m 640 \ X /dev/null ${prometheus2_log_file}; X fi X if [ ! -d ${prometheus2_data_dir} ]; then X install \ X -d \ X -o ${prometheus2_user} \ X -g ${prometheus2_group} \ X -m 750 \ X ${prometheus2_data_dir} X fi X} X Xload_rc_config $name Xrun_rc_command "$1" f525d1ec90c62806b04b24498825bac5 echo x - prometheus2/Makefile sed 's/^X//' >prometheus2/Makefile << '7074d679dc2cabca898a86bd6009034d' X# $FreeBSD$ X XPORTNAME= prometheus2 XPORTVERSION= 2.1.0 XDISTVERSIONPREFIX= v XCATEGORIES= net-mgmt X XMAINTAINER= dor.bsd@xm0.uk XCOMMENT= Systems monitoring and alerting toolkit X XLICENSE= APACHE20 XLICENSE_FILE= ${WRKSRC}/LICENSE X XUSES= go gmake XUSE_GITHUB= yes XGH_ACCOUNT= prometheus XGH_PROJECT= prometheus X XGO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} X XUSE_RC_SUBR= prometheus2 X XUSERS= prometheus XGROUPS= prometheus X XBUILD_DATE!= date "+%Y%M%d-%H:%M:%S" XLD_FLAG_X_PREFIX= -X ${GO_PKGNAME}/vendor/github.com/prometheus/common/version XLD_FLAG_STRING= -s \ X ${LD_FLAG_X_PREFIX}.Version=${PORTVERSION} \ X ${LD_FLAG_X_PREFIX}.Revision=${PORTREVISION} \ X ${LD_FLAG_X_PREFIX}.Branch=release-${PORTVERSION:R} \ X ${LD_FLAG_X_PREFIX}.BuildDate=${BUILD_DATE} \ X ${LD_FLAG_X_PREFIX}.BuildUser=${USER} Xdo-build: X ( \ X cd ${GO_WRKSRC}/cmd/prometheus ; \ X ${SETENV} ${GO_ENV} go install -ldflags "${LD_FLAG_STRING}" \ X ) X X ( \ X cd ${GO_WRKSRC}/cmd/promtool ; \ X ${SETENV} ${GO_ENV} go install -ldflags "${LD_FLAG_STRING}" \ X ) X Xdo-install: X ${INSTALL_PROGRAM} \ X ${GO_WRKDIR_BIN}/prometheus \ X ${STAGEDIR}${PREFIX}/bin/prometheus2 X X ${INSTALL_PROGRAM} \ X ${GO_WRKDIR_BIN}/promtool \ X ${STAGEDIR}${PREFIX}/bin/promtool2 X X ${INSTALL_DATA} \ X ${WRKSRC}/documentation/examples/prometheus.yml \ X ${STAGEDIR}${LOCALBASE}/etc/prometheus2.yml.sample X X ${MKDIR} ${STAGEDIR}${DESTDIR}/var/db/prometheus2 X X.include 7074d679dc2cabca898a86bd6009034d echo x - prometheus2/pkg-plist sed 's/^X//' >prometheus2/pkg-plist << 'f73995300bc44fbd57bcd452bfd17f51' Xbin/prometheus2 Xbin/promtool2 X@sample etc/prometheus2.yml.sample X@dir(prometheus,prometheus) /var/db/prometheus2 f73995300bc44fbd57bcd452bfd17f51 exit