0
我最近升級從舊版本的麋鹿堆簇到5.1,雖然一切看起來都很好,我在logstash日誌經常出現的一個例外,它看起來像這樣:logstash 5紅寶石濾波
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.
我有過濾器看起來是這樣的:
filter {
ruby {
init => "require 'time'"
code => "event.cancel if event['@timestamp'] < Time.now-(4*86400)"
}
}
有什麼建議?
謝謝。這很明顯。乾杯! – cparfon