aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/logstash6/Makefile65
-rw-r--r--sysutils/logstash6/distinfo3
-rw-r--r--sysutils/logstash6/files/logstash.conf.sample45
-rw-r--r--sysutils/logstash6/files/logstash.in108
-rw-r--r--sysutils/logstash6/pkg-descr6
-rw-r--r--sysutils/logstash6/pkg-message14
7 files changed, 242 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 4bd39a949439..b4859a89329a 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -585,6 +585,7 @@
SUBDIR += logstash
SUBDIR += logstash-forwarder
SUBDIR += logstash5
+ SUBDIR += logstash6
SUBDIR += logtool
SUBDIR += logwatch
SUBDIR += lookat
diff --git a/sysutils/logstash6/Makefile b/sysutils/logstash6/Makefile
new file mode 100644
index 000000000000..1667fe4d146c
--- /dev/null
+++ b/sysutils/logstash6/Makefile
@@ -0,0 +1,65 @@
+# Created by: Daniel Solsona <daniel@ish.com.au>, Guido Falsi <madpilot@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= logstash
+PORTVERSION= 6.2.2
+CATEGORIES= sysutils java
+MASTER_SITES= http://artifacts.elastic.co/downloads/logstash/
+PKGNAMESUFFIX= 6
+
+MAINTAINER= feld@FreeBSD.org
+COMMENT= Server-side data ingest and transfomation tool
+
+LICENSE= APACHE20
+
+RUN_DEPENDS= ${LOCALBASE}/bin/bash:shells/bash
+
+CONFLICTS= logstash-[0-9]* logstash5-[0-9]*
+
+USES= cpe shebangfix
+SHEBANG_FILES= bin/logstash
+CPE_VENDOR= elasticsearch
+USE_JAVA= yes
+JAVA_VERSION= 1.8+
+JAVA_RUN= yes
+NO_BUILD= yes
+
+LOGSTASH_DIR= ${PREFIX}/${PORTNAME}
+
+USE_RC_SUBR= logstash
+
+LOGSTASH_HOME?= ${PREFIX}/${PORTNAME}
+
+SUB_LIST= JAVA_HOME=${JAVA_HOME} \
+ LOGSTASH_HOME=${LOGSTASH_HOME}
+
+LOGSTASH_BIN_FILES= logstash
+LOGSTASH_JRUBY_SUBDIR= vendor/jruby/bin
+LOGSTASH_JRUBY_BIN_FILES= ast irb jirb jruby jruby.sh rdoc testrb gem \
+ jgem jirb_swing jruby.bash jrubyc rake ri
+
+do-install:
+ @${FIND} ${WRKSRC} -name '*.bat' -delete
+ ${MKDIR} ${STAGEDIR}${ETCDIR}
+ @(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${LOGSTASH_DIR})
+ ${INSTALL_DATA} ${FILESDIR}/logstash.conf.sample ${STAGEDIR}${ETCDIR}
+.for x in ${LOGSTASH_BIN_FILES}
+ @${CHMOD} ${BINMODE} ${STAGEDIR}${LOGSTASH_DIR}/bin/${x}
+.endfor
+.for x in ${LOGSTASH_JRUBY_BIN_FILES}
+ @${CHMOD} ${BINMODE} ${STAGEDIR}${LOGSTASH_DIR}/${LOGSTASH_JRUBY_SUBDIR}/${x}
+.endfor
+
+post-install:
+ ${ECHO} "@sample ${ETCDIR}/logstash.conf.sample" >> ${TMPPLIST}
+ ${FIND} -s ${STAGEDIR}${PREFIX}/logstash -not -type d | ${SORT} | \
+ ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
+ ${ECHO} "@dir logstash/data" >> ${TMPPLIST}
+ ${ECHO} "@dir logstash/vendor/bundle/jruby/2.3.0/build_info" >> ${TMPPLIST}
+ ${ECHO} "@dir logstash/vendor/bundle/jruby/2.3.0/cache" >> ${TMPPLIST}
+ ${ECHO} "@dir logstash/vendor/bundle/jruby/2.3.0/doc" >> ${TMPPLIST}
+ ${ECHO} "@dir logstash/vendor/bundle/jruby/2.3.0/extensions" >> ${TMPPLIST}
+ ${ECHO} "@dir logstash/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.1-java/spec/ssl" >> ${TMPPLIST}
+ ${ECHO} "@dir logstash/vendor/bundle/jruby/2.3.0/gems/redis-3.3.5/test/db" >> ${TMPPLIST}
+
+.include <bsd.port.mk>
diff --git a/sysutils/logstash6/distinfo b/sysutils/logstash6/distinfo
new file mode 100644
index 000000000000..7bb66b62b8bc
--- /dev/null
+++ b/sysutils/logstash6/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1519746290
+SHA256 (logstash-6.2.2.tar.gz) = 40ec30d14e14dde4664a625f410d9d93b1d80abb4235334bf680a35f1f0c4b9d
+SIZE (logstash-6.2.2.tar.gz) = 139464029
diff --git a/sysutils/logstash6/files/logstash.conf.sample b/sysutils/logstash6/files/logstash.conf.sample
new file mode 100644
index 000000000000..2f974f7d721f
--- /dev/null
+++ b/sysutils/logstash6/files/logstash.conf.sample
@@ -0,0 +1,45 @@
+input {
+
+ file {
+ type => "syslog"
+ # path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ]
+ path => "/var/log/messages"
+ start_position => "beginning"
+ }
+}
+
+filter {
+# An filter may change the regular expression used to match a record or a field,
+# alter the value of parsed fields, add or remove fields, etc.
+#
+# if [type] == "syslog" {
+# grok {
+# match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} (%{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}|%{GREEDYDATA:syslog_message})" }
+# add_field => [ "received_at", "%{@timestamp}" ]
+# add_field => [ "received_from", "%{@source_host}" ]
+# }
+#
+# if !("_grokparsefailure" in [tags]) {
+# mutate {
+# replace => [ "@source_host", "%{syslog_hostname}" ]
+# replace => [ "@message", "%{syslog_message}" ]
+# }
+# }
+# mutate {
+# remove_field => [ "syslog_hostname", "syslog_message" ]
+# }
+# date {
+# match => [ "syslog_timestamp","MMM d HH:mm:ss", "MMM dd HH:mm:ss", "ISO8601" ]
+# }
+# syslog_pri { }
+# }
+}
+
+output {
+ # Emit events to stdout for easy debugging of what is going through
+ # logstash.
+ # stdout { codec => rubydebug }
+
+ # This will use elasticsearch to store your logs.
+ # elasticsearch { hosts => [ "localhost:9200" ] }
+}
diff --git a/sysutils/logstash6/files/logstash.in b/sysutils/logstash6/files/logstash.in
new file mode 100644
index 000000000000..dae70d7a91d6
--- /dev/null
+++ b/sysutils/logstash6/files/logstash.in
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+# Configuration settings for logstash in /etc/rc.conf:
+#
+# PROVIDE: logstash
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+#
+# logstash_enable (bool):
+# Default value: "NO"
+# Flag that determines whether Logstash is enabled.
+#
+# logstash_home (string):
+# Default value: "/usr/local/logstash"
+# Logstash installation directory.
+#
+# logstash_config (string):
+# Default value: /usr/local/etc/${name}/${name}.conf
+# Logstash configuration file path.
+#
+# logstash_log (bool):
+# Set to "NO" by default.
+# Set it to "YES" to enable logstash logging to file
+# Default output to /var/log/logstash.log
+#
+# logstash_log_file (string):
+# Default value: "${logdir}/${name}.log"
+# Log file path.
+#
+# logstash_java_home (string):
+# Default value: "/usr/local/openjdk8"
+# Root directory of the desired Java SDK.
+# The JAVA_HOME environment variable is set with the contents of this
+# variable.
+#
+# logstash_java_opts (string):
+# Default value: ""
+# Options to pass to the Java Virtual Machine.
+# The JAVA_OPTS environment variable is set with the contents of this
+# variable.
+#
+# logstash_opts (string):
+# Default value: ""
+# Additional command line flags for logstash, eg. "-r"
+#
+
+. /etc/rc.subr
+
+name=logstash
+rcvar=logstash_enable
+
+load_rc_config ${name}
+
+logdir="/var/log"
+
+: ${logstash_enable="NO"}
+: ${logstash_home="%%LOGSTASH_HOME%%"}
+: ${logstash_config="%%ETCDIR%%/${name}.conf"}
+: ${logstash_log="YES"}
+: ${logstash_log_dir="${logdir}/${name}"}
+: ${logstash_java_home="%%JAVA_HOME%%"}
+: ${logstash_java_opts=""}
+: ${logstash_opts=""}
+
+piddir=/var/run/${name}
+pidfile=${piddir}/${name}.pid
+
+if [ -d $piddir ]; then
+ mkdir -p $piddir
+fi
+
+start_precmd="logstash_precmd"
+
+logstash_cmd="${logstash_home}/bin/logstash"
+procname="${logstash_java_home}/bin/java"
+
+logstash_chdir=${logstash_home}
+logstash_log_options=""
+
+if checkyesno logstash_log; then
+ logstash_log_options=" -l ${logstash_log_dir}"
+fi
+
+logstash_args="-f ${logstash_config} ${logstash_log_options} ${logstash_opts}"
+
+JAVA_OPTS="${logstash_java_opts}"
+JAVA_HOME="${logstash_java_home}"
+export JAVA_OPTS
+export JAVA_HOME
+
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} ${logstash_cmd} ${logstash_args}"
+required_files="${logstash_home} ${logstash_java_home} ${logstash_cmd} ${logstash_config}"
+
+# Include /usr/local/bin in path because Logstash startup scripts
+# assume bash is in path.
+PATH=/usr/local/bin:$PATH
+
+logstash_precmd()
+{
+ /usr/bin/install -d -o root -g wheel -m 755 ${logstash_log_dir}
+ /usr/bin/install -d -o root -g wheel -m 755 /var/db/logstash
+ /usr/bin/install -d -o root -g wheel -m 755 /var/run/logstash
+}
+
+
+run_rc_command "$1"
diff --git a/sysutils/logstash6/pkg-descr b/sysutils/logstash6/pkg-descr
new file mode 100644
index 000000000000..8ef0b4ea8f75
--- /dev/null
+++ b/sysutils/logstash6/pkg-descr
@@ -0,0 +1,6 @@
+Logstash is an open source, server-side data processing pipeline that
+ingests data from a multitude of sources simultaneously, transforms it,
+and then sends it to your favorite “stash.” (Ours is Elasticsearch,
+naturally.)
+
+WWW: https://www.elastic.co/products/logstash
diff --git a/sysutils/logstash6/pkg-message b/sysutils/logstash6/pkg-message
new file mode 100644
index 000000000000..4add4e93a4c7
--- /dev/null
+++ b/sysutils/logstash6/pkg-message
@@ -0,0 +1,14 @@
+To start logstash as an agent during startup, add
+
+ logstash_enable="YES"
+
+to your /etc/rc.conf.
+
+Extra options can be found in startup script.
+
+NOTE: Since version 1.5.0, logstash is started in agent mode.
+The Kibana web application is no longer embedded in this Logstash
+distribution.
+
+NOTE: Since version 2, logstash does not support an embedded
+ElasticSearch instance.