2013-07-06 20:20:23 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Logstash < Formula
|
|
|
|
homepage 'http://logstash.net/'
|
2014-08-05 21:23:43 +00:00
|
|
|
url 'https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz'
|
|
|
|
sha1 'd59ef579c7614c5df9bd69cfdce20ed371f728ff'
|
2013-07-06 20:20:23 +00:00
|
|
|
|
|
|
|
def install
|
2014-04-22 03:50:43 +00:00
|
|
|
inreplace %w{bin/logstash bin/logstash.lib.sh}, /^basedir=.*$/, "basedir=#{libexec}"
|
|
|
|
libexec.install Dir["*"]
|
|
|
|
bin.install_symlink libexec/"bin/logstash"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2014-09-01 13:29:36 +00:00
|
|
|
Logstash 1.4 emits an unhelpful error if you try to start it without config.
|
2014-04-22 03:50:43 +00:00
|
|
|
Please read the getting started guide located at:
|
|
|
|
http://logstash.net/docs/latest/tutorials/getting-started-with-logstash
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/logstash", "--version"
|
|
|
|
system "/bin/echo 'hello world' | #{bin}/logstash agent -e 'input { stdin { type => stdin } } output { stdout { codec => rubydebug } }'"
|
2013-07-06 20:20:23 +00:00
|
|
|
end
|
|
|
|
end
|