HI,
My logstash is running on 2 different linux server and i want to find which logstash server logs are getting into index by adding hostname field. I tried with below ruby code and getting error on that. Anyone can help me out of this,
ruby {
init => "require 'socket'"
code => "event['server_hostname'] = Socket.gethostname"
}
error:
[2018-11-13T13:25:48,171][ERROR][logstash.filters.ruby ] Ruby exception occurred: Direct event field references (i.e. event['field'] = 'value') have been disabled in favor of using event get and set methods (e.g. event.set('field', 'value')). Please consult the Logstash 5.0 breaking changes documentation for more details.