Logstash 2.1 error on greater than


(Gabriel Rosca) #1

Hi guys,

My logstash crash after I upgrade from 1.5 to 2.1 with the bellow error:

NoMethodError: undefined method `>' for nil:NilClass
output_func at (eval):529
outputworker at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.0-java/lib/logstash/pipeline.rb:276
start_outputs at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.0-java/lib/logstash/pipeline.rb:193

if "metric" in [tags] {
if [events.count] > 3 {
stdout {
codec => line {
format => "rate: %{events.count} "
}
}
}
}


(Gabriel Rosca) #2

Looks like the problem was with the DOT field name. I had to update my config

if "metric" in [tags] {
if [events][count] >= 3 {
stdout {
codec => line {
format => "rate: %{[events][count]}"
}
}
}
}


(system) #3