diff options
author | Palle Girgensohn <girgen@FreeBSD.org> | 2016-06-08 21:10:40 +0000 |
---|---|---|
committer | Palle Girgensohn <girgen@FreeBSD.org> | 2016-06-08 21:10:40 +0000 |
commit | 277f6f1e4600cef1a42cbe0f409e9856a0e452f8 (patch) | |
tree | f632fd869746c95c6b2248aed060ddfa2468383e /net-mgmt | |
parent | 783ef22cca8dd429e7fadf0cdb965c97d361eb13 (diff) |
Add kapacitor to the ports tree.
Kapacitor is InfluxDB's native data processing engine. It can process both
stream and batch data from InfluxDB. Kapacitor lets you plug in your own custom
logic or user defined functions to process alerts with dynamic thresholds,
match metrics for patterns or compute statistical anomalies.
WWW: https://influxdata.com/time-series-platform/kapacitor/
PR: 210094
Submitted by: Stefan Lambrev
Notes
Notes:
svn path=/head/; revision=416565
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/kapacitor/Makefile | 60 | ||||
-rw-r--r-- | net-mgmt/kapacitor/distinfo | 7 | ||||
-rw-r--r-- | net-mgmt/kapacitor/files/kapacitord.in | 39 | ||||
-rw-r--r-- | net-mgmt/kapacitor/pkg-descr | 6 | ||||
-rw-r--r-- | net-mgmt/kapacitor/pkg-plist | 3 |
6 files changed, 116 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index 6dc0abea1eda..f68df66d5743 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -96,6 +96,7 @@ SUBDIR += irrtoolset SUBDIR += isic SUBDIR += jnettop + SUBDIR += kapacitor SUBDIR += kismet SUBDIR += klg SUBDIR += lanmap diff --git a/net-mgmt/kapacitor/Makefile b/net-mgmt/kapacitor/Makefile new file mode 100644 index 000000000000..25362cebc443 --- /dev/null +++ b/net-mgmt/kapacitor/Makefile @@ -0,0 +1,60 @@ +# Created by: Stefan Lambrev <cheffo@freebsd-bg.org> +# $FreeBSD$ + +PORTNAME= kapacitor +PORTVERSION= 0.13.1 +DISTVERSIONPREFIX= v +CATEGORIES= net-mgmt + +MAINTAINER= cheffo@freebsd-bg.org +COMMENT= Time-series data collection + +LICENSE= MIT + +BUILD_DEPENDS= go>=1.5.0:lang/go + +ONLY_FOR_ARCHS= i386 amd64 armv6 + +USE_RC_SUBR= kapacitord + +USE_GITHUB= yes + +GH_ACCOUNT= influxdata:DEFAULT +GH_TUPLE= golang:crypto:b6789ab:crypto \ + stretchr:testify:6cb3b85:testify + +SUB_FILES= kapacitord +SUB_LIST+= KAPACITORD_PIDDIR=${KAPACITORD_PIDDIR} +PLIST_SUB= KAPACITORD_PIDDIR=${KAPACITORD_PIDDIR} + +STRIP= # stripping can break go binaries + +post-patch: + @${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME} \ + ${WRKSRC}/src/github.com/stretchr \ + ${WRKSRC}/src/golang.org/x + @cd ${WRKSRC} && ${MV} CHANGELOG.md CONTRIBUTING.md DESIGN.md Dockerfile_build_ubuntu32 \ + Dockerfile_build_ubuntu64 Dockerfile_build_ubuntu64_git LICENSE LICENSE_OF_DEPENDENCIES.md \ + README.md alert.go batch.go build.py build.sh circle-test.sh circle.yml client clock cmd \ + default.go derivative.go doc.go edge.go edge_test.go etc eval.go examples expr.go expvar \ + global_stats.go gobuild.sh group_by.go http_out.go influxdb_out.go influxql.gen.go \ + influxql.gen.go.tmpl influxql.go install-deps.sh integrations join.go log.go models \ + node.go noop.go output.go pipeline query.go replay.go result.go sample.go scripts services \ + shift.go stats.go stream.go task.go task_master.go test.sh tick tickdoc.conf timer \ + tmpldata udf udf.go udf_test.go union.go update_tick_docs.sh vendor vendor.yml where.go \ + window.go window_test.go \ + ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME} + @${MV} ${WRKSRC_testify} ${WRKSRC}/src/github.com/stretchr/testify ;\ + ${MV} ${WRKSRC_crypto} ${WRKSRC}/src/golang.org/x/crypto + +do-build: + @cd ${WRKSRC}/src/github.com/influxdata/${PORTNAME} && ${SETENV} GOPATH=${WRKSRC} go install ./... + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + ${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME}d ${STAGEDIR}${PREFIX}/bin/${PORTNAME}d + ${INSTALL_DATA} \ + ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/etc/${PORTNAME}/${PORTNAME}.conf \ + ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample + +.include <bsd.port.mk> diff --git a/net-mgmt/kapacitor/distinfo b/net-mgmt/kapacitor/distinfo new file mode 100644 index 000000000000..92b46ee6ea9a --- /dev/null +++ b/net-mgmt/kapacitor/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1465294291 +SHA256 (influxdata-kapacitor-v0.13.1_GH0.tar.gz) = 5ea34857f7c2aa6270acdead5953c7fe6f1f3aa065d8f7188eb712ad597631c2 +SIZE (influxdata-kapacitor-v0.13.1_GH0.tar.gz) = 1493172 +SHA256 (golang-crypto-b6789ab_GH0.tar.gz) = 8e59ebf79fa9bb4554f2e5c9b271e3a8774e9624019f96fe527c598109710227 +SIZE (golang-crypto-b6789ab_GH0.tar.gz) = 1026715 +SHA256 (stretchr-testify-6cb3b85_GH0.tar.gz) = abae34a655da56b099f25f622e0f5db982c691cb77384e8ac0bda5fe80c7d177 +SIZE (stretchr-testify-6cb3b85_GH0.tar.gz) = 81558 diff --git a/net-mgmt/kapacitor/files/kapacitord.in b/net-mgmt/kapacitor/files/kapacitord.in new file mode 100644 index 000000000000..c0ddf4352890 --- /dev/null +++ b/net-mgmt/kapacitor/files/kapacitord.in @@ -0,0 +1,39 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: kapacitord +# REQUIRE: DAEMON NETWORKING +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable telegrafb: +# kapacitord_enable="YES" +# +# kapacitord_enable (bool): Set to YES to enable telegraf +# Default: NO +# kapacitord_conf (str): telegraf configuration file +# Default: ${PREFIX}/etc/telegraf.conf +# kapacitord_flags (str): Extra flags passed to telegraf + +. /etc/rc.subr + +name="kapacitord" +rcvar=kapacitord_enable +load_rc_config $name + +: ${kapacitord_enable:="NO"} +: ${kapacitord_flags:=""} +: ${kapacitord_conf:="%%PREFIX%%/etc/kapacitor.conf"} + +# daemon +start_precmd=kapacitord_prestart +pidfile="/var/run/${name}.pid" +command=/usr/sbin/daemon +command_args="-crP ${pidfile} %%PREFIX%%/bin/${name} ${kapacitord_flags} -config=${kapacitord_conf} 2>> /var/log/kapacitord.log" + +kapacitord_prestart() { +# Have to empty rc_flags so they don't get passed to daemon(8) + rc_flags="" +} + +run_rc_command "$1" diff --git a/net-mgmt/kapacitor/pkg-descr b/net-mgmt/kapacitor/pkg-descr new file mode 100644 index 000000000000..f04715ccb2bd --- /dev/null +++ b/net-mgmt/kapacitor/pkg-descr @@ -0,0 +1,6 @@ +Kapacitor is InfluxDB's native data processing engine. It can process both +stream and batch data from InfluxDB. Kapacitor lets you plug in your own custom +logic or user defined functions to process alerts with dynamic thresholds, +match metrics for patterns or compute statistical anomalies. + +WWW: https://influxdata.com/time-series-platform/kapacitor/ diff --git a/net-mgmt/kapacitor/pkg-plist b/net-mgmt/kapacitor/pkg-plist new file mode 100644 index 000000000000..43e4cc63df26 --- /dev/null +++ b/net-mgmt/kapacitor/pkg-plist @@ -0,0 +1,3 @@ +bin/kapacitor +bin/kapacitord +@sample etc/kapacitor.conf.sample |