In logstash.yml file, we have set node.name to a specific hostname explicitly. But the host field is displayed as "localhost".
$HOSTNAME is set to a valid hostname.
If I sepecifically hardcode the hostname like below::
input {
file {
path => "/var/log/xyz/service.log"
type => "xyz-daemon"
add_field => { "service-port" => "12345"
"service-name" => "my-service"
"host" => "abchost"
}
}
Then, both locahost and abchost are displayed as host.
Any suggestions how to ensure node.name is picked from logstash.yml file? We are running 5.4.1 version