Giter Club home page Giter Club logo

prometheus_tryout's Introduction

This app is about setting up a spring boot app with prometheus

you can import this application in intellij and run the application

below are the instrumentation which enables the application to emmit the prometheus metrics

implementation 'org.springframework.boot:spring-boot-starter-actuator' runtimeOnly 'io.micrometer:micrometer-registry-prometheus'

Once the application is up and running you can access below URLs [http://localhost:8080/actuator](All observability URI) [http://localhost:8080/actuator/prometheus](Prometheus metrics endpoint)

Now let's bring prometehus in to the came, We are using Colima with docker for this setup. brew install colima colima start

checkout the file ext/prometheus.yaml, at line No 20 change your ip address

Now let's add node exporter for your machine

if you have brew you can install using below command

brew install node_exporter

brew services start node_exporter

- job_name: 'my_mac' in [APPLICATION_DIRECTORY]/ext/prometheus.yaml will help prometheus to scrape metrics of host machine which is your Mac

In below change your 'APPLICATION_DIRECTORY'

docker run -d --name=prometheus -p 9090:9090 \ -v [APPLICATION_DIRECTORY]/ext/prometheus.yaml:/etc/prometheus/prometheus.yml prom/prometheus \ --config.file=/etc/prometheus/prometheus.yml

check prometheus you should be able to view the prometheus UI and you can play with promql

prometheus_tryout's People

Contributors

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