How can I set current time in field

Hi guys,
Thanx @Eniqmatic
I've done this job with the following config:

 mutate {
    add_field => { "realtimestamp" => "%{@timestamp}" }
        }

      ruby {
        code => "event.set('logstash_processed_at', Time.now());"
        }

    mutate {
    convert => { "logstash_processed_at" => "string" }
        }

    date {
    match => [ "logstash_processed_at", "ISO8601" ]
    target => "@timestamp"
    add_tag => "timestamp_changed"
    }
1 Like