Skip to content

Commit

Permalink
Update Redhat packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Aharon committed Feb 7, 2012
1 parent 8f57656 commit ac2da27
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 59 deletions.
48 changes: 0 additions & 48 deletions contrib/distro/fedora/graylog2.conf

This file was deleted.

@@ -1,7 +1,7 @@
Name: graylog2
Version: 0.9.5p1
Version: 0.9.6
Release: 1%{?dist}
Summary: Graylog2 is an open source log management solution that stores your logs in MongoDB.
Summary: Graylog2 is an open source log management solution that stores your logs in ElasticSearch.
Group: System Environment/Daemons
License: GPLv2
URL: http://www.graylog2.org/
Expand All @@ -14,7 +14,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-server-%{version}-%{release}-XXXXXX)
Requires: java-1.6.0-openjdk

%description
Graylog2 is an open source syslog implementation that stores your logs in MongoDB. It consists of a server written in Java that accepts your syslog messages via TCP or UDP and stores it in the database. The second part is a Ruby on Rails web interface that allows you to view the log messages.
Graylog2 is an open source syslog implementation that stores your logs in ElasticSearch. It consists of a server written in Java that accepts your syslog messages via TCP or UDP and stores it in the database. The second part is a Ruby on Rails web interface that allows you to view the log messages.


%prep
Expand All @@ -26,18 +26,19 @@ Graylog2 is an open source syslog implementation that stores your logs in MongoD

%install
rm -rf $RPM_BUILD_ROOT
%{__install} -p -D -m 0755 %{SOURCE3} %{buildroot}%{_initrddir}/%{name}

# Directories
%{__install} -p -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}
%{__install} -p -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/rules
%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/rules/%{name}.drl
%{__install} -p -D -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf

%{__install} -p -d -m 0755 %{buildroot}%{_datadir}/%{name}
%{__install} -p -D -m 0644 %{name}-server.jar %{buildroot}%{_datadir}/%{name}/%{name}-server.jar

%{__install} -p -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}

# Files
%{__install} -p -D -m 0755 %{SOURCE3} %{buildroot}%{_initrddir}/%{name}
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/rules/%{name}.drl
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf

%{__install} -p -D -m 0644 %{name}-server.jar %{buildroot}%{_datadir}/%{name}/%{name}-server.jar


%clean
rm -rf $RPM_BUILD_ROOT
Expand Down Expand Up @@ -69,5 +70,12 @@ fi


%changelog
* Mon Feb 6 2012 Daniel Aharon <daharon@sazze.com> - 0.9.6
- Update to 0.9.6
- Fix permissions for files/dirs.

* Mon May 16 2011 Daniel Aharon <daharon@sazze.com> - 0.9.5sazze1
- Modified Graylog2-server to better handle multiple rules in streams.

* Mon May 16 2011 Daniel Aharon <daharon@sazze.com> - 0.9.5p1
- Initial packaging for Fedora.
88 changes: 88 additions & 0 deletions contrib/distro/redhat/graylog2.conf
@@ -0,0 +1,88 @@
# On which port (UDP) should we listen for Syslog messages? (Standard: 514)
syslog_listen_port = 514
syslog_protocol = udp

# ElasticSearch URL (default: http://localhost:9200/)
elasticsearch_url = http://localhost:9200/
elasticsearch_index_name = graylog2

# Always try a reverse DNS lookup instead of parsing hostname from syslog message?
# force_syslog_rdns = false
# Set time to NOW if parsing date/time from syslog message failed instead of rejecting it?
allow_override_syslog_date = true

# MongoDB Configuration
mongodb_useauth = false
#mongodb_user = grayloguser
#mongodb_password = 123
mongodb_host = localhost
#mongodb_replica_set = localhost:27017,localhost:27018,localhost:27019
mongodb_database = graylog2
mongodb_port = 27017

# Raise this according to the maximum connections your MongoDB server can handle if
# you encounter MongoDB connection problems or queuing up messages.
mongodb_max_connections = 150

# Number of threads allowed to be blocked by MongoDB connections multiplier.
# Default: 5
# If mongodb_max_connections is 150, and mongodb_threads_allowed_to_block_multiplier
# is 5, then 750 threads can block. More than that and an exception will be thrown.
# http://api.mongodb.org/java/current/com/mongodb/MongoOptions.html#threadsAllowedToBlockForConnectionMultiplier
mongodb_threads_allowed_to_block_multiplier = 5

# Graylog2 uses an internal message queue that holds all received messages until they# are indexed. The mq_batch_size parameter defines how many messages are sent
# to ElasticSearch at once (using a _bulk update:
# http://www.elasticsearch.org/guide/reference/api/bulk.html)
# The mq_poll_freq parameter controls in which interval (in seconds) the message
# batch is sent. Example: If you leave the standard values
# (mq_batch_size = 4000, mq_poll_freq = 1), Graylog2 will index 4000 messages every
# second. If you have spikes with more than 4000 messages per second, the queue will
# start growing until you get under 4000 messages/second again. The queue is FIFO and
# can grow until you run out of RAM. Note that the queue *only* resists in RAM, so if
# you set the mq_poll_freq to a high value, you may lose a lot of not yet indexed
# messages when the server crashes. Run the server in debug mode
# (java -jar graylog2-server.jar --debug) with a |grep '^INFO' to see debug
# information about the queue and it's size.
# (INFO : org.graylog2.periodical.BulkIndexerThread - About to index max 4000
# messages. You have a total of 103 messages in the queue. [freq:1s])
# You can also monitor the queue size in your graylog2-web-interface.
mq_batch_size = 4000
mq_poll_freq = 1

# You can set a maximum size of the message queue. If this size is reached, all new
# messages will be rejected until messages are removed/indexed from the queue.
# 0 = unlimited queue size (default)
mq_max_size = 0

# Enable realtime collection? This will additionally store information about received
# messages in a MongoDB collection capped to 50MB size and allows to use realtime
# features. It usually is a good idea to keep this enabled because it should not
# cause much IO load.
enable_realtime_collection = true

# The (pre-allocated) size of the messages collection in bytes. All your syslog
# and GELF messages are stored here. Standard: 50000000 [~50MB]
messages_collection_size = 50000000

# Graylog Extended Log Format (GELF)
use_gelf = true
gelf_listen_address = 0.0.0.0
gelf_listen_port = 12201

# Drools Rule File (Use to rewrite incoming log messages)
# rules_file = /etc/graylog2.d/rules/graylog2.drl

# AMQP
amqp_enabled = false
#amqp_subscribed_queues = somequeue1:gelf,somequeue2:gelf,somequeue3:syslog
#amqp_host = localhost
#amqp_port = 5672
#amqp_username = guest
#amqp_password = guest
#amqp_virtualhost = /

# Forwarders
# Timeout in seconds for each connection and read of Logg.ly API when forwarding
# messages. Default: 3
#forwarder_loggly_timeout = 3
File renamed without changes.
Expand Up @@ -36,7 +36,7 @@ unset pid
gl2_run() {
# Disable csh style history expansion for safety
set +H
daemon "( $JAVA_BIN -jar -DconfigPath=$configfile \"$jar\" >\"$logfile\" 2>&1 & echo \"\$!\" >\"$pidfile\" )"
daemon "( $JAVA_BIN -jar \"$jar\" --configfile $configfile > \"$logfile\" 2>&1 & echo \"\$!\" > \"$pidfile\" )"
pid=$(<"$pidfile")
sleep 1
if kill -0 "$pid" >/dev/null 2>&1
Expand Down

0 comments on commit ac2da27

Please sign in to comment.