1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00

OpenTSDB is a distributed, scalable Time Series Database (TSDB) written

on top of HBase.  OpenTSDB was written to address a common need: store,
index and serve metrics collected from computer systems (network gear,
operating systems, applications) at a large scale, and make this data
easily accessible and graphable.

WWW: http://www.opentsdb.net

Differential Revision:	https://reviews.freebsd.org/D4083
This commit is contained in:
Mark Felder 2015-11-06 14:30:04 +00:00
parent 6ee2531139
commit 106bed3d77
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=400934
9 changed files with 187 additions and 0 deletions

View File

@ -244,6 +244,7 @@
SUBDIR += openark-kit
SUBDIR += openbase-jdbc
SUBDIR += opendbx
SUBDIR += opentsdb
SUBDIR += oracle7-client
SUBDIR += oracle8-client
SUBDIR += oracle_odbc_driver

View File

@ -0,0 +1,58 @@
# Created by: Johannes Meixner <xmj@chaot.net>
# $FreeBSD$
PORTNAME= opentsdb
PORTVERSION= 2.1.1
CATEGORIES= databases java
MASTER_SITES= https://github.com/OpenTSDB/opentsdb/releases/download/${PORTVERSION}/
MAINTAINER= xmj@chaot.net
COMMENT= OpenTSDB is the Scalable Timeseries Database
LICENSE= LGPL3
BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \
curl:${PORTSDIR}/ftp/curl \
gawk:${PORTSDIR}/lang/gawk
LIB_DEPENDS= libhadoop.so:${PORTSDIR}/devel/hadoop2
RUN_DEPENDS= hbase>0:${PORTSDIR}/databases/hbase
USES= gmake python
USE_JAVA= yes
OPTIONS_DEFINE= GNUPLOT
OPTIONS_DEFAULT= GNUPLOT
GNUPLOT_RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot
HAS_CONFIGURE= yes
MAKE_JOBS_UNSAFE= yes
OPENTSDB_LOGDIR= /var/log/${PORTNAME}
OPENTSDB_RUNDIR= /var/run/${PORTNAME}
OPENTSDB_USER= opentsdb
OPENTSDB_GROUP= opentsdb
USERS= ${OPENTSDB_USER}
GROUPS= ${OPENTSDB_GROUP}
USE_RC_SUBR= opentsdb
SUB_LIST= OPENTSDB_USER="${OPENTSDB_USER}" \
OPENTSDB_LOGDIR="${OPENTSDB_LOGDIR}" \
OPENTSDB_RUNDIR="${OPENTSDB_RUNDIR}"
post-patch:
${REINPLACE_CMD} -i"" -e "s|python|${PYTHON_CMD}|" ${WRKSRC}/build-aux/gen_build_data.sh
${REINPLACE_CMD} -i"" -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/Makefile.in
${REINPLACE_CMD} -i"" -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/src/utils/Config.java
${REINPLACE_CMD} -i"" -e "s|tsd.http.staticroot =|tsd.http.staticroot = ${DATADIR}/static|; s|tsd.http.cachedir =|tsd.http.cachedir = /tmp/opentsdb|; s|tsd.network.port =|tsd.network.port = 4242|;" ${WRKSRC}/src/opentsdb.conf
post-install:
${MKDIR} ${STAGEDIR}${ETCDIR} ${STAGEDIR}${OPENTSDB_LOGDIR} ${STAGEDIR}${OPENTSDB_RUNDIR}
${INSTALL_DATA} ${WRKSRC}/src/logback.xml ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/src/opentsdb.conf ${STAGEDIR}${ETCDIR}/opentsdb.conf.sample
(cd "${STAGEDIR}${PREFIX}"; ${FIND} -s share/${PORTNAME}/static -name \*cache.html) >> ${TMPPLIST}
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (opentsdb-2.1.1.tar.gz) = 2b091fd59941a5af21f8fb5195025f541e15d83853f78e1b0ab90db4f36e8b9f
SIZE (opentsdb-2.1.1.tar.gz) = 74609397

View File

@ -0,0 +1,31 @@
#!/bin/sh -
# Copyright (c) 2015 Johannes Meixner
# PROVIDE: opentsdb
# REQUIRE: LOGIN
# KEYWORD: shutdown
# opentsdb_enable (bool): Set to NO by default.
# Set it to YES to enable OpenTSDB
. /etc/rc.subr
export PATH=${PATH}:%%PREFIX%%/bin
name=opentsdb
rcvar=opentsdb_enable
load_rc_config "${name}"
: ${opentsdb_enable:=NO}
: ${opentsdb_user:=opentsdb}
: ${opentsdb_opts:=tsd 2> %%OPENTSDB_LOGDIR%%/error.log 1> %%OPENTSDB_LOGDIR%%/tsdb.log}
pidfile="%%OPENTSDB_RUNDIR%%/${name}.pid"
opentsdb_daemon="%%PREFIX%%/bin/tsdb"
procname="daemon*"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} ${opentsdb_daemon} ${opentsdb_opts}"
run_rc_command "$1"

View File

