aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/riemann
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2015-02-27 19:35:09 +0000
committerKurt Jaeger <pi@FreeBSD.org>2015-02-27 19:35:09 +0000
commit32f2e44036777f3ebe50c59bed1cd42fa8325587 (patch)
tree851540e3dcb13396dc732b2cb8dbd4eeda6893a4 /net-mgmt/riemann
parent51610932057ec040091419df2a89214c45df087d (diff)
downloadports-32f2e44036777f3ebe50c59bed1cd42fa8325587.tar.gz
ports-32f2e44036777f3ebe50c59bed1cd42fa8325587.zip
Notes
Diffstat (limited to 'net-mgmt/riemann')
-rw-r--r--net-mgmt/riemann/Makefile62
-rw-r--r--net-mgmt/riemann/distinfo2
-rw-r--r--net-mgmt/riemann/files/riemann.in69
-rw-r--r--net-mgmt/riemann/pkg-descr11
-rw-r--r--net-mgmt/riemann/pkg-plist4
5 files changed, 148 insertions, 0 deletions
diff --git a/net-mgmt/riemann/Makefile b/net-mgmt/riemann/Makefile
new file mode 100644
index 000000000000..955a69c67c82
--- /dev/null
+++ b/net-mgmt/riemann/Makefile
@@ -0,0 +1,62 @@
+# Created by: Dave Cottlehuber <dch@skunkwerks.at>
+# $FreeBSD$
+
+PORTNAME= riemann
+PORTVERSION= 0.2.8
+CATEGORIES= net-mgmt java
+MASTER_SITES= http://aphyr.com/${PORTNAME}/
+
+MAINTAINER= dch@skunkwerks.at
+COMMENT= Monitors distributed systems
+
+LICENSE= EPL
+
+USES= tar:bzip2
+NO_BUILD= yes
+NO_ARCH= yes
+USE_JAVA= yes
+JAVA_VERSION= 1.7+
+
+SUB_FILES= ${PORTNAME}
+SUB_LIST+= JAVA_HOME=${JAVA_HOME} \
+ RIEMANN_USER=${RIEMANN_USER} \
+ RIEMANN_GROUP=${RIEMANN_GROUP} \
+ RIEMANN_PIDDIR=${RIEMANN_PIDDIR} \
+ RIEMANN_LOGDIR=${RIEMANN_LOGDIR}
+
+PLIST_SUB= JAVA_HOME=${JAVA_HOME} \
+ RIEMANN_USER=${RIEMANN_USER} \
+ RIEMANN_GROUP=${RIEMANN_GROUP} \
+ RIEMANN_PIDDIR=${RIEMANN_PIDDIR} \
+ RIEMANN_LOGDIR=${RIEMANN_LOGDIR}
+
+RIEMANN_USER?= ${PORTNAME}
+RIEMANN_GROUP?= ${PORTNAME}
+
+.if ${RIEMANN_USER} == "${PORTNAME}"
+USERS= ${PORTNAME}
+.endif
+.if ${RIEMANN_GROUP} == "${PORTNAME}"
+GROUPS= ${PORTNAME}
+.endif
+
+USE_RC_SUBR= ${PORTNAME}
+
+RIEMANN_LOGDIR= /var/log/${PORTNAME}/
+RIEMANN_PIDDIR= /var/run/${PORTNAME}/
+
+do-install:
+ ${MKDIR} \
+ ${STAGEDIR}${JAVAJARDIR} \
+ ${STAGEDIR}${ETCDIR} \
+ ${STAGEDIR}${RIEMANN_PIDDIR} \
+ ${STAGEDIR}${RIEMANN_LOGDIR}
+ ${INSTALL_DATA} \
+ ${WRKSRC}/lib/${PORTNAME}.jar \
+ ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar
+ ${SED} -i -e "s:riemann.log:${RIEMANN_LOGDIR}${PORTNAME}.log:g" \
+ ${WRKSRC}/etc/${PORTNAME}.config
+ ${CP} -p ${WRKSRC}/etc/${PORTNAME}.config \
+ ${STAGEDIR}${ETCDIR}/${PORTNAME}.config.sample
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/riemann/distinfo b/net-mgmt/riemann/distinfo
new file mode 100644
index 000000000000..ccee49709e0e
--- /dev/null
+++ b/net-mgmt/riemann/distinfo
@@ -0,0 +1,2 @@
+SHA256 (riemann-0.2.8.tar.bz2) = f5bb666acb878e144471f8c6d7f622193840d127aea96924fd8575e1fb6c57dc
+SIZE (riemann-0.2.8.tar.bz2) = 31826729
diff --git a/net-mgmt/riemann/files/riemann.in b/net-mgmt/riemann/files/riemann.in
new file mode 100644
index 000000000000..6519aac0a3cd
--- /dev/null
+++ b/net-mgmt/riemann/files/riemann.in
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: riemann
+# REQUIRE: LOGIN NETWORKING SERVERS
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# riemann_enable (bool): Set to NO by default.
+# Set it to YES to enable riemann.
+#
+# riemann_config (string): Optional full path for riemann config file
+# riemann_user (user): Set to riemann by default.
+# riemann_group (group): Set to riemann by default.
+# riemann_jarfile (string): Optional path to a custom jarfile.
+# riemann_java_home (args): Specify which JVM to use, if not default.
+# riemann_min_mem (num): Minumum JVM heap size, 256m by default.
+# riemann_max_mem (num): Maximum JVM heap size, 1g by default.
+# riemann_java_opts (args): Additional JVM properties or arguments.
+. /etc/rc.subr
+
+name="riemann"
+rcvar=riemann_enable
+
+load_rc_config $name
+
+: ${riemann_enable="NO"}
+: ${riemann_user:="%%RIEMANN_USER%%"}
+: ${riemann_group:="%%RIEMANN_GROUP%%"}
+: ${riemann_config:="%%PREFIX%%/etc/riemann/riemann.config.sample"}
+: ${riemann_jarfile:="%%JAVAJARDIR%%/riemann.jar"}
+: ${riemann_java_home:="%%JAVA_HOME%%"}
+: ${riemann_min_mem:="256m"}
+: ${riemann_max_mem:="1g"}
+: ${riemann_java_opts:=" -server \
+ -Xms${riemann_min_mem} \
+ -Xmx${riemann_max_mem} \
+ -Xss256k \
+ -Djava.awt.headless=true \
+ -Djava.net.preferIPv4Stack=true \
+ -XX:+AggressiveOpts \
+ -XX:+CMSClassUnloadingEnabled \
+ -XX:+CMSParallelRemarkEnabled \
+ -XX:+DisableExplicitGC \
+ -XX:+HeapDumpOnOutOfMemoryError \
+ -XX:+UseCMSInitiatingOccupancyOnly \
+ -XX:+UseCompressedOops \
+ -XX:+UseConcMarkSweepGC \
+ -XX:+UseFastAccessorMethods \
+ -XX:+UseParNewGC \
+ -XX:CMSInitiatingOccupancyFraction=75 "}
+
+riemann_pidfile="%%RIEMANN_PIDDIR%%${name}.pid"
+command="/usr/sbin/daemon"
+procname="${riemann_java_home}/bin/java"
+command_args="-f -c -p ${riemann_pidfile} ${procname} ${riemann_java_opts} \
+ -jar ${riemann_jarfile} ${riemann_config}"
+required_files="${java_cmd} ${riemann_config}"
+
+riemann_prestart()
+{
+ install -o ${riemann_user} /dev/null ${riemann_pidfile}
+}
+start_precmd=${name}_prestart
+
+run_rc_command "$1"
diff --git a/net-mgmt/riemann/pkg-descr b/net-mgmt/riemann/pkg-descr
new file mode 100644
index 000000000000..c153ce8e39cf
--- /dev/null
+++ b/net-mgmt/riemann/pkg-descr
@@ -0,0 +1,11 @@
+Riemann monitors low-latency, transient shared state for systems with many
+moving parts.
+
+Riemann aggregates events from your servers and applications with a powerful
+stream processing language. Send an email for every exception raised by your
+code. Track the latency distribution of your web app. See the top processes
+on any host, by memory and CPU. Combine statistics from every Riak node in
+your cluster and forward to Graphite. Send alerts when a key process fails
+to check in. Know how many users signed up right this second.
+
+WWW: http://riemann.io/
diff --git a/net-mgmt/riemann/pkg-plist b/net-mgmt/riemann/pkg-plist
new file mode 100644
index 000000000000..8b7d7cb45c85
--- /dev/null
+++ b/net-mgmt/riemann/pkg-plist
@@ -0,0 +1,4 @@
+%%JAVAJARDIR%%/riemann.jar
+@sample %%ETCDIR%%/riemann.config.sample
+@dir(%%RIEMANN_USER%%,%%RIEMANN_GROUP%%,0750) %%RIEMANN_LOGDIR%%
+@dir(%%RIEMANN_USER%%,%%RIEMANN_GROUP%%,0750) %%RIEMANN_PIDDIR%%