pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kapacitor: Open source framework for processing, monitoring, and alerting on time series data
Module Name: pkgsrc-wip
Committed By: Bill Welliver <bill%welliver.org@localhost>
Pushed By: hww3
Date: Fri Jan 25 21:28:08 2019 -0500
Changeset: c610c014b80cc751cc51327c16aeba7a84607f6c
Added Files:
kapacitor/DESCR
kapacitor/Makefile
kapacitor/PLIST
kapacitor/distinfo
kapacitor/files/kapacitor.sh
kapacitor/files/smf/manifest.xml
Log Message:
kapacitor: Open source framework for processing, monitoring, and alerting on time series data
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c610c014b80cc751cc51327c16aeba7a84607f6c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
kapacitor/DESCR | 2 +
kapacitor/Makefile | 89 ++++++++++++++++++++++++++++++++++++++++
kapacitor/PLIST | 14 +++++++
kapacitor/distinfo | 6 +++
kapacitor/files/kapacitor.sh | 23 +++++++++++
kapacitor/files/smf/manifest.xml | 30 ++++++++++++++
6 files changed, 164 insertions(+)
diffs:
diff --git a/kapacitor/DESCR b/kapacitor/DESCR
new file mode 100644
index 0000000000..20d0bd9190
--- /dev/null
+++ b/kapacitor/DESCR
@@ -0,0 +1,2 @@
+InfluxDB is an open-source time series database optimixed for fast
+storage and retrieval of time series data.
diff --git a/kapacitor/Makefile b/kapacitor/Makefile
new file mode 100644
index 0000000000..a930c9b335
--- /dev/null
+++ b/kapacitor/Makefile
@@ -0,0 +1,89 @@
+# $NetBSD$
+
+GITHUB_PROJECT= kapacitor
+PKGVERSION_NOREV= 1.5.2
+DISTNAME= kapacitor-1.5.2
+GITHUB_TAG= v${PKGVERSION_NOREV}
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_GITHUB:=influxdata/}
+MAINTAINER= william%welliver.org@localhost
+HOMEPAGE= https://www.influxdata.com/
+COMMENT= Framework for processing, monitoring, and alerting on time series data
+LICENSE= mit
+
+# despite being the default value, this explicit declaration is required for things
+# to build properly.
+EXTRACT_SUFX= .tar.gz
+
+KAPACITOR_DISTNAME= ${DISTNAME}${EXTRACT_SUFX}
+DISTFILES= ${KAPACITOR_DISTNAME}
+
+EXTRACT_DIR.${KAPACITOR_DISTNAME}= ${WRKDIR}/src/github.com/influxdata
+WRKSRC= ${WRKDIR}/src/github.com/influxdata/kapacitor
+USE_TOOLS+= gmake
+
+BUILD_DEPENDS+= go110-1.10.*:../../lang/go110
+
+# go language executables don't have SSP support
+CHECK_SSP_SKIP= bin/*
+
+PKGSRC_MAKE_ENV+= GOPATH=${WRKDIR}
+
+PKG_SYSCONFSUBDIR= kapacitor
+
+REPLACE.kapacitor.old= /etc/kapacitor
+REPLACE.kapacitor.new= ${PKG_SYSCONFDIR}
+REPLACE_FILES.kapacitor= share/examples/kapacitor/kapacitor.conf
+
+DATADIR= ${VARBASE}/lib/kapacitor
+LOGDIR= ${VARBASE}/log/kapacitor
+
+BUILD_DEFS+= KAPACITOR_USER KAPACITOR_GROUP VARBASE
+FILES_SUBST+= KAPACITOR_USER=${KAPACITOR_USER:Q}
+FILES_SUBST+= KAPACITOR_GROUP=${KAPACITOR_GROUP:Q}
+FILES_SUBST+= DATADIR=${DATADIR:Q}
+FILES_SUBST+= LOGDIR=${LOGDIR:Q}
+
+KAPACITOR_USER?= kapacitor
+KAPACITOR_GROUP?= kapacitor
+OWN_DIRS_PERMS+= ${DATADIR} ${KAPACITOR_USER} ${KAPACITOR_GROUP} 0700
+OWN_DIRS_PERMS+= ${LOGDIR} ${KAPACITOR_USER} ${KAPACITOR_GROUP} 0700
+PKG_USERS_VARS+= KAPACITOR_USER
+PKG_GROUPS_VARS+= KAPACITOR_GROUP
+PKG_GROUPS= ${KAPACITOR_GROUP}
+PKG_USERS= ${KAPACITOR_USER}:${KAPACITOR_GROUP}
+RCD_SCRIPTS= kapacitor
+
+INSTALLATION_DIRS+= bin etc/kapacitor share/doc/kapacitor share/kapacitor/telegraf share/examples/kapacitor/logrotate.d
+
+DOC_FILES+= LICENSE LICENSE_OF_DEPENDENCIES.md DESIGN.md README.md CHANGELOG.md
+BIN_FILES+= kapacitor kapacitord
+CONF_FILES+= ${PREFIX}/share/examples/${PKGBASE}/kapacitor.conf ${PKG_SYSCONFDIR}/kapacitor.conf
+CONF_FILES+= ${PREFIX}/share/examples/${PKGBASE}/logrotate.d/kapacitor ${PKG_SYSCONFDIR}/../logrotate.d/kapacitor
+
+GO_BIN= ${PREFIX}/go110/bin/go
+
+post-extract:
+ ${MV} ${WRKDIR}/src/github.com/influxdata/${DISTNAME} \
+ ${WRKDIR}/src/github.com/influxdata/kapacitor
+
+do-build:
+ cd ${WRKSRC} && ${SETENV} ${PKGSRC_MAKE_ENV} ${GO_BIN} get -ldflags "-X main.version=${PKGVERSION_NOREV} -X main.commit=${GITHUB_TAG} -X main.buildstamp=pkgsrc" ./...
+ cd ${WRKSRC} && ${SETENV} ${PKGSRC_MAKE_ENV} ${GO_BIN} install ./...
+
+do-install:
+.for idir in ${INSTALLATION_DIRS}
+ ${MKDIR} ${DESTDIR}${PREFIX}/${idir}
+.endfor
+.for x in ${BIN_FILES}
+ ${INSTALL} ${WRKDIR}/bin/${x} \
+ ${DESTDIR}${PREFIX}/bin/${x}
+.endfor
+.for x in ${DOC_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/${x} \
+ ${DESTDIR}${PREFIX}/share/doc/kapacitor/${x}
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/etc/kapacitor/kapacitor.conf ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}/
+ ${INSTALL_DATA} ${WRKSRC}/etc/logrotate.d/kapacitor ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}/logrotate.d/kapacitor
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/kapacitor/PLIST b/kapacitor/PLIST
new file mode 100644
index 0000000000..40afc47e19
--- /dev/null
+++ b/kapacitor/PLIST
@@ -0,0 +1,14 @@
+@comment $NetBSD$
+bin/kapacitor
+bin/kapacitord
+share/doc/kapacitor/CHANGELOG.md
+share/doc/kapacitor/DESIGN.md
+share/doc/kapacitor/LICENSE
+share/doc/kapacitor/LICENSE_OF_DEPENDENCIES.md
+share/doc/kapacitor/README.md
+share/examples/kapacitor/kapacitor.conf
+share/examples/kapacitor/logrotate.d/kapacitor
+@pkgdir share/kapacitor/telegraf
+@pkgdir man/man1
+@pkgdir etc/kapacitor
+@pkgdir etc/influxdb
diff --git a/kapacitor/distinfo b/kapacitor/distinfo
new file mode 100644
index 0000000000..ae96957d8e
--- /dev/null
+++ b/kapacitor/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+SHA1 (kapacitor-1.5.2.tar.gz) = 61f5312a28689e3dcded95aa4d0ee9eeca19a3b8
+RMD160 (kapacitor-1.5.2.tar.gz) = 26ea62c7483da38c0cbf2236b6d7fe6534bd7a76
+SHA512 (kapacitor-1.5.2.tar.gz) = 8f79246411713518fe4c6b1aa58131b7f98863f8cd94aaee65b2b2f1d12fc65a72aeb5617110fbe5735e9295e8aa2e066bcc2dba357af5695ccfd488cd5eebd4
+Size (kapacitor-1.5.2.tar.gz) = 5672609 bytes
diff --git a/kapacitor/files/kapacitor.sh b/kapacitor/files/kapacitor.sh
new file mode 100644
index 0000000000..65274b3888
--- /dev/null
+++ b/kapacitor/files/kapacitor.sh
@@ -0,0 +1,23 @@
+#!@RCD_SCRIPTS_SHELL@
+
+# PROVIDE: kapacitor
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="kapacitor"
+rcvar=$name
+kapacitor_user="@KAPACITOR_USER@"
+kapacitor_group="@KAPACITOR_GROUP@"
+kapacitor_chdir="@VARBASE@/lib/kapacitor"
+pidfile="@VARBASE@/lib/kapacitor/data/kapacitord.pid"
+STDERR="@LOGDIR@/kapacitor.log"
+command="@PREFIX@/bin/kapacitord"
+command_args="-config @PREFIX@/etc/kapacitor/kapacitor.conf -pidfile ${pidfile} 1>/dev/null 2>> $STDERR &"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/kapacitor/files/smf/manifest.xml b/kapacitor/files/smf/manifest.xml
new file mode 100644
index 0000000000..7f6d937806
--- /dev/null
+++ b/kapacitor/files/smf/manifest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type='manifest' name='@SMF_NAME@:default'>
+ <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+ <create_default_instance enabled='false' />
+ <single_instance />
+ <dependency name='network' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/milestone/network:default' />
+ </dependency>
+ <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local:default' />
+ </dependency>
+ <method_context working_directory="@DATADIR@">
+ <method_credential user='@KAPACITOR_USER@' group='@KAPACITOR_GROUP@' />
+ </method_context>
+ <exec_method type='method' name='start'
+ exec='@PREFIX@/bin/kapacitord -config @PKG_SYSCONFDIR@/kapacitor.conf -pidfile @DATADIR@/kapacitord.pid 2>> @LOGDIR@/kapacitor.log &'
+ timeout_seconds="60" />
+ <exec_method type='method' name='stop' exec=':kill' timeout_seconds="60" />
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>Kapacitor metrics monitoring agent</loctext>
+ </common_name>
+ <documentation>
+ <manpage title='kapacitord' section='1' manpath='/@PREFIX@/man' />
+ <doc_link name='homepage' uri='https://docs.influxdata.com/kapacitor/' />
+ </documentation>
+ </template>
+ </service>
+</service_bundle>
Home |
Main Index |
Thread Index |
Old Index