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
input { | |
file { | |
type => syslog | |
path => "/var/log/messages" | |
} | |
} | |
filter { | |
grok { | |
type => syslog |
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
diff --git a/lib/logstash/logging.rb b/lib/logstash/logging.rb | |
index bafb342..b0692e2 100644 | |
--- a/lib/logstash/logging.rb | |
+++ b/lib/logstash/logging.rb | |
@@ -3,6 +3,8 @@ require "cabin" | |
require "logger" | |
class LogStash::Logger < Cabin::Channel | |
+ attr_accessor :target | |
+ |
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
logstash config: | |
input { | |
stdin { | |
type => "syslog" | |
} | |
} | |
filter { | |
grok { |
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
input { | |
stdin { | |
type => "test" | |
} | |
} | |
filter { | |
mutate { | |
add_field => [ | |
"regexp_test", "%{@message:s/foo/bar}", |
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
#!/usr/bin/ruby | |
require "socket" | |
1000.times do |n| | |
puts "opening socket ##{n}" | |
TCPSocket.new("client4.scl2.svc.mozilla.com", 4444) | |
end | |
$stdin.read |
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
input { | |
stdin { | |
type => rails | |
} | |
} | |
filter { | |
grok { | |
type => "rails" | |
pattern => "Completed %{GREEDYDATA:operation} in %{NUMBER:time:int}ms" |
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
10.14.205.18 load-sync20.services.mozilla.com cuser291808 [06/Mar/2012:16:52:07 -0800] "GET /1.0/cuser291808/info/collections HTTP/1.1" 503 222 "-" "RPT-HTTPClient/0.3-3E" "-" "ssl: SSL_RSA_WITH_RC4_128_SHA, version=TLSv1, bits=128" node_s:- req_s:0.041069 retries:0 req_b:218 "c_l:-" |
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
#!/usr/bin/ruby | |
class IPGenerator | |
public | |
def initialize(session_count, session_length) | |
@session_count = session_count | |
@session_length = session_length | |
@sessions = {} | |
end |
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
input { | |
stdin { | |
format => "json" | |
type => "test" | |
} | |
} | |
filter { | |
grep { | |
type => "test" |
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
input { | |
stdin { | |
type => "zeus" | |
} | |
} | |
filter { | |
grok { | |
type => "zeus" | |
pattern => "%{IP:ip} %{HOST:host} %{USER:user} \[%{HTTPDATE:timestamp}\] \"%{WORD:verb} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}\" %{NUMBER:response} (?:%{NUMBER:bytes}|-) \"(?:%{URI:referrer}|-)\" %{QS:agent} \"%{GREEDYDATA:cookie}\" %{QS:ssl} node_s:(?:%{NUMBER:node_time}|-) req_s:(?:%{NUMBER:req_time}|-) retries:(?:%{NUMBER:retries}|-)" |
OlderNewer