Skip to content

HowTo log with log4j to filesystem an read the logs with filebeat to elk

Notifications You must be signed in to change notification settings

heckenmann/log4j-filebeat

Repository files navigation

HowTo log4j-filebeat

HowTo log Java-Applications with log4j 2 to filesystem and import the logs to elasticsearch.

  • Logging Java-Application with log4j and custom var "counter"
  • Configuration over external log4j2.properties
  • Log JSON to filesystem
  • Read logs with filebeat
  • Push logs to elasticsearch
  • Visualize logs with kibana

Requirements

  • Docker
  • Docker Compose

Use

  1. Run docker-compose up -d. This will build the example-application and start filebeat, elasticsearch.
  2. Call http://localhost:5601 with your browser.
  3. Add index "filebeat-*"
  4. You can see the fields from the logs.

kibana-screenshot

Releases

No releases published

Packages

No packages published