Giter VIP home page Giter VIP logo

spring-boot-splunk-sleuth-demo's Introduction

Spring Boot Sleuth Splunk demo Build Status

Sample project to show log forwarding from a Spring Boot application to Splunk via a file forwarder.

Sleuth is also added to generate IDs for each request

Build

Build the application as a Docker image using:

mvn clean package

Run

Run the included docker-compose file with:

docker-compose up

This will bring up three containers: A demo application, Splunk, and a Spunk Forwarder.

Logs are forwarded to Splunk via a shared volume between the application and forwarder.

It is possible to send logs to Splunk via Docker's logging mechanism, but the goal here was to use the file forwarder to replicate a production setup.

Generate logs

Application startup will generate some logs.

Calling the demo endpoint will generate some more logs, with Sleuth trace and Span Ids.

curl http://localhost:8080?name=test

View Logs

Got to Splunk login to view the logs.

Login is admin/password

Stop

Stop the containers and remove unused volumes with:

docker-compose down -v

spring-boot-splunk-sleuth-demo's People

Contributors

barrycommins avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spring-boot-splunk-sleuth-demo's Issues

version mismatch error

If version of Spring boot is 2.5.6, the version of Spring cloud of Hoxton.SR12 is not working. changed to 2020.0.6 is working

Image

Unable to pull docker image.Getting below error
Pulling demo-application (barrycommins/spring-boot-sleuth-splunk-demo:)...
ERROR: pull access denied for barrycommins/spring-boot-sleuth-splunk-demo, repository does not exist or may require 'docker login'

Also the maven build fails due to below error
Building image barrycommins/spring-boot-sleuth-splunk-demo
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:37 min
[INFO] Finished at: 2020-08-25T09:54:42+04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default) on project spring-boot-sleuth-splunk-demo: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [Help 1]

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.