I would like to preserve the @timestamp
field prior to overwriting it from a date
filter, so that I can know when a document was processed by logstash.
I also tried using the copy
filter, but that fails silently.
mutate {
copy => { "%{@timestamp}" => "logstash_intake_timestamp" }
}
I tried this, but it also caused exceptions (I don't have the stack trace right now, but I could get it if it would help the investigation).
mutate {
copy => { "@timestamp" => "logstash_intake_timestamp" }
}
I tried using the event
API, but it leads to this exception.
ruby {
code => "event.set('read_time', event.get('@timestamp'))"
}
What's the correct way to copy @timestamp
?