logstash combines two fields into one field method

Formatting a log today, the date is not easy to get, it is divided into two fields.

Later date supports another field

date {
      match => ["time", "yyyy-MM-dd HH:mm:ss.SSS" ]

    }

The merge of mutate is useless, and the two fields are combined into an array.

Finally found a solution, use alter

alter{
      add_field => { "fullTime" => "%{day} %{time}" }

    }

Then the date converts perfectly

    date {
      match => ["fullTime", "yyyy-MM-dd HH:mm:ss.SSS" ]
    }

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325773271&siteId=291194637