Logstash getting wrong hostname?

Hi, my current logstash setup always return localhost for host field.
My system is CentOS 6.x.
I' ve set hostname in /etc/sysconfig/network and also in hostname command.

from Google, it says logstash use gethostname function to get the value.
How can I correctly set the value for hostname? Thanks.

Somehow I've figured it out.
Logstash will get whatever the first hostname from /etc/hosts file for record.
It doesn't quite make sense and weird though... :pensive:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.