I would like to output just the geoip.ip field to file (just the IP address).
I have tried the following but just get errors. I think the ip is a nested field of geoip, but not sure how to extract.
Great thanks for that! The issue I had was that there was no source IP, only source host name, which geoip converts to IP. These IP's I need in a log file for further analysis.
Well, When I tried "%{[geoip][ip]}" the output file was populated with [geoip][ip] on every line. When I tried "%{geoip[ip]}" then the file contained an IP address on every line.
Now I have an issue where if geoip fails to parse the host name the the output line is geoip.ip
Is there a conditional that I can use to only output if the field geoip.ip actually contains an IP address?
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.