Giter Club home page Giter Club logo

spring-boot-elk's Introduction

spring-boot-elk

Log Management (ELK) for Spring Boot application

This simple example demonstrates how easy you can enable quite powerful and advanced log management in to your Spring Boot application using Docker.

Stack of frameworks/technologies:

  • Spring Boot
  • Swagger
  • Logback
  • Logstash
  • ElasticSearch
  • Kibana
  • Docker

Prerequisites:

  • docker version 1.10.3
  • docker-compose version 1.6.2
  • JDK8
  • Maven

Start the app

  1. In order to run the application in docker you would need to build a docker image first. This simple maven command will to the trick: mvn clean package docker:build -Dmaven.test.skip=true
    Note: for Mac users it can be more difficult. Make sure that you have Environment variables properly exported. The easiest way to do this is the following command (https://docs.docker.com/machine/reference/env/): eval $(docker-machine env default)
    DOCKER_TLS_VERIFY=1
    DOCKER_HOST=tcp://192.168.99.100:2376; //you can find this value by typing: docker-machine ls
    DOCKER_CERT_PATH=/Users/{user}/.docker/machine/certs

  2. Go to root of the project and run: docker-compose up -d Docker will pull all missing images and start new containers. After a while you would be ready to use the app.

  3. Run: docker ps -a. Find an image "javalogaggregation_web" and check the exposed port (For example 0.0.0.0:32808->8080/tcp). You would be able to access the application by typing the following URL in the browser: http://192.168.99.100:32808/swagger-ui.html#!
    Note: ip address is a docker machine IP address. Here you can play with existing REST API.

  4. In order to configure Kibana you would need to go to:
    http://localhost:5601/ or http://{$DOCKER_HOST_IP}:5601/
    Configure your Kibana and play with your logs.
    Note: For Mac users the port 5601 should be added to Port Forwarding Rules of you Docker Virtual Machine

Stop the app

Simply type: docker-compose down

Security

user/user

spring-boot-elk's People

Contributors

dbgjerez avatar vlotar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.