I am hoping to get some help getting the age plugin to work. It seems like a really new filter plugin without a log of documentation. - https://www.elastic.co/guide/en/logstash/current/plugins-filters-age.html
Here is my code
age {}
if [Timestamp][age] > 259200 {
drop {}
}
I am trying to drop log events older than 3 days old. "Timestamp" is a grok parsed timestamp field from the incoming log in ISO8601 format. I have not been able to get the .conf to load without configuration errors. I know it works without the "age" code.
Errors
[2017-05-04T11:41:38,422][ERROR][logstash.pipeline ] Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash. {"exception"=>#<NoMethodError: undefined method `>' for nil:NilClass>, "backtrace"=>["(eval):824:in `initialize'", "org/jruby/RubyArray.java:1613:in `each'", "(eval):822:in `initialize'", "org/jruby/RubyProc.java:281:in `call'", "(eval):434:in `filter_func'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:378:in `filter_batch'", "org/jruby/RubyProc.java:281:in `call'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:201:in `each'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:200:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:377:in `filter_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:365:in `worker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:331:in `start_workers'"]}
[2017-05-04T11:41:38,570][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<NoMethodError: undefined method `>' for nil:NilClass>, :backtrace=>["(eval):824:in `initialize'", "org/jruby/RubyArray.java:1613:in `each'", "(eval):822:in `initialize'", "org/jruby/RubyProc.java:281:in `call'", "(eval):434:in `filter_func'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:378:in `filter_batch'", "org/jruby/RubyProc.java:281:in `call'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:201:in `each'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:200:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:377:in `filter_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:365:in `worker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:331:in `start_workers'"]}
It seems like some sort of Ruby error. I have the Ruby plugin installed but its not part of my .conf file. The Age documentation does not specify any ruby dependencies that need to be included in filter.
Any help greatly appreciate! Thanks, Ben