Currently I'm forwarding apache access log to output target with the configuration, and I'd like to convert current timestamp which is Apache timestamp format (HTTPDATE) to ISO8601 format and add it to output fields. Can you please guide me the way to achieve my goal?
@magnusbaeck
Thank you so much for your quick response! My explanation wasn't enough,
What I would like to achieve is to convert 'timestamp' field (format:"dd/MMM/yyyy:HH:mm:ss Z") to ISO8601 format ("YYYY-MM-DDThh:mm:ssZ"). Really appreciate If you could guide me how to archieve it.
Yes, I know what you want to achieve. What I don't know is what Logstash currently produces with your configuration. Show the result from your stdout { codec => rubydebug } output.
This is working perfectly fine. I don't know what you expected. If you wanted to convert the timestamp field in place rather than store the resulting date in @timestamp you need to use the date filter's target option.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.