Logstash returns hostname of the machine in the field "host". All our servers have same host name, So it is difficult to differentiate data from servers. it is not possible to change host name of server because we use amazon AME servers. Is it possible to add IP to any fields in logstash?
Asked
Active
Viewed 1,151 times
1 Answers
0
I used ansible to push my configs, and have it write the IP address into the config for each server. Both logstash-forwarder and logstash can add static fields on an input.

Alain Collins
- 16,268
- 2
- 32
- 55
-
Is there any other way to get IP? – Naveedh Jan 07 '16 at 14:33
-
logstash can read environment variables when it starts. If filebeat can do that, maybe you could extend the startup script to set a variable. You could also not name all your servers with the same name. – Alain Collins Jan 07 '16 at 14:56