I have a syslog server and the ELK stack on the same server. I create a directory for each syslog source.
I'm trying to parse syslog events with Logstash, and I'd like to keep the ip adress of the syslog source in the "host" field. At the moment I have the 0.0.0.0 source after Logstash parsing.
could you please help ?
The name of the host that generated each message should be present in the syslog_hostname field, right? If so, change your grok filter to store that string into the host field instead (you'll have to adjust the grok filter's overwrite option).
Yes, indeed I'd like to keep the source ip or the name of the machine that generated the log because when I have a look at kibana, the "host" field is set to 0.0.0.0 for all the syslog sources. Moreover, the timestamp original is not kept, but only the timestamp of processing date by logstash.
Not like that, but you can use a grok filter to extract the hostname from the path field. Examples of this has been posted here and on StackOverflow many times.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.