mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
Merge branch 'master' into ruby1.9
Conflicts: Gemfile.lock (commiting generated code to revision control is stupid anyway)
This commit is contained in:
commit
68f11062ac
5 changed files with 140 additions and 21 deletions
3
Gemfile
3
Gemfile
|
@ -8,6 +8,7 @@ gem "jruby-elasticsearch", "~> 0.0.10" # BSD License
|
|||
gem "stomp" # for stomp protocol, Apache 2.0 License
|
||||
gem "json" # Ruby license
|
||||
gem "awesome_print" # MIT License
|
||||
gem "jruby-openssl" # For enabling SSL support, CPL/GPL 2.0
|
||||
|
||||
gem "minitest" # License: Ruby
|
||||
gem "rack" # License: MIT
|
||||
|
@ -26,6 +27,6 @@ gem "xmpp4r", "~> 0.5" # outputs/xmpp, # License: As-Is
|
|||
|
||||
# For testing/dev
|
||||
group :development do
|
||||
gem "stompserver"
|
||||
#gem "stompserver"
|
||||
#gem "spoon"
|
||||
end
|
||||
|
|
19
Gemfile.lock
19
Gemfile.lock
|
@ -2,10 +2,9 @@ GEM
|
|||
remote: http://rubygems.org/
|
||||
specs:
|
||||
awesome_print (0.4.0)
|
||||
bouncy-castle-java (1.5.0146.1)
|
||||
bson (1.3.1-java)
|
||||
bunny (0.7.4)
|
||||
daemons (1.1.4)
|
||||
eventmachine (0.12.10-java)
|
||||
ffi (1.0.9-java)
|
||||
filewatch (0.2.5)
|
||||
ffi
|
||||
|
@ -13,18 +12,17 @@ GEM
|
|||
json
|
||||
gmetric (0.1.3)
|
||||
haml (3.1.2)
|
||||
hoe (2.12.0)
|
||||
rake (~> 0.8)
|
||||
jls-grok (0.9.0)
|
||||
jruby-elasticsearch (0.0.10)
|
||||
jruby-openssl (0.7.4)
|
||||
bouncy-castle-java
|
||||
json (1.5.3-java)
|
||||
minitest (2.5.0)
|
||||
minitest (2.5.1)
|
||||
mizuno (0.4.0)
|
||||
rack (>= 1.0.0)
|
||||
mongo (1.3.1)
|
||||
bson (>= 1.3.1)
|
||||
rack (1.3.2)
|
||||
rake (0.9.2)
|
||||
redis (2.2.2)
|
||||
sass (3.1.7)
|
||||
sinatra (1.2.6)
|
||||
|
@ -32,12 +30,7 @@ GEM
|
|||
tilt (>= 1.2.2, < 2.0)
|
||||
statsd-ruby (0.3.0)
|
||||
stomp (1.1.9)
|
||||
stompserver (0.9.9)
|
||||
daemons (>= 1.0.2)
|
||||
eventmachine (>= 0.7.2)
|
||||
hoe (>= 1.1.1)
|
||||
hoe (>= 1.3.0)
|
||||
tilt (1.3.2)
|
||||
tilt (1.3.3)
|
||||
uuidtools (2.1.2)
|
||||
xmpp4r (0.5)
|
||||
|
||||
|
@ -53,6 +46,7 @@ DEPENDENCIES
|
|||
haml
|
||||
jls-grok (= 0.9.0)
|
||||
jruby-elasticsearch (~> 0.0.10)
|
||||
jruby-openssl
|
||||
json
|
||||
minitest
|
||||
mizuno
|
||||
|
@ -63,6 +57,5 @@ DEPENDENCIES
|
|||
sinatra
|
||||
statsd-ruby (~> 0.3.0)
|
||||
stomp
|
||||
stompserver
|
||||
uuidtools
|
||||
xmpp4r (~> 0.5)
|
||||
|
|
125
Makefile
Normal file
125
Makefile
Normal file
|
@ -0,0 +1,125 @@
|
|||
VERSION=$(shell ruby -r./VERSION -e 'puts LOGSTASH_VERSION')
|
||||
|
||||
JRUBY_VERSION=1.6.4
|
||||
JRUBY_URL=http://repository.codehaus.org/org/jruby/jruby-complete/$(JRUBY_VERSION)
|
||||
JRUBY=vendor/jar/jruby-complete-$(JRUBY_VERSION).jar
|
||||
ELASTICSEARCH_VERSION=0.17.6
|
||||
ELASTICSEARCH_URL=http://github.com/downloads/elasticsearch/elasticsearch
|
||||
ELASTICSEARCH=vendor/jar/elasticsearch-$(ELASTICSEARCH_VERSION)
|
||||
|
||||
default: compile
|
||||
|
||||
# Compile config grammar (ragel -> ruby)
|
||||
compile-grammar: lib/logstash/config/grammar.rb
|
||||
lib/logstash/config/grammar.rb: lib/logstash/config/grammar.rl
|
||||
$(MAKE) -C lib/logstash/config grammar.rb
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -rf .bundle
|
||||
-sh "rm -rf build"
|
||||
-sh "rm -rf vendor"
|
||||
|
||||
compile: compile-grammar compile-runner | build/ruby
|
||||
|
||||
.PHONY: compile-runner
|
||||
compile-runner: build/ruby/logstash/runner.class
|
||||
build/ruby/logstash/runner.class: lib/logstash/runner.rb | build/ruby
|
||||
(cd lib; jrubyc -t ../build/ruby logstash/runner.rb)
|
||||
|
||||
.PHONY: copy-ruby-files
|
||||
copy-ruby-files: | build/ruby
|
||||
@# Copy lib/ and test/ files to the root.
|
||||
git ls-files | grep '^lib/.*\.rb$$' | sed -e 's,^lib/,,' \
|
||||
| (cd lib; cpio -p --make-directories ../build/ruby)
|
||||
git ls-files | grep '^test/.*\.rb$$' | sed -e 's,^test/,,' \
|
||||
| (cd test; cpio -p --make-directories ../build/ruby)
|
||||
|
||||
# TODO(sissel): Copy all .rb files from lib and test to build/ruby
|
||||
|
||||
.PHONY: jar
|
||||
jar: | compile
|
||||
|
||||
vendor:
|
||||
mkdir $@
|
||||
|
||||
vendor/jar: | vendor
|
||||
mkdir $@
|
||||
|
||||
#vendor-jruby: vendor/jar/jruby-complete-$(JRUBY_VERSION).jar
|
||||
vendor-jruby: $(JRUBY)
|
||||
$(JRUBY): | vendor/jar
|
||||
wget -O $@ $(JRUBY_URL)/$(shell basename $@)
|
||||
|
||||
vendor/jar/elasticsearch-$(ELASTICSEARCH_VERSION).tar.gz: | vendor/jar
|
||||
@# --no-check-certificate is for github and wget not supporting wildcard
|
||||
@# certs sanely.
|
||||
wget --no-check-certificate \
|
||||
-O $@ $(ELASTICSEARCH_URL)/elasticsearch-$(ELASTICSEARCH_VERSION).tar.gz
|
||||
|
||||
vendor-elasticsearch: $(ELASTICSEARCH)
|
||||
$(ELASTICSEARCH): $(ELASTICSEARCH).tar.gz | vendor/jar
|
||||
@echo "Pulling the jars out of $<"
|
||||
tar -C $(shell dirname $@) -xf $< --exclude '*sigar*' \
|
||||
'elasticsearch-$(ELASTICSEARCH_VERSION)/lib/*.jar'
|
||||
|
||||
# Always run vendor/bundle
|
||||
.PHONY: fix-bundler
|
||||
fix-bundler:
|
||||
-rm -rf .bundle
|
||||
|
||||
.PHONY: vendor-gems
|
||||
vendor-gems: | vendor/bundle
|
||||
|
||||
.PHONY: vendor/bundle
|
||||
vendor/bundle: | fix-bundler
|
||||
@echo "=> Installing gems to vendor/bundle/..."
|
||||
bundle install --path vendor/bundle
|
||||
|
||||
gem: logstash-$(VERSION).gem
|
||||
|
||||
logstash-$(VERSION).gem: compile
|
||||
gem build logstash.gemspec
|
||||
|
||||
build:
|
||||
-mkdir -p $@
|
||||
|
||||
build/ruby: | build
|
||||
-mkdir -p $@
|
||||
|
||||
# TODO(sissel): Update this to be like.. functional.
|
||||
# TODO(sissel): Skip sigar?
|
||||
# Run this one always? Hmm..
|
||||
.PHONY: build/monolith
|
||||
build/monolith: vendor-elasticsearch vendor-jruby vendor-gems | build
|
||||
build/monolith: compile copy-ruby-files
|
||||
-mkdir -p $@
|
||||
@# Unpack all the 3rdparty jars and any jars in gems
|
||||
find $$PWD/vendor/bundle $$PWD/vendor/jar -name '*.jar' \
|
||||
| (cd $@; xargs -P2 -tn1 jar xf)
|
||||
@# Purge any extra files we don't need in META-INF (like manifests and
|
||||
@# TODO(sissel): Simplify this.
|
||||
-rm -f $@/META-INF/{INDEX.LIST,MANIFEST.MF,ECLIPSEF.RSA,ECLIPSEF.SF}
|
||||
|
||||
# Learned how to do pack gems up into the jar mostly from here:
|
||||
# http://blog.nicksieger.com/articles/2009/01/10/jruby-1-1-6-gems-in-a-jar
|
||||
jar: build/logstash-$(VERSION)-monolithic.jar
|
||||
build/logstash-$(VERSION)-monolithic.jar: | build/monolith
|
||||
build/logstash-$(VERSION)-monolithic.jar: JAR_ARGS=-C build/ruby .
|
||||
build/logstash-$(VERSION)-monolithic.jar: JAR_ARGS+=-C build/monolith .
|
||||
build/logstash-$(VERSION)-monolithic.jar: JAR_ARGS+=-C vendor/bundle/jruby/1.8 gems
|
||||
build/logstash-$(VERSION)-monolithic.jar: JAR_ARGS+=-C vendor/bundle/jruby/1.8 specifications
|
||||
build/logstash-$(VERSION)-monolithic.jar: JAR_ARGS+=-C lib logstash/web/public
|
||||
build/logstash-$(VERSION)-monolithic.jar: JAR_ARGS+=-C lib logstash/web/views
|
||||
build/logstash-$(VERSION)-monolithic.jar: JAR_ARGS+=patterns
|
||||
build/logstash-$(VERSION)-monolithic.jar:
|
||||
jar cfe $@ logstash.runner $(JAR_ARGS)
|
||||
jar i $@
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
ruby bin/logstash test
|
||||
|
||||
docs: docgen doccopy docindex
|
||||
|
||||
# XXX Finish here' stopped at require_output_env
|
|
@ -29,9 +29,9 @@ logs.
|
|||
|
||||
# graylog2
|
||||
|
||||
<http://graylog2.org/>
|
||||
[http://graylog2.org/](http://graylog2.org)
|
||||
|
||||
TBD
|
||||
_Overview to be written_
|
||||
|
||||
You can use graylog2 with logstash by using the 'gelf' output to send logstash
|
||||
events to a graylog2 server. This gives you logstash's excellent input and
|
||||
|
@ -39,15 +39,15 @@ filter features while still being able to use the graylog2 web interface.
|
|||
|
||||
# whoops
|
||||
|
||||
<http://www.whoopsapp.com/>
|
||||
[whoops site](http://www.whoopsapp.com/)
|
||||
|
||||
TBD
|
||||
_Overview to be written_
|
||||
|
||||
A logstash output to whoops is coming soon - <https://logstash.jira.com/browse/LOGSTASH-133>
|
||||
|
||||
# flume
|
||||
|
||||
<https://github.com/cloudera/flume/wiki>
|
||||
[flume site](https://github.com/cloudera/flume/wiki)
|
||||
|
||||
Flume is primarily a transport system aimed at reliably copying logs from
|
||||
application servers to HDFS.
|
||||
|
@ -57,4 +57,4 @@ at a logstash syslog input.
|
|||
|
||||
# scribe
|
||||
|
||||
TBD
|
||||
_Overview to be written_
|
||||
|
|
|
@ -6,7 +6,7 @@ require "logstash/outputs/base"
|
|||
# need to use this output.
|
||||
#
|
||||
# *NOTE*: You must use the same version of elasticsearch server that logstash
|
||||
# uses for it's client. Currently we use elasticsearch 0.16.0
|
||||
# uses for it's client. Currently we use elasticsearch 0.17.6
|
||||
#
|
||||
# You can learn more about elasticseasrch at <http://elasticsearch.org>
|
||||
class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue