summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2018-04-02 19:28:42 -0500
committerWilliam Hubbs <williamh@gentoo.org>2018-04-02 19:30:41 -0500
commit5558078abf664d63fead55f6fde1d4b95d18e426 (patch)
treeac4524594e6dcefac4d8311d83f467c866288d63 /net-analyzer/chronograf
parentx11-libs/xcb-util-xrm: Version bump to 1.3 (diff)
downloadgentoo-5558078abf664d63fead55f6fde1d4b95d18e426.tar.gz
gentoo-5558078abf664d63fead55f6fde1d4b95d18e426.tar.bz2
gentoo-5558078abf664d63fead55f6fde1d4b95d18e426.zip
net-analyzer/chronograf: monitoring, processing and alerting on time series data
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'net-analyzer/chronograf')
-rw-r--r--net-analyzer/chronograf/Manifest2
-rw-r--r--net-analyzer/chronograf/chronograf-1.4.3.0.ebuild70
-rw-r--r--net-analyzer/chronograf/files/chronograf.confd16
-rw-r--r--net-analyzer/chronograf/files/chronograf.rc22
-rw-r--r--net-analyzer/chronograf/metadata.xml12
5 files changed, 122 insertions, 0 deletions
diff --git a/net-analyzer/chronograf/Manifest b/net-analyzer/chronograf/Manifest
new file mode 100644
index 000000000000..06c0783726bc
--- /dev/null
+++ b/net-analyzer/chronograf/Manifest
@@ -0,0 +1,2 @@
+DIST chronograf-1.4.3.0.tar.gz 3979946 BLAKE2B 963511250e1d49ca92e9fde23b3c0899331ef22fe071c47c8d9d6a0ab0264e2dcb1dc083559424ff0b4bb59b0d4eb3121febe6f1ce828bac24598ae8be51cb6a SHA512 49a7565dc58f4f79ad1feb25bf6f74e9267630f6dab5f8767411d11f12dd7a76e9486b8f52c961c27dae6511286192585cee67363acf558287da436c39500ef9
+DIST chronograf-gen-1.4.3.0.tar.gz 2488979 BLAKE2B 47738629d25dd6b5c11f942bdcea089291bfd8ad1476f448985d35fd35fa4a59274e95b863f7055c34ac0047f584fc45c83e3143aceb8b13b6c4fd28c42039ec SHA512 0346c19f80bea597c87a54f2d5409854a30dfa020bb0326791a6387d81aafe0c6e5112b6d086b21f95dc4f68a269a8fb2e0113156122636c3a6281ba58df6b49
diff --git a/net-analyzer/chronograf/chronograf-1.4.3.0.ebuild b/net-analyzer/chronograf/chronograf-1.4.3.0.ebuild
new file mode 100644
index 000000000000..2b2c7163f727
--- /dev/null
+++ b/net-analyzer/chronograf/chronograf-1.4.3.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+EGO_PN=github.com/influxdata/chronograf
+
+inherit golang-build golang-vcs-snapshot systemd user
+
+DESCRIPTION="Monitoring, processing and alerting on time series data"
+HOMEPAGE="https://www.influxdata.com"
+SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~williamh/dist/${PN}-gen-${PV}.tar.gz"
+
+LICENSE="AGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+pkg_setup() {
+ enewgroup chronograf
+ enewuser chronograf -1 -1 /var/lib/chronograf chronograf
+}
+
+src_unpack() {
+ local f
+ golang-vcs-snapshot_src_unpack
+ pushd "${S}/src/${EGO_PN}" > /dev/null || die
+ for f in ${A}; do
+ case $f in
+ ${PN}-gen-*.tar.*)
+ unpack ${f}
+ ;;
+ esac
+ done
+}
+
+src_compile() {
+ pushd "src/${EGO_PN}" > /dev/null || die
+ set -- env GOPATH="${S}" go build -o chronograf cmd/chronograf/main.go
+ echo "$@"
+ "$@" || die "building chronograf failed"
+ set -- env GOPATH="${S}" go build -o chronoctl cmd/chronoctl/main.go
+ echo "$@"
+ "$@" || die "building chronoctl failed"
+ popd > /dev/null || die
+}
+
+src_install() {
+ pushd "src/${EGO_PN}" > /dev/null || die
+dobin chronograf chronoctl
+ dodoc CHANGELOG.md
+ insinto /etc/logrotate.d
+ newins etc/scripts/logrotate chronograf
+ systemd_dounit etc/scripts/chronograf.service
+ insinto /usr/share/chronograf/canned
+doins canned/*.json
+keepdir /usr/share/chronograf/resources
+ keepdir /var/log/chronograf
+ fowners chronograf:chronograf /var/log/chronograf
+ newconfd "${FILESDIR}"/chronograf.confd chronograf
+ newinitd "${FILESDIR}"/chronograf.rc chronograf
+ popd > /dev/null || die
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ einfo "In order to use chronograf, you will need to configure"
+ einfo "the appropriate options in ${EROOT}etc/conf.d/chronograf"
+ fi
+}
diff --git a/net-analyzer/chronograf/files/chronograf.confd b/net-analyzer/chronograf/files/chronograf.confd
new file mode 100644
index 000000000000..a70c355c6fb6
--- /dev/null
+++ b/net-analyzer/chronograf/files/chronograf.confd
@@ -0,0 +1,16 @@
+#The convention in this file is to show the default setting commented
+#out.
+#To change the setting, uncomment it then change the value.
+
+#This is the chronograf error log:
+#error_log="/var/log/chronograf/chronograf.log"
+
+#This is the chronograf output log:
+#output_log="/dev/null"
+
+# If you set this to yes, chronograf will report anonymous usage stats
+# to influx data.
+#report_usage_stats="no"
+
+# Extra options to pass to chronograf:
+#chronograf_opts=""
diff --git a/net-analyzer/chronograf/files/chronograf.rc b/net-analyzer/chronograf/files/chronograf.rc
new file mode 100644
index 000000000000..335240dbf269
--- /dev/null
+++ b/net-analyzer/chronograf/files/chronograf.rc
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+
+command=/usr/bin/chronograf
+command_args="${chronograf_opts}"
+command_background=yes
+command_user=chronograf:chronograf
+make_pidfile=yes
+pidfile=/var/run/chronografd.pid
+
+# Logging
+error_log="${error_log:-/var/log/chronograf/chronograf.log}"
+output_log="${output_log:-/dev/null}"
+
+start_pre() {
+ export HOST=127.0.0.1
+ export PORT=8888
+ export BOLT_PATH=/var/lib/chronograf/chronograf-v1.db
+ export CANNED_PATH=/usr/share/chronograf/canned
+ export RESOURCES_PATH=/usr/share/chronograf/RESOURCES
+ yesno "${report_usage_stats:-no}" || export REPORTING_DISABLED=yes
+ return 0
+}
diff --git a/net-analyzer/chronograf/metadata.xml b/net-analyzer/chronograf/metadata.xml
new file mode 100644
index 000000000000..ed7262b70f1e
--- /dev/null
+++ b/net-analyzer/chronograf/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ Open source framework for processing, monitoring and alerting on
+ time series data.
+ </longdescription>
+</pkgmetadata>