GithubHelp home page GithubHelp logo

nobusugi246 / prometheus-grafana-spring Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 11.0 426 KB

Simple Grafana Dashboard for Spring Actuator Micrometer. (Micrometer for Spring Boot Legacy(Ver.1.5.x) and Ver.2.0.x)

License: Apache License 2.0

Java 100.00%
prometheus grafana spring-boot mac micrometer legacy

prometheus-grafana-spring's Introduction

Simple Grafana Dashboard for Spring Actuator Micrometer.

Grafana Dashboard

docker-compose.yml

You can start Prometheus and Grafana Containers with this docker-compose.yml.

version: '3'
services:
  prometheus:
    image: prom/prometheus:v2.3.2
    container_name: prometheus
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    ports:
      - 9090:9090
  grafana:
    image: grafana/grafana:5.2.2
    container_name: grafana
    ports:
      - 3000:3000
    env_file:
      - ./grafana.env

Prometheus Configuration (e.g. Docker for Mac)

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: 
        - 'localhost:9090'
  - job_name: 'spring'
    metrics_path: '/prometheus'
    static_configs:
      - targets:
        - 'docker.for.mac.host.internal:8080'

You should change docker.for.mac.host.internal to the host address.

Grafana Configuration

Import Java Micrometer Basics.json to your Grafana Server or find this Dashboard(ID: 4683) on Grafana.com.

Spring Boot Configuration

dependencies {
    ...
    compile 'org.springframework.boot:spring-boot-starter-actuator'
    compile 'io.micrometer:micrometer-spring-legacy:1.0.6'
    compile 'io.micrometer:micrometer-registry-prometheus:1.0.6'  // You should add this line for prometheus.
    ...

You can start a sample project of Spring Boot (Ver.1.5.15) with this proto folder outside of containers.

prometheus-grafana-spring's People

Contributors

nobusugi246 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  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.