Currently the "host" field in our logs always is "127.0.0.1". We want it to be either the "hostname" or the actual ip of the current machine. How can I achieve that?
Found the solution. The only way I could get it to work was by using ruby.
It's quite easy actually. Just add the following code as a filter:
filter {
ruby {
init => "require 'socket'"
code => "event.set('host', Socket.gethostname)"
}
}
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.