The first element of the array you feed to gsub should contain the name of the field, not its contents (i.e. use cycle_time not %{cycle_time}). Also, keep in mind that regexp matching is case-sensitive by default.
This is also not working.First of all date field not converting to string.
I don't required to log stash capture as date field.Is there any way where i can tell log stash don't capture column as date field.If it capture cycle_time as string field my problem will solve.
Oh, cycle_time is a date. Then I suggest you use a ruby filter to format the timestamp in any way you like and store in a different field.
I gave the same answer to the exact same question just a few hours ago. Either there are two of you having the same problem at the same time or you posted the same question twice (please don't do that).
i am getting bellow error when i add [quote="magnusbaeck, post:14, topic:71775"]
stdout { codec => rubydebug }
[/quote]
[2017-01-20T14:37:02,553][ERROR][logstash.filters.ruby ] Ruby exception occurred: Direct event field references (i.e. event['field']) have been disabled in favor of using event get and set methods (e.g. event.get('field')). Please consult the Logstash 5.0 breaking changes documentation for more details.
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.