Skip to content

Instantly share code, notes, and snippets.

@shurane
Last active August 25, 2020 01:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save shurane/60eee09eeee15a50f289 to your computer and use it in GitHub Desktop.
Save shurane/60eee09eeee15a50f289 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