aboutsummaryrefslogtreecommitdiff
path: root/sysutils/graylog
diff options
context:
space:
mode:
authorPalle Girgensohn <girgen@FreeBSD.org>2017-03-03 23:58:02 +0000
committerPalle Girgensohn <girgen@FreeBSD.org>2017-03-03 23:58:02 +0000
commit2dee12c1fe03145f084664b50827824c68349734 (patch)
treef2a3d0e38e29c2c3345660ab8f8247f76f33141e /sysutils/graylog
parentdb8f320fa263f8064291e0590af1d4c545e69960 (diff)
downloadports-2dee12c1fe03145f084664b50827824c68349734.tar.gz
ports-2dee12c1fe03145f084664b50827824c68349734.zip
Update graylog to latest version, 2.2.1
PR: 216593
Notes
Notes: svn path=/head/; revision=435375
Diffstat (limited to 'sysutils/graylog')
-rw-r--r--sysutils/graylog/Makefile30
-rw-r--r--sysutils/graylog/distinfo5
-rw-r--r--sysutils/graylog/files/graylog.in66
-rw-r--r--sysutils/graylog/files/pkg-message.in10
-rw-r--r--sysutils/graylog/files/server.conf.sample.in (renamed from sysutils/graylog/files/graylog.conf.example)6
-rw-r--r--sysutils/graylog/pkg-plist12
6 files changed, 79 insertions, 50 deletions
diff --git a/sysutils/graylog/Makefile b/sysutils/graylog/Makefile
index a3ab2741594f..7e9b8edeed62 100644
--- a/sysutils/graylog/Makefile
+++ b/sysutils/graylog/Makefile
@@ -2,10 +2,10 @@
# $FreeBSD$
PORTNAME= graylog
-PORTVERSION= 1.3.3
+PORTVERSION= 2.2.1
CATEGORIES= sysutils java
-MASTER_SITES= https://packages.graylog2.org/releases/graylog2-server/ \
- http://packages.graylog2.org/releases/graylog2-server/
+MASTER_SITES= https://packages.graylog2.org/releases/graylog/ \
+ http://packages.graylog2.org/releases/graylog/
MAINTAINER= thomas@bartelmess.io
COMMENT= Tool for centralized log collection
@@ -16,29 +16,33 @@ USES= tar:tgz
USE_JAVA= yes
JAVA_VERSION= 1.7+
JAVA_EXTRACT= yes
+NO_ARCH= yes
JAVA_RUN= yes
NO_BUILD= yes
-GRAYLOG_DIR= ${PREFIX}/${PORTNAME}
-
USE_RC_SUBR= graylog
+SUB_FILES= server.conf.sample pkg-message
GRAYLOGUSER?= graylog
GRAYLOGGROUP?= ${GRAYLOGUSER}
USERS= ${GRAYLOGUSER}
GROUPS= ${GRAYLOGGROUP}
+GRAYLOG_DATA_DIR= /var/db/graylog
SUB_LIST= GRAYLOGUSER=${GRAYLOGUSER} \
GRAYLOGGROUP=${GRAYLOGGROUP} \
- JAVA_HOME=${JAVA_HOME} \
- GRAYLOG_DIR=${GRAYLOG_DIR} \
- ETCDIR=${ETCDIR}
+ GRAYLOG_DATA_DIR=${GRAYLOG_DATA_DIR}
+
+PLIST_SUB= GRAYLOG_DATA_DIR=${GRAYLOG_DATA_DIR} \
+ GRAYLOGUSER=${GRAYLOGUSER} \
+ GRAYLOGGROUP=${GRAYLOGGROUP}
do-install:
- ${MKDIR} ${STAGEDIR}${GRAYLOG_DIR}
- ${MKDIR} ${STAGEDIR}${ETCDIR}
- ${INSTALL_DATA} ${WRKSRC}/graylog.jar ${STAGEDIR}${GRAYLOG_DIR}
- ${INSTALL_DATA} ${WRKSRC}/graylog.conf.example ${STAGEDIR}${ETCDIR}
- ${INSTALL_DATA} ${FILESDIR}/graylog_logging.xml ${STAGEDIR}${ETCDIR}
+ ${MKDIR} ${STAGEDIR}${DATADIR}/plugin
+ ${MKDIR} ${STAGEDIR}${ETCDIR}/server
+ ${MKDIR} ${STAGEDIR}${GRAYLOG_DATA_DIR}
+ ${INSTALL_DATA} ${WRKSRC}/graylog.jar ${STAGEDIR}${DATADIR}
+ (cd ${WRKSRC}/plugin && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/plugin)
+ ${INSTALL_DATA} ${WRKDIR}/server.conf.sample ${STAGEDIR}${ETCDIR}/server/server.conf.sample
.include <bsd.port.mk>
diff --git a/sysutils/graylog/distinfo b/sysutils/graylog/distinfo
index 0a0b356c191e..33592970a08c 100644
--- a/sysutils/graylog/distinfo
+++ b/sysutils/graylog/distinfo
@@ -1,2 +1,3 @@
-SHA256 (graylog-1.3.3.tgz) = 1e98509376dc22ff1602838cebb49b4732618296acc58063ba34f4a97f667ba0
-SIZE (graylog-1.3.3.tgz) = 70204863
+TIMESTAMP = 1488453914
+SHA256 (graylog-2.2.1.tgz) = c7b322477882880b51e59bdd8d858fe50c59760dffb411d0b4a92f61bd797ca6
+SIZE (graylog-2.2.1.tgz) = 99202584
diff --git a/sysutils/graylog/files/graylog.in b/sysutils/graylog/files/graylog.in
index 1068f46b13b4..e9ab56b9d115 100644
--- a/sysutils/graylog/files/graylog.in
+++ b/sysutils/graylog/files/graylog.in
@@ -19,7 +19,7 @@
# Name of the graylog group
#
# graylog_config (string)
-# Default value %%ETCDIR%%/graylog.conf
+# Default value %%ETCDIR%%/server/server.conf
# Path to the graylog configuration file
#
# graylog_min_mem (string):
@@ -31,20 +31,20 @@
# Maximum JVM heap size
#
# graylog_dir (string):
-# Default value: %%GRAYLOG_DIR%%
-# Path the the graylog installation.
+# Default value: %%DATADIR%%
+# Path to the graylog installation.
+#
+# graylog_data_dir (string):
+# Default vaule: %%GRAYLOG_DATA_DIR%%
+# Storage location for the graylog journal
#
# graylog_run_dir (string):
# Default value: /var/graylog
-# Path the the graylog run folder.
-#
-# graylog_java_home (string):
-# Default value: %%JAVA_HOME%%
-# Root directory of the desired Java SDK.
+# Path to the graylog run folder.
#
-# graylog_log4j_config (string):
-# Default value: file://%%ETCDIR%%/graylog_logging.xml
-# Path to the log4j configuration file for graylog
+# graylog_log_file (string):
+# Default value: /var/log/graylog-server.log
+# Path to the Graylog Server logfile
. /etc/rc.subr
@@ -55,13 +55,13 @@ load_rc_config $name
: ${graylog_enable:="NO"}
: ${graylog_user:="%%GRAYLOGUSER%%"}
: ${graylog_group:="%%GRAYLOGGROUP%%"}
-: ${graylog_config:="%%ETCDIR%%/${name}.conf"}
+: ${graylog_config:="%%ETCDIR%%/server/server.conf"}
: ${graylog_min_mem:="256m"}
: ${graylog_max_mem:="1g"}
-: ${graylog_dir:="%%GRAYLOG_DIR%%"}
-: ${graylog_run_dir:="/var/graylog"}
-: ${graylog_java_home:="%%JAVA_HOME%%"}
-: ${graylog_log4j_config="file://%%ETCDIR%%/graylog_logging.xml"}
+: ${graylog_dir:="%%DATADIR%%"}
+: ${graylog_data_dir:="%%GRAYLOG_DATA_DIR%%"}
+: ${graylog_run_dir:="/var/run/graylog"}
+: ${graylog_log_file:="/var/log/graylog-server.log"}
java_options=" -Xms${graylog_min_mem} \
@@ -72,25 +72,33 @@ java_options=" -Xms${graylog_min_mem} \
-XX:+CMSConcurrentMTEnabled \
-XX:+CMSClassUnloadingEnabled \
-XX:+UseParNewGC \
- -XX:-OmitStackTraceInFastThrow\
- -Djava.library.path=${graylog_dir}/lib/sigar \
- -Dlog4j.configuration=${graylog_log4j_config}"
+ -XX:-OmitStackTraceInFastThrow"
start_precmd="graylog_precmd"
-pidfile=/var/run/${name}.pid
-command=/usr/sbin/daemon
-procname=`env JAVAVM_DRYRUN=true JAVA_VERSION=1.7+ %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -f 2 -d =`
+pidfile="${graylog_run_dir}/${name}.pid"
+command=/usr/bin/nohup
-command_args="-p $pidfile -f /usr/local/bin/java ${java_options} -jar ${graylog_dir}/graylog.jar server --configfile ${graylog_config} --no-pid-file"
+command_args="%%LOCALBASE%%/bin/java -jar ${graylog_dir}/graylog.jar server \
+ --configfile \"${graylog_config}\" \
+ --pidfile \"${pidfile}\" \
+ >> \"${graylog_log_file}\" \
+ 2>> \"${graylog_log_file}\" &"
graylog_precmd() {
- /usr/bin/install -d -o ${graylog_group} -g ${graylog_group} -m 755 /var/log/graylog
- /usr/bin/install -d -o ${graylog_group} -g ${graylog_group} -m 755 /var/log/graylog/server
- /usr/bin/install -d -o ${graylog_group} -g ${graylog_group} -m 755 ${graylog_run_dir}
- touch $pidfile
- chown ${graylog_user}:${graylog_group} ${pidfile}
- cd ${graylog_run_dir}
+ if [ ! -f "${graylog_config}" ]; then
+ echo "Configuration file ${graylog_config} not found"
+ exit 1
+ fi
+
+ if [ ! -f "${graylog_log_file}" ]; then
+ touch "${graylog_log_file}"
+ chown "${graylog_user}:${graylog_group}" "${graylog_log_file}"
+ chmod 640 "${graylog_log_file}"
+ fi
+
+ install -d -o ${graylog_user} -g ${graylog_group} -m 750 "${graylog_data_dir}"
+ install -d -o ${graylog_user} -g ${graylog_group} -m 750 "${graylog_run_dir}"
}
run_rc_command "$1"
diff --git a/sysutils/graylog/files/pkg-message.in b/sysutils/graylog/files/pkg-message.in
new file mode 100644
index 000000000000..0c080fcc8d53
--- /dev/null
+++ b/sysutils/graylog/files/pkg-message.in
@@ -0,0 +1,10 @@
+======================================================================
+
+Please see %%ETCDIR%% for sample versions of
+server.conf
+
+For GeoIP support you need to install the net/GeoIP port and
+configure the path to the GeoIP databases in the Graylog Web Interface
+
+When running graylog in a jail, you need to set enforce_statfs for the jail.
+======================================================================
diff --git a/sysutils/graylog/files/graylog.conf.example b/sysutils/graylog/files/server.conf.sample.in
index d014e25862ea..e48dd0ea57fe 100644
--- a/sysutils/graylog/files/graylog.conf.example
+++ b/sysutils/graylog/files/server.conf.sample.in
@@ -30,7 +30,7 @@ root_password_sha2 =
#root_timezone = UTC
# Set plugin directory here (relative or absolute)
-plugin_dir = plugin
+plugin_dir = %%DATADIR%%/plugin
# REST API listen URI. Must be reachable by other graylog2-server nodes if you run a cluster.
rest_listen_uri = http://127.0.0.1:12900/
@@ -247,7 +247,7 @@ message_journal_enabled = true
# The directory which will be used to store the message journal. The directory must me exclusively used by Graylog and
# must not contain any other files than the ones created by Graylog itself.
-message_journal_dir = data/journal
+message_journal_dir = %%GRAYLOG_DATA_DIR%%/journal
# Journal hold messages before they could be written to Elasticsearch.
# For a maximum of 12 hours or 5 GB whichever happens first.
@@ -372,5 +372,5 @@ mongodb_threads_allowed_to_block_multiplier = 5
#enable_metrics_collection = false
# Disable the use of SIGAR for collecting system stats
-#disable_sigar = false
+disable_sigar = true
diff --git a/sysutils/graylog/pkg-plist b/sysutils/graylog/pkg-plist
index 41d402072656..164c460e934e 100644
--- a/sysutils/graylog/pkg-plist
+++ b/sysutils/graylog/pkg-plist
@@ -1,3 +1,9 @@
-%%ETCDIR%%/graylog.conf.example
-%%ETCDIR%%/graylog_logging.xml
-graylog/graylog.jar
+@sample(%%GRAYLOGUSER%%,%%GRAYLOGGROUP%%,440) %%ETCDIR%%/server/server.conf.sample
+%%DATADIR%%/graylog.jar
+%%DATADIR%%/plugin/graylog-plugin-anonymous-usage-statistics-2.2.1.jar
+%%DATADIR%%/plugin/graylog-plugin-beats-2.2.1.jar
+%%DATADIR%%/plugin/graylog-plugin-collector-2.2.1.jar
+%%DATADIR%%/plugin/graylog-plugin-enterprise-integration-2.2.1.jar
+%%DATADIR%%/plugin/graylog-plugin-map-widget-2.2.1.jar
+%%DATADIR%%/plugin/graylog-plugin-pipeline-processor-2.2.1.jar
+@dir(%%GRAYLOGUSER%%,%%GRAYLOGGROUP%%,440) %%GRAYLOG_DATA_DIR%%