filter {
grok {
match => ["message", "%{TIMESTAMP_ISO8601:a} %{WORD} %{USER}] %{WORD} %{WORD} %{WORD:keyvalue}"]
add_tag => "warn"
}
metrics
{
meter => "events.%{keyvalue}"
add_tag => "metric"
ignore_older_than => 10
}
if "metric" in [tags] {
ruby {
code => "event.cancel if event.get('events.all.rate_1m') * 60 < 5"
}
}
}
The error is
[2017-05-04T03:13:32,431][ERROR][logstash.filters.ruby ] Ruby exception occurred: undefined method `*' for nil:NilClass
I don't know where is not correct.