Skip to main content

Can someone provide a code snippet for parsing unix_ms from the field 'timestamp' in a json log? I'm in a documentation rabbit hole and just need some fresh eyes.

I get 'unsupported timestamp value format float64' but can't see a function to convert.

This should be what you are looking for: 

mutate { convert => { "timestamp" => "string" } } date { match => [ "timestamp", "UNIX", "UNIXMS" ] on_error => "no_date_match" }

reference:


This should be what you are looking for: 

mutate { convert => { "timestamp" => "string" } } date { match => [ "timestamp", "UNIX", "UNIXMS" ] on_error => "no_date_match" }

reference:


Thank you, worked like a charm.