This repository has been archived by the owner on Jul 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from rubygems/es-logstash
Tweak ElasticSearch for logstash, set up logstash 1.5.0
Showing
8 changed files
with
96 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
cookbooks/rubygems-logging/templates/default/logstash/output_elasticsearch.conf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
output { | ||
elasticsearch { | ||
host => "127.0.0.1" | ||
host => [ "127.0.0.1" ] | ||
protocol => "http" | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
cookbooks/rubygems-logging/templates/default/sv-logstash-log-run.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
exec svlogd -tt ./main |
25 changes: 25 additions & 0 deletions
25
cookbooks/rubygems-logging/templates/default/sv-logstash-run.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
ulimit -Hn 65550 | ||
ulimit -Sn 65550 | ||
|
||
cd /<%= @options[:home] %> | ||
exec 2>&1 | ||
# Need to set LOGSTASH_HOME and HOME so sincedb will work | ||
export LS_HEAP_SIZE=<%= @options[:max_heap] %> | ||
export LOGSTASH_HOME="<%= @options[:home] %>" | ||
export GC_OPTS="<%= @options[:gc_opts] %>" | ||
export JAVA_OPTS="-server -Xms<%= @options[:min_heap] %> -Xmx<%= @options[:max_heap] %> -Djava.io.tmpdir=$LOGSTASH_HOME/tmp/ <%= @options[:java_opts] %> <%= '-Djava.net.preferIPv4Stack=true' if @options[:ipv4_only] %>" | ||
LOGSTASH_OPTS="agent -f $LOGSTASH_HOME/etc/conf.d" | ||
# This is not compatible with logstash 1.5.0 | ||
# LOGSTASH_OPTS="$LOGSTASH_OPTS --pluginpath $LOGSTASH_HOME/lib" | ||
<% if @options[:debug] -%> | ||
LOGSTASH_OPTS="$LOGSTASH_OPTS -vv" | ||
<% end -%> | ||
LOGSTASH_OPTS="$LOGSTASH_OPTS -l $LOGSTASH_HOME/log/<%= @options[:log_file] %>" | ||
export LOGSTASH_OPTS="$LOGSTASH_OPTS -w <%= @options[:workers] %>" | ||
<% if @options[:supervisor_gid] -%> | ||
HOME=$LOGSTASH_HOME exec chpst -u <%= @options[:user] %>:<%= @options[:supervisor_gid] %> $LOGSTASH_HOME/bin/logstash $LOGSTASH_OPTS | ||
<% else -%> | ||
HOME=$LOGSTASH_HOME exec chpst -u <%= @options[:user] %> $LOGSTASH_HOME/bin/logstash $LOGSTASH_OPTS | ||
<% end -%> |