Hi,
attempted to add a new field with ruby and not even a simple adding is working, what could be wrong?
input {
beats {
port => 5044
}
}filter {
ruby {
code => "event['testfield'] = 'test'"
}
}output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "test-%{+yyyy.MM.dd}"
}
}
The error:
[2020-03-16T21:44:36,713][ERROR][logstash.filters.ruby ][main] Ruby exception occurred: undefined method `=' for #LogStash::Event:0x115fa2a0