How-To Ship Logs to ELK

How-To Ship Logs to ELK

OpenLegacy Microservice can ship logs to ELK using RabbitMQ, in some cases, there is a requirement to ship logs directly, although we encourage shipping logs with an agent, in order to send logs directly you can follow the example below

Pre-Requisites

ELK stack, for this guide I used the following guide: https://logz.io/blog/elk-stack-on-docker/ 

OpenLegacy API

Instructions

  1. Add the below dependency to the API’s Pom.xml

    <dependency> <groupId>com.github.piomin</groupId> <artifactId>logstash-logging-spring-boot-starter</artifactId> <version>1.2.2.RELEASE</version> </dependency>

     

  2. To the application yaml add the following:

    logging.logstash: enabled: true url: {logstash url}

This is a simple guide based on the following, repository and articles:

Related articles

Related content