summaryrefslogtreecommitdiff
path: root/app-admin/logstash-bin/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-21 18:58:21 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-21 18:58:21 +0100
commit3811bc3072bf19e2be351d2c63f81532945c0f21 (patch)
tree52b4da2dd6e3e391c6d505db21bf24fbedd2cb6e /app-admin/logstash-bin/files
parent741f84b9049559581fdb52d1f8b93b5105c1187b (diff)
gentoo resync : 21.07.2018
Diffstat (limited to 'app-admin/logstash-bin/files')
-rw-r--r--app-admin/logstash-bin/files/logstash.confd-r237
-rw-r--r--app-admin/logstash-bin/files/logstash.initd-r269
-rw-r--r--app-admin/logstash-bin/files/pipelines.yml6
3 files changed, 112 insertions, 0 deletions
diff --git a/app-admin/logstash-bin/files/logstash.confd-r2 b/app-admin/logstash-bin/files/logstash.confd-r2
new file mode 100644
index 000000000000..d9ff0942bc61
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.confd-r2
@@ -0,0 +1,37 @@
+###############################
+# Default settings for logstash
+###############################
+
+# Set a home directory
+#LS_HOME=/var/lib/logstash
+
+# Set data directory
+#LS_DATA_DIR=${LS_HOME}/data
+
+# Arguments to pass to logstash agent
+#LS_OPTS=""
+
+# Arguments to pass to java
+#LS_HEAP_SIZE="500m"
+#LS_JAVA_OPTS="-Djava.io.tmpdir=$HOME"
+
+# user id to be invoked as
+#LS_USER=logstash
+#LS_GROUP=logstash
+
+# logstash logging
+#LS_LOG_DIR=/var/log/logstash
+#LS_USE_GC_LOGGING="true"
+
+# logstash settings directory
+#LS_SETTINGS_DIR=/etc/logstash
+
+# Open file limit
+#LS_OPEN_FILES=16384
+
+# Nice level
+#LS_NICE=19
+
+# If this is set to 1, then when `stop` is called, if the process has
+# not exited within a reasonable time, SIGKILL will be sent next.
+KILL_ON_STOP_TIMEOUT=0
diff --git a/app-admin/logstash-bin/files/logstash.initd-r2 b/app-admin/logstash-bin/files/logstash.initd-r2
new file mode 100644
index 000000000000..e05c837ae709
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.initd-r2
@@ -0,0 +1,69 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+LS_USER=${LS_USER:-logstash}
+LS_GROUP=${LS_GROUP:-$LS_USER}
+LS_LOG_DIR=${LS_LOG_DIR:-/var/log/logstash}
+LS_SETTINGS_DIR=${LS_SETTINGS_DIR:-/etc/logstash}
+LS_HOME=${LS_HOME:-/var/lib/logstash}
+LS_DATA_DIR=${LS_DATA_DIR:-$LS_HOME/data}
+LS_HEAP_SIZE=${LS_HEAP_SIZE:-500m}
+LS_NICE=${LS_NICE:-19}
+LS_JAVA_OPTS=${LS_JAVA_OPTS:-"-Djava.io.tmpdir=${LS_HOME}"}
+LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING:-false}
+LS_OPEN_FILES=${LS_OPEN_FILES:-16384}
+KILL_ON_STOP_TIMEOUT=${KILL_ON_STOP_TIMEOUT:-0}
+
+LS_INSTALL_DIR="/opt/logstash"
+
+command="${LS_INSTALL_DIR}/bin/logstash"
+command_args="--path.data ${LS_DATA_DIR} --path.logs ${LS_LOG_DIR} --path.settings ${LS_SETTINGS_DIR} ${LS_OPTS}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+start_stop_daemon_args="--user ${LS_USER}:${LS_GROUP} \
+ --chdir ${LS_HOME}
+ --nicelevel ${LS_NICE}
+ --env LS_HEAP_SIZE=${LS_HEAP_SIZE}
+ --env LS_JAVA_OPTS=${LS_JAVA_OPTS}
+ --env LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING}"
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+checkconfig() {
+ ebegin "Checking your configuration"
+ ${command} ${command_args} --path.logs "${LS_LOG_DIR}/configcheck" --config.test_and_exit
+ eend $? "Configuration error. Please fix your configuration files."
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ rc_ulimit="-n ${LS_OPEN_FILES}"
+
+ local d
+ for d in "${LS_HOME}" "${LS_DATA_DIR}" "${LS_DATA_DIR}/queue" "${LS_DATA_DIR}/dead_letter_queue" "${LS_LOG_DIR}"; do
+ checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$d"
+ done
+}
+
+stop() {
+ ebegin "Stopping logstash"
+ if [ "${KILL_ON_STOP_TIMEOUT}" = "1" ]; then
+ start-stop-daemon --stop \
+ --pidfile=${pidfile} \
+ --retry=TERM/5/KILL/5
+ else
+ start-stop-daemon --stop \
+ --pidfile=${pidfile}
+ fi
+}
diff --git a/app-admin/logstash-bin/files/pipelines.yml b/app-admin/logstash-bin/files/pipelines.yml
new file mode 100644
index 000000000000..eae903aeb1c7
--- /dev/null
+++ b/app-admin/logstash-bin/files/pipelines.yml
@@ -0,0 +1,6 @@
+# This file is where you define your pipelines. You can define multiple.
+# For more information on multiple pipelines, see the documentation:
+# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html
+
+- pipeline.id: main
+ path.config: "/etc/logstash/conf.d/*.conf"