Search code examples
logstashelastic-stacklogstash-grokfilebeat

Parse and send Java logs to the ELK 7.3


Using Elasticsearch 7.3 on CentOS 7 and Java version 11, I need to parse and find specific Error/Exception in Java Application log files, wondering if I should use Filebeat or Metricbeat to parse and ship some text patterns in log files to Elastic?

Sample code to show how to parse/ship specific error pattern is very helpful.

Any help is appreciated.


Solution

    1. Filebeat is for logs.
    2. To make your life easier, I'd use a structured log format. We have just released https://github.com/elastic/java-ecs-logging which ties right into Elasticsearch and also provides the right Filebeat configuration.