1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| filter { if [type] == "serverlog" { grok { match => ["message", "%{TIMESTAMP_ISO8601:[@metadata][timestamp]} %{NUMBER:threadid} %{LOGLEVEL:loglevel} %{NOTSPACE:logger} %{GREEDYDATA:message}"] overwrite => [ "message" ] }
date { match => [ "[@metadata][timestamp]", "YYYY-MM-dd HH:mm:ss.SSS" ] timezone => "UTC" }
mutate { convert => { "threadid" => "integer" } add_field => { "hostname" => "%{[beat][hostname]}" "servertype" => "%{[fields][servertype]]}" "[@metadata][env]" => "%{[fields][env]]}" } remove_field => ["beat", "fields"] } } }
|