pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases prometheus: import version 2.8.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2c806eb162d4
branches:  trunk
changeset: 331378:2c806eb162d4
user:      tm <tm%pkgsrc.org@localhost>
date:      Sun Mar 17 12:55:13 2019 +0000

description:
prometheus: import version 2.8.0

The Prometheus monitoring system and time series database.

Prometheus, a Cloud Native Computing Foundation project, 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.

diffstat:

 databases/Makefile                                        |   3 +-
 databases/prometheus/DESCR                                |   6 +
 databases/prometheus/Makefile                             |  54 +++++++++++++++
 databases/prometheus/PLIST                                |  16 ++++
 databases/prometheus/distinfo                             |   7 +
 databases/prometheus/patches/patch-cmd_prometheus_main.go |  35 +++++++++
 6 files changed, 120 insertions(+), 1 deletions(-)

diffs (155 lines):

diff -r ccbe7218f870 -r 2c806eb162d4 databases/Makefile
--- a/databases/Makefile        Sun Mar 17 12:20:09 2019 +0000
+++ b/databases/Makefile        Sun Mar 17 12:55:13 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.575 2019/03/05 15:55:13 taca Exp $
+# $NetBSD: Makefile,v 1.576 2019/03/17 12:55:13 tm Exp $
 
 COMMENT=       Databases
 
@@ -332,6 +332,7 @@
 SUBDIR+=       postgresql96-plpython
 SUBDIR+=       postgresql96-pltcl
 SUBDIR+=       postgresql96-server
+SUBDIR+=       prometheus
 SUBDIR+=       pxtools
 SUBDIR+=       py-PgSQL
 SUBDIR+=       py-alembic
