Index: GIDs =================================================================== --- GIDs +++ GIDs @@ -242,6 +242,7 @@ fossy:*:901:www scanlogd:*:902: _ocserv:*:903: +opentsdb:*:906: influxd:*:907: riemann:*:908: proxy65:*:909: Index: UIDs =================================================================== --- UIDs +++ UIDs @@ -249,6 +249,7 @@ fossy:*:901:901::0:0:FOSSology user:/usr/local/share/fossology:/usr/local/bin/bash scanlogd:*:902:902::0:0:scanlogd user:/nonexistent:/usr/sbin/nologin _ocserv:*:903:903::0:0:ocserv user:/nonexistent:/usr/sbin/nologin +opentsdb:*:906:906::0:0:OpenTSDB Daemon:/var/empty:/usr/sbin/nologin influxd:*:907:907::0:0:InfluxDB Daemon:/var/empty:/usr/sbin/nologin riemann:*:908:908::0:0:Riemann User:/var/empty:/usr/sbin/nologin proxy65:*:909:909::0:0:Proxy65 Daemon:/nonexistent:/usr/sbin/nologin Index: databases/Makefile =================================================================== --- databases/Makefile +++ databases/Makefile @@ -244,6 +244,7 @@ SUBDIR += openark-kit SUBDIR += openbase-jdbc SUBDIR += opendbx + SUBDIR += opentsdb SUBDIR += oracle7-client SUBDIR += oracle8-client SUBDIR += oracle_odbc_driver @@ -703,6 +704,7 @@ SUBDIR += proftpd-mod_sql_postgres SUBDIR += proftpd-mod_sql_sqlite SUBDIR += proftpd-mod_sql_tds + SUBDIR += psqlodbc SUBDIR += puppetdb SUBDIR += puppetdb-terminus SUBDIR += pure-sql3 Index: databases/opentsdb/Makefile =================================================================== --- /dev/null +++ databases/opentsdb/Makefile @@ -0,0 +1,59 @@ +# Created by: Johannes Meixner +# $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 + +OPENTSDB_USER= opentsdb +OPENTSDB_GROUP= opentsdb + +USERS= ${OPENTSDB_USER} +GROUPS= ${OPENTSDB_GROUP} + +USE_RC_SUBR= opentsdb + +SUB_LIST= OPENTSDB_USER="${OPENTSDB_USER}" \ + OPENTSDB_GROUP="${OPENTSDB_GROUP}" \ + 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} + ${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 Index: databases/opentsdb/distinfo =================================================================== --- /dev/null +++ databases/opentsdb/distinfo @@ -0,0 +1,2 @@ +SHA256 (opentsdb-2.1.1.tar.gz) = 2b091fd59941a5af21f8fb5195025f541e15d83853f78e1b0ab90db4f36e8b9f +SIZE (opentsdb-2.1.1.tar.gz) = 74609397 Index: databases/opentsdb/files/opentsdb.in =================================================================== --- /dev/null +++ databases/opentsdb/files/opentsdb.in @@ -0,0 +1,78 @@ +#!/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" +procname="%%PREFIX%%/bin/tsdb" + +command="/usr/sbin/daemon" +command_args="-p ${pidfile} -r ${procname} ${opentsdb_opts}" + +start_cmd="${name}_start" +status_cmd="${name}_status" +stop_cmd="${name}_stop" + + +opentsdb_start() +{ + opentsdb_findpid + if [ ! ${mypid} = '' ]; then + echo "${name} is running with PID ${mypid}."; + else + echo "Starting ${name}." + eval "${command} ${command_args}" + fi +} + +opentsdb_status() +{ + opentsdb_findpid + if [ ! ${mypid} = '' ]; then + echo "${name} is running with PID ${mypid}."; + else + echo "${name} not running?"; + return 1 + fi +} + +opentsdb_stop() +{ + opentsdb_findpid + if [ ! ${mypid} = '' ]; then + echo "Stopping ${name}."; + kill -TERM ${mypid}; + wait_for_pids ${mypid}; + else + echo "${name} not running?"; + fi +} + + +opentsdb_findpid() +{ + if pgrep -q -F ${pidfile} 2>/dev/null; then + mypid=$(cat ${pidfile}) + mypid=$(pgrep -f "daemon: %%PREFIX%%/bin/tsdb\[${mypid}\]") + fi +} + +run_rc_command "$1" + Index: databases/opentsdb/files/patch-Makefile.in =================================================================== --- /dev/null +++ databases/opentsdb/files/patch-Makefile.in @@ -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)"; \ Index: databases/opentsdb/files/patch-configure =================================================================== --- /dev/null +++ databases/opentsdb/files/patch-configure @@ -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" Index: databases/opentsdb/files/patch-src_utils_Config.java =================================================================== --- /dev/null +++ databases/opentsdb/files/patch-src_utils_Config.java @@ -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"); + } + Index: databases/opentsdb/pkg-descr =================================================================== --- /dev/null +++ databases/opentsdb/pkg-descr @@ -0,0 +1,15 @@ +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. + +Thanks to HBase's scalability, OpenTSDB allows you to collect thousands of +metrics from tens of thousands of hosts and applications, at a high rate +(every few seconds). OpenTSDB will never delete or downsample data and can +easily store hundreds of billions of data points. + +OpenTSDB is free software and is available under both LGPLv2.1+ and GPLv3+. +Find more about OpenTSDB at http://opentsdb.net + +WWW: http://www.opentsdb.net Index: databases/opentsdb/pkg-plist =================================================================== --- /dev/null +++ databases/opentsdb/pkg-plist @@ -0,0 +1,46 @@ +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