Giter Site home page Giter Site logo

spring-boot-grafana's Introduction

Spring Boot Application with Prometheus and Grafana Integration

This repository contains a sample Spring Boot application configured to collect metrics using Prometheus and visualize them using Grafana.

Setup

Prerequisites

Make sure you have the following installed on your system:

  • Java Development Kit (JDK) version 8 or later
  • Maven build tool
  • Docker (for running Prometheus and Grafana containers)

Running the Application

  1. Clone this repository to your local machine:

    git clone https://github.com/tusharlimbhore/spring-boot-grafana.git
  2. Navigate to the project directory:

    cd prometheus-demo
  3. Build the Spring Boot application using Maven:

    mvn clean package
  4. Run the Spring Boot application:

    java -jar target/prometheus-demo.jar

Prometheus and Grafana Setup

  1. Start Prometheus and Grafana using Docker Compose:

    docker-compose up -d
  2. Access Prometheus at http://localhost:9090 and Grafana at http://localhost:3000. Default credentials for Grafana are admin/admin.

  3. Configure Prometheus to scrape metrics from the Spring Boot application by adding the following to your prometheus.yml file:

    scrape_configs:
      - job_name: 'spring-boot-app'
        metrics_path: '/actuator/prometheus'
        static_configs:
          - targets: ['spring-boot-app:8080']
  4. Import the Prometheus and Grafana dashboards available in the dashboards directory.

Usage

  • Once the Spring Boot application is running and Prometheus and Grafana are set up, you can access various metrics exposed by the application through Prometheus and visualize them using Grafana dashboards.
  • Explore and customize Grafana dashboards as per your requirements.

Contributing

Contributions are welcome! Please fork this repository, make your changes, and submit a pull request.

spring-boot-grafana's People

Watchers

Tushar Limbhore 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.