Unix time to timestamp error: "Wrong argument type Integer, expected LogStash::Timestamp"

I'm reading logs into logstash from kafka that all have a field,ts. This field stores the unix time in seconds (for example 1576275878). I'm using the date plugin in logstash to convert it as follows to be stored in the @timestamp variable:

filter {
    date {
        match => ["ts", "UNIX"]
    }
}

The conversion is working, however my problem is that each log line spits out the following WARNING message in logstash. Am I doing something wrong with this conversion?

[2019-12-21T03:10:53,300][WARN ][logstash.filters.mutate  ] Exception caught while applying mutate filter {:exception=>"wrong argument type Integer (expected LogStash:
:Timestamp)"}

Thanks for any help!

What is the mutate filter configuration?

Ahh, good call. Further down in that filter section I had the following block of code which was producing the error. Removing this line fixed it:

  mutate {
    rename => ["ts", "@timestamp"]
  }

Thank you!

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