Coder Social home page Coder Social logo

demospringboot-prometheus's Introduction

demospringboot-prometheus

Setup Prometheus Server UI

  1. Build docker image
cd demospringboot-prometheus
docker build -t my-prometheus .
  1. Run docker image
docker run -p 9090:9090 my-prometheus
  1. Open Prometheus UI Go to your browser and type http://localhost:9090/targets

Run project

Go to your IDE and run the spring boot application To show prometheus logs without the UI go to http://localhost:8080/prometheus

Types of metrics

Grafana

Setup

docker run -d -p 3000:3000 -e \"GF_SECURITY_ADMIN_PASSWORD=secret\" -v ~/grafana_db:/var/lib/grafana grafana/grafana

Add Prometheus as a Grafana Data Source

  • Go to Grafana main view at http://localhost:3000/
  • Do login: admin/secret
  • Click on the Grafana icon in the top left corner to show the main menu, select Data Sources and click Add data source
  • Insert the following values:
  • Name: Prometheus
  • Type: Prometheus
  • URL: http://YOUR_LOCALHOST_IP(default port is 9090)
  • Access: proxy
  • Click on Add and Test Connection

Create Dashboard

  • Click on the Grafana icon in the top left corner to show the main menu, select Dashboards, New
  • Choose type of panel (Graph for example)
  • Click on panel title to edit
  • Choose Data Source, Add Query and save it

demospringboot-prometheus's People

Contributors

smartinrub avatar

Watchers

 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.