Created
March 6, 2012 14:45
-
-
Save fetep/1986634 to your computer and use it in GitHub Desktop.
sample logstash config for rails log line
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" | |
} | |
} | |
output { | |
stdout { | |
debug => true | |
} | |
} |
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
Completed foo bar in 54ms |
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
{ | |
"@source" => "stdin://carrera.databits.net/", | |
"@type" => "rails", | |
"@tags" => [], | |
"@fields" => { | |
"operation" => [ | |
[0] "foo bar" | |
], | |
"time" => [ | |
[0] 54 | |
] | |
}, | |
"@timestamp" => "2012-03-06T14:43:56.764000Z", | |
"@source_host" => "carrera.databits.net", | |
"@source_path" => "/", | |
"@message" => "Completed foo bar in 54ms" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment