Skip to content

Instantly share code, notes, and snippets.

@gesellix
Forked from shurane/json_lines_example.log
Last active August 29, 2015 14:13
Show Gist options
  • Save gesellix/5a991b061bcf84188c56 to your computer and use it in GitHub Desktop.
Save gesellix/5a991b061bcf84188c56 to your computer and use it in GitHub Desktop.
{ "@timestamp": "2015-02-02T04:25:26+0000", "@fields": { "status": 200, "request": "/author/", "bytes": 43, "more": { "host" : "localhost"} } }
{ "@timestamp": "2015-02-02T04:25:27+0000", "@fields": { "status": 404, "request": "/title/", "bytes": 84, "more": { "host" : "localhost"} } }
{ "@timestamp": "2015-02-02T04:25:28+0000", "@fields": { "status": 302, "request": "/publisher/", "bytes": 45, "more": { "host" : "localhost"} } }
{ "@timestamp": "2015-02-02T04:25:29+0000", "@fields": { "status": 202, "request": "/keywords/", "bytes": 700, "more": { "host" : "localhost"} } }
input {
# http://logstash.net/docs/1.4.2/inputs/generator
generator {
type => "generated"
message => '{ "@timestamp": "2014-01-01T03:14:15+0000", "@fields": { "status": 200, "request": "/quote/", "bytes": 612, "more": { "host" : "localhost"} } }'
count => 1
codec => json
}
# http://logstash.net/docs/1.4.2/inputs/exec
exec {
command => "cat json_lines_example.log"
codec => json_lines
interval => 60
}
}
filter {
}
output {
stdout { codec => rubydebug }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment