Skip to content

Instantly share code, notes, and snippets.

@phosphene
Forked from jordansissel/foo.md
Created June 3, 2014 16:56
Show Gist options
  • Save phosphene/5133d5f4c340bb1b2f3e to your computer and use it in GitHub Desktop.
Save phosphene/5133d5f4c340bb1b2f3e to your computer and use it in GitHub Desktop.

logstash json format

{
  "message"    => "hello world",
  "@version"   => "1",
  "@timestamp" => "2014-04-22T23:03:14.111Z",
  "type"       => "stdin",
  "host"       => "hello.local"
}
  • @timestamp is the ISO8601 high-precision timestamp for the event.
  • @version is the version number of this json schema
  • Every other field is valid and fine.

Observe it in real life

You can observe the message structure by doing output { stdout { codec => rubydebug } }

% bin/logstash  -e 'output { stdout { codec => rubydebug } }'
hello world

{
  "message"    => "hello world",
  "@version"   => "1",
  "@timestamp" => "2014-04-22T23:03:14.111Z",
  "type"       => "stdin",
  "host"       => "Macintosh.local"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment