Spring Boot - Monitoring Microservice with Prometheus and Grafana | Java Techie
Vložit
- čas přidán 31. 01. 2019
- This video explain you how to integrate spring boot actuator with a monitoring system called Prometheus and a graphing solution called Grafana
we used docker here to up Prometheus and Grafana Server
#JavaTechie #SpringBoot #micrometer #Prometheus #Grafana
GitHub:
github.com/Java-Techie-jt/spr...
Blogs:
javagyanmantra.wixsite.com/we...
Facebook:
/ 919464521471923
guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie - Věda a technologie
Clearest instruction I have read or watched on how to get this implemented locally. 5 years old and still applicable. Nice work and thank you.
3yrs old video. Still it's helping me to understand concepts clearly 😊
Never seen such a great explanation. keep update your technical videos. warm support from me always
Thank you very much for this great explanation. Keep it up.
Very nice, simple and detailed explanation. Thank you so much.
Very good video sir. Thanks for good explanation. It gave a clear idea about spring actuator, Micrometer, Prometheus and Grafana.
good information
liked the video for better reach
coding youtubers are heavily underrated in India
Excellent and clear explanation. Thanks a lot.
Simple and nice explanation. Thank you
you explain very well sir, I really liked it
As I have seen in your example it's generating the graph of "prometheus'' (job_name) instead of 'spring-actuator. I think our expectation is to see the graph of "spring-actuator" which is coming on HOST:PORT/actuator/prometheus.
To capture these logs you have to do a little change in your command as given below.
docker run --name prometheus -p 9090:9090 -v /prometheus.yml:/etc/prometheus/prometheus.yml --config.file=/etc/prometheus/prometheus.yml
I hope this will help all of you to get the expected outcomes.
I need to achieve the graph for "spring-actuator" if I use your above command getting this error
Unable to find image 'ee85501bb65d:latest' locally
docker: Error response from daemon: pull access denied for ee85501bb65d, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
@@sivamurugan6666 please use your image id instead of container id, it should work
@@jitendrathakur18190 before docker run how where I need to the the image id
@@sivamurugan6666 To create an image you can use the 'docker build' command. if you are using run directly it means you must have an image on the docker hub.
Thank you, nice tutorial.
great tutorial and explanation, congrats.
very well explained! thank you!
Excelent explanation ! Greetings from 🇧🇷
Thanks buddy glad to know this 😊
Excellent tutorial, very helpful
Great explanation Sir 👍 👍👍
Great tutorial. Keep it up. Thanks
Super thank you very much
Thank you for the video. Excellent explanation. Very clear and concise.
Can you please add a video for adding custom metrices for Prometheus scrapping. [All the types]
Yes I will do that
Thanks! It works!
For anyone having issues with Prometheus and cannot find the Spring actuator, add on your the following when you are running the Prometheus container
"source/to/your/prometheus.yml:/etc/proemtheus/prometheus.yml"
what it does is that copies the file to the container.
Excellent explanation. Very clear and concise. Thank you very much.
Just in case, if you know how to get micrometer into a non-spring project, please let us know how to.
Okay I will check and update
Thankyou soo muchhh
nice work Basant, Could you please add one more video explaining how to add "custome metrics" in prometheus?
TNX U VERY MUCH!)))
Nice
Definitely one of the best java teachers of CZcams...
Just one doubt:
What was the purpose of adding the message Endpoint?
Wasn't it to adding some metrics on it?
I just added one endpoint to show that based on request how metrics populate to Prometheus and then how it delegate to grafana
@@Javatechie I thought that the purpose of adding the endpoint was to add custom metrics in the endpoint, but you was delegating only default metrics to Grafana,
But it is a great video anyway, thanks for share the knowledge.
Nice Video
If we're not using docker toolbox would we just put localhost in for the IP? I did that and got to testing the Prometheus data source and got an "HTTP Bad Gateway" error.
one suggestion to all the viewers
if you want to pass in a custom prometheus.yml file
use this: -
docker run \
-p 9090:9090 \
-v /tmp/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
prom/prometheus
/tmp/prometheus/prometheus.yml -> path to your system
/etc/prometheus/prometheus.yml -> path inside prometheus image
---
check configs here: localhost :9090/classic/config
Hi, Nice video,
I have one query,
For how many intervals the matrix will get refreshed in a day automatically?
I have exposed some matrices which are counting the hit of an API,
So when I came after 24 hours and try to fetch the counter again then I was showing fewer numbers.
Example :
Today: /test API get the call for 300 times and counter is 300
Tomorrow after 24 hours: /test API get the call for 50 times, so counter must be 350, but it is showing 50 only
Just to make it more clear in case your actuator has not a default (8080) port:
application.yml
management:
server:
port: XXXX
prometheus.yml
- job_name: 'spring-actuator'
metrics_path: 'actuator/prometheus'
scrape_interval: some_time
static_configs:
- targets: ['host.docker.internal:XXXX']
i know u provide such a great video on youtube ,but brother spring and java is tricky to learn and understand so only fewer is try to learn this , now a days every one goes to python javascript etc i think u should provide python javascript etc tutorial. i tell u cause if u need more subscriber then u should provide them . and if u dont care about subscription its great , its only my suggestion nothing else , i dont care cause i am a spring developer and i learn many things from u and i also want this spring videos on your site. have a good day.....
I will plan to start python but after complete this AWS series
Great ! can you make spring batch tutorial ?
It's already there please check in spring boot playlist
Hii basant,
Thank you .. Please can u suggest how to work with Sherlock- promQL query..
Hi , nice explanation, I have two spring boot applications, one activemq, one mssql server are running using my docker-compose.yml file , later included promethus and grafana into it. I want to get all services metrics using promethus, can you please guid me or share any links related to the same.Thanks
Don't have much experience on it . need to check ✅
#One question-> why did you put prometheus.yml inside Spring boot application? why can't put it inside prometheus docker directory image?
Yes I believe we can .
Hello, I'm configuring a docker-composé file for prometheus and Granfana. But to indicate the config file 'prometheus.yml' to prometheus, I don't know how. Just because I'm using Windows OS.
NEED YOUR HELP
In docker for windows using wsl2 how to find which IP address docker is using?
is simple facade a design pattern?
Does anyone know why, no matter how much I update, the Prometheus.yml File no longer generates me?
Hi . How can we see the matrix of , how many times my rest end url hit ?
What if I have multiple replica of spring boot application and want to see the threaddump of all replica of application.
Hi, I am creating a gauge through my spring boot app, but not able to see that in Prometheus metrics...i have configured actuator correctly... Please help
Please see my comment, I hope it will help you to get your answer.
Please make a video on monitoring cache using prometheus and grafana.
Not getting any good resources on this.
Okay i will do that
I always see the endpoints of health, do see the ones which is show at 18:22 videos ? ANy idea ?
can you do one session for spring boot actuator + jmx
Yes spring boot actuator I already uploaded but jmx not tried
How do we deploy this , I mean do we need to run prometheus server as side car ?
Can we do same without using docker any possibility?
Yes we can do , you need to install it manually
**URGENT Hi Great video I just have a question. Even after running Prometheus.yml file on docker :9090 is not working.Can you please help? my target in my prometheus.yml file is is :8080
What is the error
How to configure multiple applications to be seen in Prometheus/grafana ?
how to expose your application metrics to Prometheus server?
Manually you need to configure as I show in video but yes lot of things are there in Prometheus so just Google it
I need a help in Fluentd + OpenSearch + Grafana, How we can configure this??
the code which you have given is it working
How to add graphs related to DB connection?
Basant could u explain GraphQL, example in springboot
Sujith spring boot with Graphql video already uploaded please search in my channel
Link : czcams.com/video/_raXT2TiDz0/video.html
@@Javatechie thanks 😊😊😊😊
How can I do on Google cloud where my application hosted?
நன்றி நண்பரே :: here is more on the great Prometheus >> www.oreilly.com/library/view/prometheus-up/9781492034131/ch01.html
**urgent** how to get IP address to access prometheus? localhost:9090 is showing prometheus UI but metrics are not there
Run command ip config
@@Javatechie spring-actuator endpoint is not getting listed in targets of prometheus can you tell why is it so
You need to include * all endpoint in your application. Properties
@@Javatechie i have used your code only
Okay same spring boot version
How to insert data in grafana using java program
Hi prachi I need to check this
Ok please give me a solution