aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2017-02-23 15:21:29 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2017-02-26 20:03:56 +0000
commit1d0358126ae631c3dc579271cd9376e07bb1a4d6 (patch)
treeef561ab1bfdc2dbab531aac8a8105ba0c548b213 /testing
parent751a1f21b10a1c2bf1c1d9537a553ed67cf510f8 (diff)
downloadaports-1d0358126ae631c3dc579271cd9376e07bb1a4d6.tar.bz2
aports-1d0358126ae631c3dc579271cd9376e07bb1a4d6.tar.xz
testing/td-agent-bit: new aport
Fluent Bit is an open source and multi-platform Log Forwarder which allows you to collect data/logs from different sources, unify and send them to multiple destinations. Fluent Bit is written in C, has a pluggable architecture supporting around 20 extensions. It's fast and lightweight and provides the required security for network operations through TLS. http://fluentbit.io/
Diffstat (limited to 'testing')
-rw-r--r--testing/td-agent-bit/APKBUILD50
-rw-r--r--testing/td-agent-bit/disable-jemalloc.patch11
-rw-r--r--testing/td-agent-bit/td-agent-bit.confd4
-rw-r--r--testing/td-agent-bit/td-agent-bit.initd14
4 files changed, 79 insertions, 0 deletions
diff --git a/testing/td-agent-bit/APKBUILD b/testing/td-agent-bit/APKBUILD
new file mode 100644
index 0000000000..308c1016e9
--- /dev/null
+++ b/testing/td-agent-bit/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
+# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
+pkgname=td-agent-bit
+_pkgname=fluent-bit
+pkgver=0.10.1
+pkgrel=0
+pkgdesc="Fast and Lightweight Log/Data Forwarder [fluent-bit]"
+url="http://fluentbit.io"
+arch="all"
+license="Apache2.0"
+makedepends="cmake linux-headers zlib-dev mbedtls-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://fluentbit.io/releases/0.10/$_pkgname-$pkgver.tar.gz
+ $pkgname.confd
+ $pkgname.initd
+ disable-jemalloc.patch
+ "
+builddir="$srcdir/"$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"/build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ -DCMAKE_INSTALL_LIBDIR:PATH=lib \
+ -DFLB_ALL=ON \
+ -DFLB_TD=ON ..
+ make || return 1
+}
+
+package() {
+ cd "$builddir"/build
+
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -m644 -D ../README.md \
+ "$pkgdir"/usr/share/doc/$pkgname/README.md || return 1
+ install -m644 -D ../LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1
+
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+}
+
+sha512sums="93b1e6c277ebecb65e40d078d98f1942dcda7fa02abd1f8c2d95e4c73d20ec36bee0d0d072b7624894a5b75a455d5c25b91a08c6a05e391b40a03a63a15e3096 fluent-bit-0.10.1.tar.gz
+6c1c67ac965fb9f54e362a7de8864afbffb9a22bffb5b5ca3a68f3950b9a27ccaee29d4bfb223035ccf5276e3fe09d0873685c58c47e055ad4bea57ccf80d90e td-agent-bit.confd
+5103ab108bf0bafec2ca34db6e3a629977cd0a6ffb3f213b3885af5e2c08218ede4784d64310d6acdc7a09a9bc1e29330eaf692dbebdc6619de5a69cb1f80948 td-agent-bit.initd
+bf41aa1eef5ae0239acb2f54356d090d71611eb021de5b0d92be10079ef3bc5c7cc1dade1de98fd60354b883e53652a6f3f54a7a03acd00471e1f65d654aac32 disable-jemalloc.patch"
diff --git a/testing/td-agent-bit/disable-jemalloc.patch b/testing/td-agent-bit/disable-jemalloc.patch
new file mode 100644
index 0000000000..d71f932c47
--- /dev/null
+++ b/testing/td-agent-bit/disable-jemalloc.patch
@@ -0,0 +1,11 @@
+--- fluent-bit-0.10.1/CMakeLists.txt
++++ fluent-bit-0.10.1/CMakeLists.txt.new
+@@ -306,7 +306,7 @@
+
+ if(FLB_TD)
+ FLB_DEFINITION(FLB_IS_TD_AGENT)
+- FLB_OPTION(FLB_JEMALLOC ON)
++ FLB_OPTION(FLB_JEMALLOC OFF)
+ set(FLB_PROG_NAME "TD Agent Bit")
+ set(FLB_OUT_NAME "td-agent-bit")
+ set(WITHOUT_HEADERS On)
diff --git a/testing/td-agent-bit/td-agent-bit.confd b/testing/td-agent-bit/td-agent-bit.confd
new file mode 100644
index 0000000000..c909913a4e
--- /dev/null
+++ b/testing/td-agent-bit/td-agent-bit.confd
@@ -0,0 +1,4 @@
+# config file for td-agent-bit [fluent-bit]
+
+TD_CONFIG=/etc/td-agent-bit/td-agent-bit.conf
+TD_OPTS="-c $TD_CONFIG"
diff --git a/testing/td-agent-bit/td-agent-bit.initd b/testing/td-agent-bit/td-agent-bit.initd
new file mode 100644
index 0000000000..6a84c19ddf
--- /dev/null
+++ b/testing/td-agent-bit/td-agent-bit.initd
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+supervisor=supervise-daemon
+
+description="Fast and Lightweight Log/Data Forwarder [fluent-bit]"
+
+nice=19
+pidfile="/run/$SVCNAME.sd.pid"
+supervise_daemon_args="-p $pidfile -N $nice"
+command=/usr/bin/td-agent-bit
+command_args=${TD_OPTS}
+
+depends() {
+ use net
+}