Filebeat logs with .log somewhere in the extensions works fine, but will not present the IP address if the extension is .txt I have not been able to find how to resolve this opportunity on the web.
Thanks for the help in advance.
logstash conf file, logstash.yml, filebeat.yml followed by screenshot examples.
My logstash stdapache.conf
input { stdin {} }
filter {
grok { match => { "message" => "%{COMBINEDAPACHELOG}" } }
geoip { source => "clientip" }
}
output {
elasticsearch {
hosts => "localhost:9200"
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
}
}
Logstash.yml with # comments not copied.
path.data: /var/lib/logstash
path.config: /etc/logstash/conf.d
path.logs: /var/log/logstash
filebeat.yml with # comments not copied.
filebeat.prospectors:
- /var/log/tomcat8/localhost_access_log.*.txt
- /var/log/nginx/access.log.1
- /var/log/nginx/error.log.1
output.logstash:
hosts: ["192.168.5.66:5044"]
Example1 showing Ip addresses which were resolved from .log messages. the unresolved ip addresses were from messages without an ip address or a .txt message which had an ip address.
Example2 through X from messages with .log in their extension.
Example 3 arrow 1 has geoip.location arrow 2 shows thw message with ip address
Example4
Example5 from .log message without an ip address.
Example6 & 7 from .txt extension log has an ip address.
Example7 has an ip address, but no agent info also no ip address is resolved to display any geoip info