diff -r ccbe7218f870 -r 2c806eb162d4 databases/prometheus/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/prometheus/DESCR        Sun Mar 17 12:55:13 2019 +0000
@@ -0,0 +1,6 @@
+The Prometheus monitoring system and time series database.
+
+Prometheus, a Cloud Native Computing Foundation project, 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.
diff -r ccbe7218f870 -r 2c806eb162d4 databases/prometheus/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/prometheus/Makefile     Sun Mar 17 12:55:13 2019 +0000
@@ -0,0 +1,54 @@
+# $NetBSD: Makefile,v 1.1 2019/03/17 12:55:13 tm Exp $
+
+DISTNAME=      prometheus-2.8.0
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=prometheus/}
+CATEGORIES=    databases
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/prometheus/prometheus
+COMMENT=       The Prometheus monitoring system and time series database
+LICENSE=       apache-2.0
+
+GO_DIST_BASE=  ${DISTNAME}
+GO_SRCPATH=    github.com/prometheus/prometheus
+
+PKG_SYSCONFSUBDIR=     prometheus
+
+USE_TOOLS+=    pax
+BUILD_DEFS+=   VARBASE PKG_SYSCONFDIR
+
+SUBST_CLASSES+=                paths
+SUBST_FILES.paths+=    cmd/prometheus/main.go
+SUBST_SED.paths+=      -e "s|@VARBASE@|${VARBASE}|g"
+SUBST_SED.paths+=      -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_STAGE.paths=     post-configure
+
+MAKE_DIRS+=            ${PKG_SYSCONFDIR}/consoles ${PKG_SYSCONFDIR}/console_libraries
+EXAMPLE_DIR=           share/examples/prometheus
+EXAMPLE_FILES=         prometheus.yml
+EXAMPLE_FILES+=                consoles/index.html.example consoles/node-cpu.html \
+                       consoles/node-disk.html consoles/node-overview.html \
+                       consoles/node.html consoles/prometheus-overview.html \
+                       consoles/prometheus.html
+EXAMPLE_FILES+=                console_libraries/menu.lib console_libraries/prom.lib
+INSTALLATION_DIRS+=    ${PREFIX}/${EXAMPLE_DIR}
+
+.for f in ${EXAMPLE_FILES}
+CONF_FILES+=   ${EXAMPLE_DIR}/${f} ${PKG_SYSCONFDIR}/${f}
+.endfor
+
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml ${DESTDIR}${PREFIX}/${EXAMPLE_DIR}
+       ${RUN} cd ${WRKDIR} && ${PAX} -rw bin ${DESTDIR}${PREFIX}
+       ${RUN} cd ${WRKSRC} && \
+               ${PAX} -rw consoles ${DESTDIR}${PREFIX}/${EXAMPLE_DIR} && \
+               ${PAX} -rw console_libraries ${DESTDIR}${PREFIX}/${EXAMPLE_DIR}
+
+post-install:
+.for f in ${EXAMPLE_FILES}
+       ${CHMOD} ${NONBINMODE} ${DESTDIR}${PREFIX}/${EXAMPLE_DIR}/${f}
+.endfor
+
+.include "../../lang/go/go-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r ccbe7218f870 -r 2c806eb162d4 databases/prometheus/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/prometheus/PLIST        Sun Mar 17 12:55:13 2019 +0000
@@ -0,0 +1,16 @@
+@comment $NetBSD: PLIST,v 1.1 2019/03/17 12:55:13 tm Exp $
+bin/adapter-usage
+bin/example_write_adapter
+bin/prometheus
+bin/promtool
+bin/remote_storage_adapter
+share/examples/prometheus/console_libraries/menu.lib
+share/examples/prometheus/console_libraries/prom.lib
+share/examples/prometheus/consoles/index.html.example
+share/examples/prometheus/consoles/node-cpu.html
+share/examples/prometheus/consoles/node-disk.html
+share/examples/prometheus/consoles/node-overview.html
+share/examples/prometheus/consoles/node.html
+share/examples/prometheus/consoles/prometheus-overview.html
+share/examples/prometheus/consoles/prometheus.html
+share/examples/prometheus/prometheus.yml
diff -r ccbe7218f870 -r 2c806eb162d4 databases/prometheus/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/prometheus/distinfo     Sun Mar 17 12:55:13 2019 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2019/03/17 12:55:13 tm Exp $
+
+SHA1 (prometheus-2.8.0.tar.gz) = 3a4ce194b0db6670c33110d390cb3770c53b51e4
+RMD160 (prometheus-2.8.0.tar.gz) = 36cf8d13bde68c1f295ad96a8abc825a44c49d0c
+SHA512 (prometheus-2.8.0.tar.gz) = 9b0b0679768a9426547b232a87a3109008c28a59ef74b9376f192209c4005c7f18d622601ebef14516786378c5f014f6734a4e1a7929ffc0b9b7c369d28030eb
+Size (prometheus-2.8.0.tar.gz) = 11097030 bytes
+SHA1 (patch-cmd_prometheus_main.go) = 51f608ee8bb399f1145b0e8fcdc586ef1b3ba9c9
diff -r ccbe7218f870 -r 2c806eb162d4 databases/prometheus/patches/patch-cmd_prometheus_main.go
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/prometheus/patches/patch-cmd_prometheus_main.go Sun Mar 17 12:55:13 2019 +0000
@@ -0,0 +1,35 @@
+$NetBSD: patch-cmd_prometheus_main.go,v 1.1 2019/03/17 12:55:13 tm Exp $
+
+Add prefix for SYSCONFDIR and VARBASE to store configuration file and metrics data at the correct location.
+
+--- cmd/prometheus/main.go.orig        2019-03-12 04:09:20.000000000 +0000
++++ cmd/prometheus/main.go
+@@ -133,7 +133,7 @@ func main() {
+       a.HelpFlag.Short('h')
+ 
+       a.Flag("config.file", "Prometheus configuration file path.").
+-              Default("prometheus.yml").StringVar(&cfg.configFile)
++              Default("@PKG_SYSCONFDIR@/prometheus.yml").StringVar(&cfg.configFile)
+ 
+       a.Flag("web.listen-address", "Address to listen on for UI, API, and telemetry.").
+               Default("0.0.0.0:9090").StringVar(&cfg.web.ListenAddress)
+@@ -163,16 +163,16 @@ func main() {
+               Default("false").BoolVar(&cfg.web.EnableAdminAPI)
+ 
+       a.Flag("web.console.templates", "Path to the console template directory, available at /consoles.").
+-              Default("consoles").StringVar(&cfg.web.ConsoleTemplatesPath)
++              Default("@PKG_SYSCONFDIR@/consoles").StringVar(&cfg.web.ConsoleTemplatesPath)
+ 
+       a.Flag("web.console.libraries", "Path to the console library directory.").
+-              Default("console_libraries").StringVar(&cfg.web.ConsoleLibrariesPath)
++              Default("@PKG_SYSCONFDIR@/console_libraries").StringVar(&cfg.web.ConsoleLibrariesPath)
+ 
+       a.Flag("web.page-title", "Document title of Prometheus instance.").
+               Default("Prometheus Time Series Collection and Processing Server").StringVar(&cfg.web.PageTitle)
+ 
+       a.Flag("storage.tsdb.path", "Base path for metrics storage.").
+-              Default("data/").StringVar(&cfg.localStoragePath)
++              Default("@VARBASE@/lib/prometheus/data/").StringVar(&cfg.localStoragePath)
+ 
+       a.Flag("storage.tsdb.min-block-duration", "Minimum duration of a data block before being persisted. For use in testing.").
+               Hidden().Default("2h").SetValue(&cfg.tsdb.MinBlockDuration)



Home | Main Index | Thread Index | Old Index