Insert Hostname in Filebeat Logfile


(Joern Oltmann) #1

Hi,
I have on several Servers filebeat running. All Servers logs the the Loginformation for Filebeat under /var/log/filebeat/filebeat.log.
Now I need to transfer the Logs vi nxlog to our Logserver. So I need an information from which host is the log entry, because on the logserver I merge all logs to one Logfile.

Is there any parameter in the filebeat.yml to add the hostname to the Logfile? I talk not about the Logs which I send to the elasticsearch like beat.host!

Thx for answer
Joern


(Jaime Soriano) #2

Hi,

I'm not sure of understanding what you try to do. Do you mean that you have configured filebeat with the file output and you are trying to collect these logs with nxlog?


(Joern Oltmann) #3

Hi Jaime,
no I would like to have the hostname inside the filebeat logfile (the logfile which is created by filebeat itself) But I think the best way is to insert the hostname via nxlog configuration or it is possible by filebeat.yml?

Thx for answer
Joern


(Jaime Soriano) #4

You can add any custom field with the fields option. Not sure if something like this is what you are looking for.


(Joern Oltmann) #5

Not really, but I have solved it with nxlog config.
Thx for help and answer

Joern


(system) #6

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