i logging logstash logs in following format:
timestamp key=val key2=val2 ..<a list of key=val>.. [log-level] rest of message
example:
17:21:20.470 pid=<0.20592.0> app=myapp key1=val.1 key2=val/2 [info] message blabla
i parse them format:
{ "timestamp" => "17:21:20.470", "pid" => "<0.20592.0>" "app" => myapp "key1" => "val.1" "key2" => "val/2" "level" => "info" "message" => "my message blabla" }
note: key=val
aren't known in advance, parse them dynamically
here configuration
input { stdin { } } filter { } output { stdout { codec => rubydebug }}
what should filter be?
Comments
Post a Comment