@ -0,0 +1,20 @@
--- Makefile.in.orig 2015-09-12 19:49:17 UTC
+++ Makefile.in
@@ -1415,7 +1415,7 @@ printdeps:
# This is kind of a hack, but I couldn't find a better way to adjust the paths
# in the script before it gets installed...
install-exec-hook:
- script=tsdb; pkgdatadir='$(pkgdatadir)'; configdir='$(pkgdatadir)/etc/opentsdb'; \
+ script=tsdb; pkgdatadir='$(pkgdatadir)'; configdir='/usr/local/etc/opentsdb'; \
abs_srcdir=''; abs_builddir=''; $(edit_tsdb_script)
cat tsdb.tmp >"$(DESTDIR)$(bindir)/tsdb"
rm -f tsdb.tmp
@@ -1468,7 +1468,7 @@ gwttsd: staticroot
# how to tell it to install a bunch of files recursively for which I don't
# know ahead of time what the file names are.
install-data-local: staticroot install-data-lib install-data-tools \
- install-data-bin install-data-etc
+ install-data-bin
@$(NORMAL_INSTALL)
test -z "$(staticdir)" || $(mkdir_p) "$(DESTDIR)$(staticdir)"
@set -e; pwd; ls -lFh; cd "$(DEV_TSD_STATICROOT)"; \

View File

@ -0,0 +1,11 @@
--- configure.orig 2015-09-12 19:49:18 UTC
+++ configure
@@ -1714,7 +1714,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux; do
+for ac_dir in `pwd`/build-aux; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"

View File

@ -0,0 +1,10 @@
--- src/utils/Config.java.orig 2015-11-04 10:25:48 UTC
+++ src/utils/Config.java
@@ -509,6 +509,7 @@ public class Config {
} else {
file_locations.add("/etc/opentsdb.conf");
file_locations.add("/etc/opentsdb/opentsdb.conf");
+ file_locations.add("%%PREFIX%%/etc/opentsdb/opentsdb.conf");
file_locations.add("/opt/opentsdb/opentsdb.conf");
}

View File

@ -0,0 +1,7 @@
OpenTSDB is a distributed, scalable Time Series Database (TSDB) written
on top of HBase. OpenTSDB was written to address a common need: store,
index and serve metrics collected from computer systems (network gear,
operating systems, applications) at a large scale, and make this data
easily accessible and graphable.
WWW: http://www.opentsdb.net

View File

@ -0,0 +1,47 @@
bin/tsdb
%%DATADIR%%/bin/mygnuplot.bat
%%DATADIR%%/bin/mygnuplot.sh
%%DATADIR%%/bin/tsdb
%%DATADIR%%/lib/async-1.4.0.jar
%%DATADIR%%/lib/asynchbase-1.6.0.jar
%%DATADIR%%/lib/guava-18.0.jar
%%DATADIR%%/lib/jackson-annotations-2.4.3.jar
%%DATADIR%%/lib/jackson-core-2.4.3.jar
%%DATADIR%%/lib/jackson-databind-2.4.3.jar
%%DATADIR%%/lib/log4j-over-slf4j-1.7.7.jar
%%DATADIR%%/lib/logback-classic-1.0.13.jar
%%DATADIR%%/lib/logback-core-1.0.13.jar
%%DATADIR%%/lib/netty-3.9.4.Final.jar
%%DATADIR%%/lib/protobuf-java-2.5.0.jar
%%DATADIR%%/lib/slf4j-api-1.7.7.jar
%%DATADIR%%/lib/tsdb-2.1.1.jar
%%DATADIR%%/lib/zookeeper-3.3.6.jar
%%DATADIR%%/static/clear.cache.gif
%%DATADIR%%/static/favicon.ico
%%DATADIR%%/static/gwt/standard/images/corner.png
%%DATADIR%%/static/gwt/standard/images/corner_ie6.png
%%DATADIR%%/static/gwt/standard/images/hborder.png
%%DATADIR%%/static/gwt/standard/images/hborder_ie6.png
%%DATADIR%%/static/gwt/standard/images/ie6/corner_dialog_topleft.png
%%DATADIR%%/static/gwt/standard/images/ie6/corner_dialog_topright.png
%%DATADIR%%/static/gwt/standard/images/ie6/hborder_blue_shadow.png
%%DATADIR%%/static/gwt/standard/images/ie6/hborder_gray_shadow.png
%%DATADIR%%/static/gwt/standard/images/ie6/vborder_blue_shadow.png
%%DATADIR%%/static/gwt/standard/images/ie6/vborder_gray_shadow.png
%%DATADIR%%/static/gwt/standard/images/splitPanelThumb.png
%%DATADIR%%/static/gwt/standard/images/vborder.png
%%DATADIR%%/static/gwt/standard/images/vborder_ie6.png
%%DATADIR%%/static/gwt/standard/standard.css
%%DATADIR%%/static/gwt/standard/standard_rtl.css
%%DATADIR%%/static/hosted.html
%%DATADIR%%/static/queryui.nocache.js
%%DATADIR%%/tools/check_tsd
%%DATADIR%%/tools/clean_cache.sh
%%DATADIR%%/tools/create_table.sh
%%DATADIR%%/tools/opentsdb_restart.py
%%DATADIR%%/tools/tsddrain.py
%%DATADIR%%/tools/upgrade_1to2.sh
%%ETCDIR%%/logback.xml
@sample %%ETCDIR%%/opentsdb.conf.sample
@dir(opentsdb,opentsdb,750) /var/log/opentsdb
@dir(opentsdb,opentsdb,750) /var/run/opentsdb