summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Suhl <nico@overninethousand.de>2017-03-05 18:48:07 +0100
committerNico Suhl <nico@overninethousand.de>2017-03-05 18:48:07 +0100
commit471b63471b5d75b56fdb2f2b583c914e94cb94b1 (patch)
treeb877df2ef323b356b52372c9f947412df709ec22
parentadd influxdb 1.1.4 (diff)
downloadnico-471b63471b5d75b56fdb2f2b583c914e94cb94b1.tar.gz
nico-471b63471b5d75b56fdb2f2b583c914e94cb94b1.tar.bz2
nico-471b63471b5d75b56fdb2f2b583c914e94cb94b1.zip
add telegraf 1.2.1
-rw-r--r--dev-db/telegraf/Manifest1
-rwxr-xr-xdev-db/telegraf/files/telegraf.init.d31
-rw-r--r--dev-db/telegraf/metadata.xml11
-rw-r--r--dev-db/telegraf/telegraf-1.2.1.ebuild37
4 files changed, 80 insertions, 0 deletions
diff --git a/dev-db/telegraf/Manifest b/dev-db/telegraf/Manifest
new file mode 100644
index 0000000..d0648ba
--- /dev/null
+++ b/dev-db/telegraf/Manifest
@@ -0,0 +1 @@
+DIST telegraf_1.2.1_amd64.deb 9637426 SHA256 001d9ee9185526420cb7092a5ebc35af91090b5633e992da4d8cfa7e4c2d0c3d SHA512 100d59a35b850f9d80574427ee0d7091cbbc094860f7acfadfa73c2aeeb13ef7465596d6a5e1e42bcd71447426ac4aad1a9a07879f87804b5406a32fcde80334 WHIRLPOOL 62f63dbf5feb0f10b1045bd56e800fe2f3e222baf62f210fc1df6f4661a0e02915367531db911617513fd0030a0bfb1f48563914b1fdacfbcfca50c4d355ec3c
diff --git a/dev-db/telegraf/files/telegraf.init.d b/dev-db/telegraf/files/telegraf.init.d
new file mode 100755
index 0000000..2dc945e
--- /dev/null
+++ b/dev-db/telegraf/files/telegraf.init.d
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ after bootmisc
+}
+
+start() {
+ ebegin "Starting telegraf"
+
+ start-stop-daemon --start -b \
+ --user telegraf:telegraf \
+ --pidfile /run/telegraf.pid \
+ --make-pidfile \
+ --stdout /var/log/telegraf/telegraf.log \
+ --stderr /var/log/telegraf/telegraf.log \
+ --exec /usr/bin/telegraf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping telegraf"
+
+ start-stop-daemon --stop \
+ --pidfile /run/telegraf.pid \
+ --exec /usr/bin/telegraf
+ eend $?
+}
diff --git a/dev-db/telegraf/metadata.xml b/dev-db/telegraf/metadata.xml
new file mode 100644
index 0000000..c1a328f
--- /dev/null
+++ b/dev-db/telegraf/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>nico@overninethousand.de</email>
+ </maintainer>
+ <longdescription lang="en">
+ Telegraf is an agent written in Go for collecting metrics and writing them
+ into InfluxDB or other possible outputs.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-db/telegraf/telegraf-1.2.1.ebuild b/dev-db/telegraf/telegraf-1.2.1.ebuild
new file mode 100644
index 0000000..94024bb
--- /dev/null
+++ b/dev-db/telegraf/telegraf-1.2.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit user unpacker
+
+DESCRIPTION="A plugin-driven server agent for reporting metrics into InfluxDB"
+HOMEPAGE="http://influxdb.com"
+SRC_URI="https://dl.influxdata.com/telegraf/releases/${PN}_${PV}_amd64.deb"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_unpack() {
+ mkdir -p ${WORKDIR}/${P}
+ cd ${WORKDIR}/${P}
+ unpack_deb ${A}
+}
+
+src_install() {
+ cp -Rp * "${D}"
+ newinitd "${FILESDIR}/${PN}.init.d" "${PN}"
+ fowners ${PN}:${PN} /var/log/${PN}
+}