Skip to content

Latest commit

 

History

History
133 lines (87 loc) · 4.27 KB

README.md

File metadata and controls

133 lines (87 loc) · 4.27 KB

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://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