GithubHelp home page GithubHelp logo

hassenk2 / spring-boot-prometheus-grafana-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aha-oretama/spring-boot-prometheus-grafana-sample

0.0 0.0 0.0 56 KB

This is a sample for monitoring spring boot web application by using Prometheus and Grafana.

Dockerfile 4.92% Java 95.08%

spring-boot-prometheus-grafana-sample's Introduction

spring-boot-prometheus-grafana-sample

This is a sample for monitoring spring boot web application by using Prometheus and Grafana.

How to run

You must intall docker, and use docker-compose command.

Run application as follows.

$ git clone https://github.com/aha-oretama/spring-boot-prometheus-grafana-sample.git
$ cd spring-boot-prometheus-grafana-sample
$ docker-compose up -d

Three applications are going to start. (Spring boot web application takes a little time to start up.)

Application URL
spring boot web application http://localhost:8080
Prometheus http://localhost:9090
Grafana http://localhost:3000

Prometheus monitors spring boot application. Grafana visualizes prometheus data source.

Set up Grafana's data source

You can login to Grafana by admin/admin. You set up prometheus data source as follows.

item value
Type Prometheus
URL http://localhost:9090
Access direct
Scrap interval 5s

スクリーンショット 2018-02-26 12.21.27.png

Set up graph

I don't explain here. Refer to Prometheus documenatation and Grafana documentation.

Spring boot web application's API

item value
/prometheus Display metrics for prometheus.
/hello Return hello. The durations of process are collected as metrics named hello_controller_say_hello_duration_seconds_count,hello_controller_say_hello_duration_seconds_sum.
/count Return count of requests. The count of request is collected as metrics named count_requests_total.

spring-boot-prometheus-grafana-sample's People

Contributors

aha-oretama 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.