Import telegraf 1.9.0.
Telegraf is an agent for collecting, processing, aggregating, and writing metrics. Plugin-driven, it has the concept of 4 distinct plugin types: * Input Plugins collect metrics from the system, services, or 3rd party APIs * Processor Plugins transform, decorate, and/or filter metrics * Aggregator Plugins create aggregate metrics (e.g. mean, min, max, quantiles, etc.) * Output Plugins write metrics to various destinations note that input.system is currently broken on OpenBSD (probably because of gopsutil or go internals), tracked in https://github.com/influxdata/telegraf/issues/5157. Other plugins seem to work fine. As it was done for influxdb (telegraf comes from the same source), bundle the go deps and selfhost the distfile. ok danj@
This commit is contained in:
parent
db0556a450
commit
3c1115c114
46
sysutils/telegraf/Makefile
Normal file
46
sysutils/telegraf/Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2018/12/18 19:31:28 landry Exp $
|
||||
|
||||
COMMENT = plugin-driven server agent for collecting metrics
|
||||
|
||||
GH_ACCOUNT = influxdata
|
||||
GH_PROJECT = telegraf
|
||||
GH_TAGNAME = 1.9.0
|
||||
HOMEPAGE = https://influxdata.com
|
||||
# selfhosted because we bundle go deps
|
||||
MASTER_SITES = https://rhaalovely.net/stuff/
|
||||
|
||||
CATEGORIES = sysutils
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
MODULES = lang/go
|
||||
|
||||
# dep rebundles them..
|
||||
#BUILD_DEPENDS = security/go-crypto \
|
||||
# textproc/go-text \
|
||||
# devel/go-sys \
|
||||
# net/go-net
|
||||
|
||||
WANTLIB += c pthread
|
||||
|
||||
do-install:
|
||||
${MODGO_INSTALL_TARGET}
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/telegraf/
|
||||
${INSTALL_DATA} ${WRKSRC}/etc/telegraf.conf \
|
||||
${PREFIX}/share/examples/telegraf/
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${MODGO_BUILD_CMD} ./...
|
||||
|
||||
## convenience hackish target to bundle/vendor dependencies
|
||||
tarball: clean distclean
|
||||
mkdir -p ${WRKDIR}/go/src/github.com/influxdata/
|
||||
ftp -o ${WRKDIR}/${DISTFILES} https://github.com/influxdata/telegraf/archive/${GH_TAGNAME}/${DISTFILES}
|
||||
tar -C ${WRKDIR}/go/src/github.com/influxdata/ -xzf ${WRKDIR}/${DISTFILES}
|
||||
${SETENV} ${MODGO_ENV} go get github.com/golang/dep/cmd/dep
|
||||
cd ${WRKDIR}/go/src/github.com/influxdata/${DISTNAME} && ${SETENV} ${MODGO_ENV} ${WRKDIR}/go/bin/dep ensure
|
||||
rm -Rf ${WRKDIR}/go/{bin,pkg} ${WRKDIR}/go/src/github.com/influxdata/${DISTNAME}/vendor/github.com/influxdata/telegraf ${WRKDIR}/${DISTFILES}
|
||||
cd ${WRKDIR}/go/src/github.com/influxdata/ && tar -czf /usr/ports/distfiles/${DISTFILES} ${DISTNAME}
|
||||
|
||||
.include <bsd.port.mk>
|
2
sysutils/telegraf/distinfo
Normal file
2
sysutils/telegraf/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (telegraf-1.9.0.tar.gz) = MCBAuASXvOAVU5luKO1w4dBrzcbQrfkXPg2MpurOv7I=
|
||||
SIZE (telegraf-1.9.0.tar.gz) = 67990016
|
9
sysutils/telegraf/pkg/DESCR
Normal file
9
sysutils/telegraf/pkg/DESCR
Normal file
@ -0,0 +1,9 @@
|
||||
Telegraf is an agent for collecting, processing, aggregating, and
|
||||
writing metrics. Plugin-driven, it has the concept of 4 distinct plugin
|
||||
types:
|
||||
* Input Plugins collect metrics from the system, services, or 3rd party
|
||||
APIs
|
||||
* Processor Plugins transform, decorate, and/or filter metrics
|
||||
* Aggregator Plugins create aggregate metrics (e.g. mean, min, max,
|
||||
quantiles, etc.)
|
||||
* Output Plugins write metrics to various destinations
|
11
sysutils/telegraf/pkg/PLIST
Normal file
11
sysutils/telegraf/pkg/PLIST
Normal file
@ -0,0 +1,11 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2018/12/18 19:31:28 landry Exp $
|
||||
@newgroup _telegraf:826
|
||||
@newuser _telegraf:826:_telegraf:daemon:telegraf user:/var/empty:/sbin/nologin
|
||||
@rcscript ${RCDIR}/telegraf
|
||||
@bin bin/stress_test_write
|
||||
@bin bin/telegraf
|
||||
@bin bin/thrift_serialize
|
||||
share/examples/telegraf/
|
||||
@sample ${SYSCONFDIR}/telegraf/
|
||||
share/examples/telegraf/telegraf.conf
|
||||
@sample ${SYSCONFDIR}/telegraf/telegraf.conf
|
13
sysutils/telegraf/pkg/telegraf.rc
Normal file
13
sysutils/telegraf/pkg/telegraf.rc
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/ksh
|
||||
#
|
||||
# $OpenBSD: telegraf.rc,v 1.1.1.1 2018/12/18 19:31:28 landry Exp $
|
||||
|
||||
daemon="${TRUEPREFIX}/bin/telegraf"
|
||||
daemon_user="_telegraf"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_bg=YES
|
||||
rc_reload=NO
|
||||
|
||||
rc_cmd $1
|
Loading…
Reference in New Issue
Block a user