Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Updated for 1.1.9 and incorporated some other fixes #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This should include all the bits necessary to build distributable RPMs of the the logstash project (http//logstash.net) suitable for use on RHEL/CentOS/SL machines.

Much of the work herein has been done by Max Horbul (https://github.com/mhorbul).
Contributors:
Aaron Blew (http://github.com/blewa)
- Minor init script work to allow the daemon to run as a user configued in /etc/sysconfig/logstash
- Updated for 1.1.9
4 changes: 2 additions & 2 deletions SOURCES/logstash.init
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

. /etc/rc.d/init.d/functions

[ -f /etc/sysconfig/logstash ] && . /etc/sysconfig/logstash

LOGSTASH_HOME=/opt/logstash
LOGSTASH_USER=logstash
DAEMON=${LOGSTASH_HOME}/bin/logstash

[ -f /etc/sysconfig/logstash ] && . /etc/sysconfig/logstash

NAME=$(basename $0)
SERVICE=agent

Expand Down
8 changes: 7 additions & 1 deletion SOURCES/logstash.sysconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#LOGSTASH_LOGFILE=/var/log/logstash/logstash.log
#LOGSTASH_PATH_CONF=/etc/logstash/conf.d
#LOGSTASH_PATH_PLUGINS=/opt/logstash/plugins
#LOGSTASH_JAVA_OPTS="-Djava.io.tmpdir=/opt/logstash/tmp"
#LOGSTASH_JAVA_OPTS="-Djava.io.tmpdir=/opt/logstash/tmp"
#LOGSTASH_USER=logstash

# Log level may be one of three values.
#LOGSTASH_LOGLEVEL=warn
#LOGSTASH_LOGLEVEL=info
#LOGSTASH_LOGLEVEL=debug
6 changes: 4 additions & 2 deletions SOURCES/logstash.wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ function run_service() {
logfile=$5

if [ "x$logfile" == "x" ]; then
exec "$JAVA" $JAVA_OPTS -jar $LOGSTASH_JAR $service -f "$config" -p "$pluginpath" "$verbose"
exec "$JAVA" $JAVA_OPTS -jar $LOGSTASH_JAR $service -f "$config" -p "$pluginpath" $verbose
rs=$?
else
exec "$JAVA" $JAVA_OPTS -jar $LOGSTASH_JAR $service -f "$config" -l "$logfile" -p "$pluginpath" "$verbose" 2>&1 >> $logfile &
exec "$JAVA" $JAVA_OPTS -jar $LOGSTASH_JAR $service -f "$config" -l "$logfile" -p "$pluginpath" $verbose 2>&1 >> $logfile &
rs=$?
[ $rs -eq 0 -a "x$pidfile" != "x" ] && printf '%d' $! > "$pidfile"
fi
Expand Down Expand Up @@ -98,6 +98,8 @@ do
verbose="-vv"
elif [ "$2" == "info" ]; then
verbose="-v"
else
verbose=""
fi
shift 2
;;
Expand Down
12 changes: 9 additions & 3 deletions SPECS/logstash.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
%define base_install_dir /opt/%{name}

Name: logstash
Version: 1.1.0.1
Release: 1%{?dist}
Version: 1.1.9
Release: 3%{?dist}
Summary: Logstash is a tool for managing events and logs.

Group: System Environment/Daemons
Expand Down Expand Up @@ -73,7 +73,7 @@ if ! getent group logstash >/dev/null; then
groupadd -r logstash
fi

# create ogstash user
# create logstash user
if ! getent passwd logstash >/dev/null; then
useradd -r -g logstash -d %{base_install_dir} \
-s /sbin/nologin -c "Logstash" logstash
Expand Down Expand Up @@ -114,5 +114,11 @@ rm -rf $RPM_BUILD_ROOT


%changelog
* Fri Jan 11 2013 Aaron Blew <aaronblew@gmail.com> - 1.1.9-3
- Package update
- Allow overwriting the user/group via sysconfig file
* Mon Nov 5 2012 Dan Carley <dan.carley@gmail.com> - 1.1.0.1-2
- Fix variable handling of default log level.
- Document available log levels.
* Fri May 4 2012 Maksim Horbul <max@gorbul.net> - 1.1.0-1
- Initial package