Convert mytimestamp to @timestamp

i want to convert mytimestamp to @timestamp

i merge two string field to mytimestamp field. now i want to convert this field to date & target to @timestamp.

My code:

add_field => {
"mytimestamp" => "%{filedate} %{MyTimeStamp}"
}
convert => { "mytimeStamp" => "date" }

}

date {
match => [ "mytimestamp", "MM-dd-yyyy HH:mm:ss,SSS" ]
target => "@timestamp"
}

getting logstash error on above change.

help me on this.

field mytimestamp is string field:

output is:

"mytimestamp" => "12082017 23:24:01.095", need to convert in @timestamp

This does not match the specified date format MM-dd-yyyy HH:mm:ss,SSS. Instead try MMddyyyy HH:mm:ss.SSS.

Thanks it works.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.