Skip to content

This simple demo project can be used as an example for Prometheus and Grafana setups to monitor a Spring-Boot application.

License

Notifications You must be signed in to change notification settings

cutePanda123/spring-boot-prometheus-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Use Prometheus and Grafana to monitor a Spring-Boot application

Table of Contents
  1. About The Project
  2. Prerequisites
  3. Usage
  4. License
  5. Contact

About The Project

Prometheus Monitoring


Grafana JVM Dashboard


This simple demo project can be used as an example of setup Prometheus and Grafana to monitor a Spring-Boot application.

The Spring-Boot application is a scheduled task that periodically sends data to console log and micrometer monitoring. And the Prometheus service keeps scraping the data from the exposed actuator prometheus endpoint (http:https://localhost:8080/actuator/prometheus). Apart from these, the project also contains a demo Grafana dashboard that monitors the JVM information of the Spring-Boot application with JVM (Micrometer).


Built With


Prerequisites

  • install and start Prometheus

    wget https://s3-eu-west-1.amazonaws.com/deb.robustperception.io/41EFC99D.gpg | sudo apt-key add -
    
    sudo apt-get update -y
    
    sudo apt-get install prometheus prometheus-node-exporter prometheus-pushgateway prometheus-alertmanager -y
    
    sudo systemctl start prometheus
    
    sudo systemctl enable prometheus
  • install and start Grafana

    echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
    
    sudo apt-get update
    
    sudo apt-get install grafana
    
    sudo systemctl daemon-reload
    
    sudo systemctl start grafana-server
    
    sudo systemctl status grafana-server

Usage


Spring-Boot Actuator Prometheus endpoint

Spring-Boot app output


License

Distributed under the MIT License. See LICENSE for more information.


Contact

Project Link: https://github.com/cutePanda123/spring-boot-prometheus-demo

About

This simple demo project can be used as an example for Prometheus and Grafana setups to monitor a Spring-Boot application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages