► Prometheus explained: th-cam.com/video/h4Sl21AKiDg/w-d-xo.html ► Demo Part 1: Setup Prometheus Monitoring on Kubernetes using Prometheus Operator: th-cam.com/video/QoDqxm7ybLc/w-d-xo.html ► To follow along, Git Repo: gitlab.com/nanuchi/kubernetes-tutorial-series-youtube/-/tree/master/prometheus-exporter ▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬ 0:00 - Intro 0:13 - Steps to monitor MongoDB (or any other third party application) metrics 2:06 - Prometheus Operator deployed - recap of part 1 5:13 - Service Monitor - How Prometheus discovers new targets? 8:10 - Deploy MongoDB application (Deployment and Service component) 8:56 - MongoDB Exporter - exposing MongoDB metrics 09:28 - What is a Exporter? 12:32 - 3 components you need when deploying an Exporter 13:40 - Deploy MongoDB Exporter using Helm Chart 19:37 - Check /metrics endpoint of MongoDB Exporter 20:35 - See new target in Prometheus UI 21:17 - See MongoDB metrics data in Grafana UI
thank you, it was elaborate, seems like it needed lot of work :).. also, can this same be applied if the database is not in the cluster but it is hosted outside the kubernetes cluster. i actually tried to do this to a postgre exporter, added values for service monitor in values file. but i couldnt get metrics exposed to prometheus. can you pls tell me how to get same done in postgreSQL exporter. thank you
If it's Prometheus in kubernetes, then u can assign a persistent volume block to store the metrics. The default retention period for Prometheus is 15 days , ofcourse u can increase by modifying the configuration. There is another solution, called 'thanos'. You can store metrics in cloud storage this is more useful if you want to store metrics for more than an year
The ServiceMonitor of the values.yaml of the mongodb exporter is disabled by default in new versions. You need to override this value too in order to be discovered by Prometheus. serviceMonitor: enabled: true additionalLabels: release: prometheus
This Prometheus series is realy the best out there in youtube.. Prometheus was always to me a dark spot, but now I can say that I know how to handel monitoring within my clusters. Many thanks NaNa
First of all thanks for the great content. Just wanted to understand why for grafana we use port-forwarding on deployment while on others we used port-forwarding on service
Great tutorial. Thank you very much. Is it possible to make another video on "how to scale Prometheus, long term prometheus data storage and use single Grafana to view all Prometheus metrics; all on k8s", please ?
I am getting fan of yours thanks. I am developer mostly build monolithic application in career and now learning micro service architecture and tools. and your videos are are very much helpful thank you
Hi Nana, your series are awesome as always, may I suggest you make another video about setting up Alert Manager and sending alert to Slack or Teams with Prometheus
Great video, quick question.. Why in the previous video with Grafana you used port-forward towards the deployment and now you use port-forward towards the service? Could you explain the difference please?
Thank you so much: this is a real life-saver video to really understand how all those moving parts fit together. Now off to experimenting and putting all this into practice.
@@TechWorldwithNana Hi guys, I have Prometheus-grafana set up in a axur kubernetes cluster. Grafana set is have three replica.also, I has a ingress set to a internal ip address and port300. I am able to access the grafana with ip and port number. But when I scale down grafana pods to 1, i'm unable to see grafana. Can someone explain why??
Hello Nana, really like this series, i just have a question, what if the question i want to monitor doesnt have an exporter like mongodb exporter, what should i do in that case? how do i scrape metrics from it?
hi dear Nana, good morning, firstly i have to thank you for taking the time to put up such a great video....its been 3 years since this video was posted , and it may be strange for you to see that its still helping some one today. well, i am a fresher in devops,... Dear Nana, my Prometheus was un able to scrap the data from mongodb exporter. is there something i missed out?, but the data is available in my mongodb exporter/ metrics end point... but the Prometheus ui just cant give me the metrics..
Wie immer, Teil 2 geschaut und live auf meinen minikube ausgeführt. Läuft alles gleich wie bei Nana, ich musste nur das mongodb-without-exporter.yaml selber schreiben da nicht gefunden. Aber gute Übung. Danke für dies. Gut habe ich alles bisher notiert da ein paar Details zu schnell gingen, und so habe ich mein eigenes Wiki :-)
Great tutorial nana, you made many concepts clear. I have one doubt, I have deployed my REST Service manager with the help of kubernetes. I want prometheus to monitor the rest calls, can you please suggest which exporter I should use?
I am not going to lie, I really wish you had created a custom app to use as the example instead of mongoDB (that or shown off both). It took me 2 days of debugging to fully understand everything. I was VERY confused by the exporter vs the serviceMonitor, and through that the former was the latter. I totally thought that Prometheus would just look for pods that had "release: Prometheus" and work. The lack of an up to date collection of documentation or tutorial really didnt help either. THank you for the video, as it basically was the only thing that gave mea reasonable example. (once I realized what to look for anyway.)
This was quite useful 😃, but I am looking for video in which telegraf will push matrics to pushgateway and them Prometheus will pull those metrics(k8) from there.. Could you pls create a video with live coding?? Thanks in advance.
Hi do you plan to or could point to a K8S for dummies series? There are many beginner type questions one has. Or do you plan to host a live session where we could ask questions? Please suggest which video to start with and if there is a series to follow to get to a decent level. Goal is CKA. However a bit challenging (for me). TY in advance and a great job!
As Always, Nana with the best content, Thanks for this video It helped me a lot. I am sorry I am watching this one a bit late as I was occupied with some other stuff.
I have just completed this tutorial and found that the mongodb-exporter did not appear in the "servicemonitor" but was in "svc". After a few minutes looking for the cause I found that in the latest version of the mongodb-exporter the servicemonitor is set to "false", meaning its not automatically picked up. I updated my values.yaml frile to include "enabled: true" and it worked. ** Updated YAML file** mongodb: uri: "mongodb://mongodb-service:27017" serviceMonitor: enabled: true additionalLabels: release: prometheus **End of update** Just as a side note I've watched a number of your tutorials and they are excllent. Thank you.
Awesome Tutorial! I'm facing an issue where Grafana UI is not pulling any metrics for most of the dashboards and also the mongodb pod whereas the Prometheus targets are up and working without any errors
Thanks for tutorial. But I have 1 question , Pods dashboard doesnt have mongodb exporter metrics, its have only node exporter metrics (and work without mongodb exporter). Where we can see mongodb exporter metrics in Grafana?
Thanks a lot for the video it was excellent. One question, will Prometheus discover the service monitors which are in another namespace also as long as the label release: Prometheus is present.
Hi Nana, Amazing tutorial. I just love your content, they are very informative and have helped me a lot. I just have one query regarding this lecture. I would like to monitor my postgres container running inside my kubernetes cluster. In Addition, that is a StatefulSet Pod and has been deployed as a headless service. Could you please tell me how to figure out the endpoint for that and what should be there in "values.yaml" file. Waiting in anticipation for your response. :)
It would be great to know how to setup the MongoDb exporter when someone followed your "Complete Application Deployment using Kumbernetes Components" Tutorial
Hi Nana, thanks for the great guide to understand and configure this monitoring stack. I just follow your steps and I can monitor MongoDB successfully. Now, I'm looking to add another VM to be monitored in my Prometheus. what should I add? node-exporter?
my current architecture look like this: 1. GKE Cluster(103.103.103.1) 2. my-new-VM (201.201.201.1) --> (node-exporter is installed and the metrics are exposed to hxxp://201.201.201.1:9100/metrics) Thank you for your help.
Hey Nana! Thanks for the amazing tutorial! I was trying to add exporter for postgres. But it doesn't have any such parameter as mongo uri. What changes to make in that case?
Hi just one comment: at 6:39 you are explaining "release: prometheus" label and how it is important. It doesnt have to have string "prometheus" its release name of the kube-prometheus-stack chart
Hi Nana, first of all. Really brilliant video. Thanks for all the effort you've put into this. I feel like my understanding of Prometheus has gone up a few steps now. Any ideas or pointers or links to documentation as to how I would pull this off with a Jenkins service? I've followed the pattern laid out here but can't seem to get my Jenkins server listed under Prometheus Targets. It works when I use MongoDB though. I'm using the default Jenkins helm chart.
Hello, Nice tutorial like always. I have a doubt in this. Even without using `mongodb-exporter` I am able to see everything related to mongodb deployment's CPU/memory etc. So, I am curious that why do we even need `mongodb-exporter`? Is it to see if internals of mongodb application is working fine or not? If yes, then even after deploying why I wasn't seeing any sharding etc metrics in Grafana? Any suggestions would be welcome.
Thank you for your videos. they are really great and very helpful. I have a small question: my service have already monitoring metrics, so i don't need the exporter. I just want to send my endpoint, which has path "posts/metrics" directly to prometheus and grafana. I made Service and ServiceMonitor which i can see among other servicemonitors, but prometheus didn't see it. Should i install any helm adapters or i just made a mistake in my services and service-monitor yaml files?
I am working on a project where I need to monitor the k8 cluster metrics as well as an msk cluster metrics. Can you provide some info on if/how I can use the kube-prometheus to get the job done?
I'm trying to apply the same concept to an Ingress Controller. I'm using ingress-nginx and I can't find they way to scrape data from this (I already set the metrics: true on my ingress controller, and also added additional labels with the kube-prometheus-stack name). What I see is that the problem could came from the namespace because I have the Prometheus stack on a namaespace: monitoring and my Ingress is on a namespace: dev so prometheus isn't scraping anything out of his namespace. What can I do ? need a bit of help ! Thank you and congratulations for your channel. I have instantly subscribed when I saw your exceptional explanations :)
Cool guide, thanks! One question, I've already installed the kube-prometheus-stack (and Metrics Server), and I automatically see the resource usages in Grafana you show at the end for each existing and new deployment/pod I create, without having to go through the process of adding an exporter (and service, servicemonitor, ...), like you did for the mongodb deployment. This video led me to believe I needed to do that (or expose /metrics and explicitly configure it in the Prometheus config) for each new deployment of which I want to see the metrics in Grafana. I'm wondering where do the resource usages I see come from then? Metrics Server? Or are the metrics you show at the end in Grafana not actually the ones that the mongodb exporter exposes?
Hello, I have a question, I have my deployment and service yamel of my app created in go, my question is: with the helm that I installed in part1 of your prometheus video, I understood that there is the kube-metrics export that what you do obtains the information of all the kubernetes objects including the pods, so my question is for my app to work in go, do I necessarily need to implement the monitor service as seen in this video or is it not necessary? Thank you
Hi thank you so much for the explanation of this topic. It is amazing how you explain this topic so easily. I have a problem with my setup. I made exactly what you did with newer versions of everything and the exporter takes a lot of time to return the metrics. Therefore even when the target appears in Prometheus, this one is never up because: "Get "context deadline exceeded". During your tutorial, you fetch the information in 30ms and I cannot do it with 30s. If I use the port-forward I can see the information, but it is really slow to show the metrics. Do you have any idea? Thank you again for your time, you got a new subscriber :)
I am having the same problem you are having. I extended my scrapeTimeout on the service monitor to 30s and I get the same error. When I port-forward and navigate to the /metrics endpoint it takes ~10s to display the data, but for some reason giving 30s to the service monitor still times it out.
I ended up increasing the scrapeTimeout to 60s and it was able to successfully scrape the data. Going to have to find a way to optimize the exporter it looks like...
I had the same issue, but I found out that the interval cannot be shorter than the timeout. So, I set the interval to 70s and the scrapeTimeout to 60s. That did the trick.
Hello Nana, these videos are good,but I have an important question, I was looking in the internet and I really could not find any video on website that shows how to edit prometheus files or creating alerts ON prometheus when the prometheus was installed using helm, can you share a website link or a video link where you or anyone shows how to create alerts on prometheus or how to edit prometheus confiuguration files using helm? , thank you
Thanks for this nice tutorial. I did same deployment using terraform and an azure mongodb database. Pod, servicemonitor are well set but strangely i cannot get metrics in prometheus. I noticed that values.yaml have a "serviceMonitor enabled" entry. Should this be also set ?
Found your comment just now after 1 year but I have encountered the issue where the servicemonitor does not get created after helm install and leave the serviceMonitor enabled in the values file does fix it.
Hi Anushree, what application is it? If it's a third party application, you should search for an exporter and check in the docs what metrics get exported from that service, similar to the process in this video.
@@TechWorldwithNana Hello, I understood that with only the metrics that the helm prometheus operator installs, I already obtained the information of all the pods that are in the kubernetes in all the namespaces, including custom applications, for example, created with go . Or is it that I necessarily have to install an exporter for go and a service monitor?
Hello, I have a question, I have my deployment and service yamel of my app created in go, my question is: with the helm that I installed in part1 of your prometheus video, I understood that there is the kube-metrics export that what you do obtains the information of all the kubernetes objects including the pods, so my question is for my app to work in go, do I necessarily need to implement the monitor service as seen in this video or is it not necessary? Thank you
► Prometheus explained: th-cam.com/video/h4Sl21AKiDg/w-d-xo.html
► Demo Part 1: Setup Prometheus Monitoring on Kubernetes using Prometheus Operator: th-cam.com/video/QoDqxm7ybLc/w-d-xo.html
► To follow along, Git Repo: gitlab.com/nanuchi/kubernetes-tutorial-series-youtube/-/tree/master/prometheus-exporter
▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬
0:00 - Intro
0:13 - Steps to monitor MongoDB (or any other third party application) metrics
2:06 - Prometheus Operator deployed - recap of part 1
5:13 - Service Monitor - How Prometheus discovers new targets?
8:10 - Deploy MongoDB application (Deployment and Service component)
8:56 - MongoDB Exporter - exposing MongoDB metrics
09:28 - What is a Exporter?
12:32 - 3 components you need when deploying an Exporter
13:40 - Deploy MongoDB Exporter using Helm Chart
19:37 - Check /metrics endpoint of MongoDB Exporter
20:35 - See new target in Prometheus UI
21:17 - See MongoDB metrics data in Grafana UI
thank you, it was elaborate, seems like it needed lot of work :).. also, can this same be applied if the database is not in the cluster but it is hosted outside the kubernetes cluster. i actually tried to do this to a postgre exporter, added values for service monitor in values file. but i couldnt get metrics exposed to prometheus. can you pls tell me how to get same done in postgreSQL exporter.
thank you
Could you please tell :
How to collect Prometheus metrics and store them?
If it's Prometheus in kubernetes, then u can assign a persistent volume block to store the metrics. The default retention period for Prometheus is 15 days , ofcourse u can increase by modifying the configuration. There is another solution, called 'thanos'. You can store metrics in cloud storage this is more useful if you want to store metrics for more than an year
If we want to restric some of the metrics not to consume by Prometheus, how can we do this?
The ServiceMonitor of the values.yaml of the mongodb exporter is disabled by default in new versions. You need to override this value too in order to be discovered by Prometheus. serviceMonitor:
enabled: true
additionalLabels:
release: prometheus
This Prometheus series is realy the best out there in youtube..
Prometheus was always to me a dark spot, but now I can say that I know how to handel monitoring within my clusters.
Many thanks NaNa
First of all thanks for the great content.
Just wanted to understand why for grafana we use port-forwarding on deployment while on others we used port-forwarding on service
Great video. People like you are what humanity really is. Kind, helping and thank you.
It has arrived! Instantly watched this when I saw it!
Thanks as always Nana for the quality videos and explanations!
Great tutorial. Thank you very much. Is it possible to make another video on "how to scale Prometheus, long term prometheus data storage and use single Grafana to view all Prometheus metrics; all on k8s", please ?
Very cool! Adding the exporter without changing the target pod to add a sidecar container. Very, very nice. Thx.
You're a life saver in IT World 👌👌👌
Made my day, learnt exporter deployment and service monitor 👏👏
I am getting fan of yours thanks. I am developer mostly build monolithic application in career and now learning micro service architecture and tools. and your videos are are very much helpful thank you
Hi Nana, your series are awesome as always, may I suggest you make another video about setting up Alert Manager and sending alert to Slack or Teams with Prometheus
Have been watching your videos on various topics Nana. Just one word to describe them - "Awesome !!!" Thank You :)
Thank you for making this seem so simple, really appreciate your effort to make such fantastic videos.
Your videos are very good in terms of details and knowledge. Thank you so much for putting them together and helping others.
This is a good video description of monitoring 3rd party applications. I will try to use it.
I was waiting for it keep it up .
One of the best channels on youtube
Yes many were waiting for part 2 :) Thanks so much 🙏
I created the same structure on the 2 node cluster of 2 GB RAM, and 1 CPU, 50GB storage each.
Excellent Demo!!!! Another feather in the cap. You go lady!!!!!
Great video, quick question..
Why in the previous video with Grafana you used port-forward towards the deployment and now you use port-forward towards the service? Could you explain the difference please?
Your contents and tutorials are amazing, I've been enjoying and learn a lot. Thank you so much for this channel Nana.
Hi Lucas, appreciate your feedback thank you! :)
Thank you Nana! just one Q: why we did port forward on deployment for Grafana and not on service line
Awesome video, Nana. Useful to deploy and understand how metric exporters works.
Thanks for you great work
Really appreciate your efforts Nana. Keep rocking ...
Thank you so much: this is a real life-saver video to really understand how all those moving parts fit together. Now off to experimenting and putting all this into practice.
So well explained! You saved me a lot of time, rlly appreciate your work :)
Thanks, really happy to hear that it was helpful for you :)
@@TechWorldwithNana Hi guys, I have Prometheus-grafana set up in a axur kubernetes cluster. Grafana set is have three replica.also, I has a ingress set to a internal ip address and port300. I am able to access the grafana with ip and port number. But when I scale down grafana pods to 1, i'm unable to see grafana. Can someone explain why??
Good. I have implemented mongodb exporter metrics in our environment.
Thanks for the Great Video . The content explains separate pods to collect metrics . Please post content with istio promethus integration .
Another super solid video, thank you again for all of your contributions in this space.
Hello Nana, really like this series, i just have a question, what if the question i want to monitor doesnt have an exporter like mongodb exporter, what should i do in that case? how do i scrape metrics from it?
hi dear Nana, good morning, firstly i have to thank you for taking the time to put up such a great video....its been 3 years since this video was posted , and it may be strange for you to see that its still helping some one today. well, i am a fresher in devops,...
Dear Nana, my Prometheus was un able to scrap the data from mongodb exporter. is there something i missed out?, but the data is available in my mongodb exporter/ metrics end point... but the Prometheus ui just cant give me the metrics..
same happen with me
Nana, you are awesome....this is what i was looking for and found in this video of yours... Thanks for sharing......
Thank you Nana for all of those well explained videos!!
Nice! I've been waiting for this video. Thank you, Nana!
Hope you liked it :)
Wie immer, Teil 2 geschaut und live auf meinen minikube ausgeführt. Läuft alles gleich wie bei Nana, ich musste nur das mongodb-without-exporter.yaml selber schreiben da nicht gefunden. Aber gute Übung. Danke für dies. Gut habe ich alles bisher notiert da ein paar Details zu schnell gingen, und so habe ich mein eigenes Wiki :-)
this amazing and helpful, may you make a video for mongodb as a statefulset as well by Operator? and Thanks for your amazing series
Thanks a lot Mohamed :) will consider your suggestion
Nice tutorials! Thanks for your effort! 🙂
Great tutorial nana, you made many concepts clear. I have one doubt, I have deployed my REST Service manager with the help of kubernetes. I want prometheus to monitor the rest calls, can you please suggest which exporter I should use?
It's really helpful @Nana ❤
I am not going to lie, I really wish you had created a custom app to use as the example instead of mongoDB (that or shown off both). It took me 2 days of debugging to fully understand everything. I was VERY confused by the exporter vs the serviceMonitor, and through that the former was the latter.
I totally thought that Prometheus would just look for pods that had "release: Prometheus" and work. The lack of an up to date collection of documentation or tutorial really didnt help either. THank you for the video, as it basically was the only thing that gave mea reasonable example. (once I realized what to look for anyway.)
In your case its necesary implement the service monitor? or only is necesary the kube-metrics that instaled helm ?
Help a lot, thanks for resume all this information in this series. Thank you again!!!
This was quite useful 😃, but I am looking for video in which telegraf will push matrics to pushgateway and them Prometheus will pull those metrics(k8) from there.. Could you pls create a video with live coding?? Thanks in advance.
Love tools. Thanks for sharing it.
Hi do you plan to or could point to a K8S for dummies series? There are many beginner type questions one has. Or do you plan to host a live session where we could ask questions? Please suggest which video to start with and if there is a series to follow to get to a decent level. Goal is CKA. However a bit challenging (for me).
TY in advance and a great job!
As Always, Nana with the best content, Thanks for this video It helped me a lot. I am sorry I am watching this one a bit late as I was occupied with some other stuff.
Great explanation , it will be great if you make a new tutorial for Helm and it's commands
Thanks :) Yes, I will definitely make a Helm demo video with all the main commands.
I have just completed this tutorial and found that the mongodb-exporter did not appear in the "servicemonitor" but was in "svc". After a few minutes looking for the cause I found that in the latest version of the mongodb-exporter the servicemonitor is set to "false", meaning its not automatically picked up. I updated my values.yaml frile to include "enabled: true" and it worked.
** Updated YAML file**
mongodb:
uri: "mongodb://mongodb-service:27017"
serviceMonitor:
enabled: true
additionalLabels:
release: prometheus
**End of update**
Just as a side note I've watched a number of your tutorials and they are excllent. Thank you.
15:30 if you are already in the git repo, just open the values.yml to see the possible parameters and their defaults!
Awesome Tutorial! I'm facing an issue where Grafana UI is not pulling any metrics for most of the dashboards and also the mongodb pod whereas the Prometheus targets are up and working without any errors
you ever get this fixed? Working through the same thing
Hi Nana, Good video. Do you have a video for java exporter?
Many thanks for your content! It's simple and brilliant explanation of basic monitoring setup! You just got new subscriber :)
Thanks for tutorial.
But I have 1 question , Pods dashboard doesnt have mongodb exporter metrics, its have only node exporter metrics (and work without mongodb exporter).
Where we can see mongodb exporter metrics in Grafana?
Thank you so much. Really, I am learning a lot through your channel
Thanks a ton again!! very helpful
Thanks a lot for the video it was excellent. One question, will Prometheus discover the service monitors which are in another namespace also as long as the label release: Prometheus is present.
So high quality channel.. Thanks for your contribution !!!!
Thanks for tutorial, 👍👍
My question, how i can scrape my application using prometheus?
I must create deploymeny, service and servicemonitor too?
thank you for such a wonderful video
This is just beautiful. Thank you so much!
Nice! But I wish you showed how to create an exporter from scratch, for homegrown pods.
Hi Nana,
Amazing tutorial. I just love your content, they are very informative and have helped me a lot.
I just have one query regarding this lecture.
I would like to monitor my postgres container running inside my kubernetes cluster.
In Addition, that is a StatefulSet Pod and has been deployed as a headless service.
Could you please tell me how to figure out the endpoint for that and what should be there in "values.yaml" file.
Waiting in anticipation for your response. :)
great explanation
It would be great to know how to setup the MongoDb exporter when someone followed your "Complete Application Deployment using Kumbernetes Components" Tutorial
Really good tutorial! Thank you so much.
Hi Nana, thanks for the great guide to understand and configure this monitoring stack.
I just follow your steps and I can monitor MongoDB successfully.
Now, I'm looking to add another VM to be monitored in my Prometheus. what should I add? node-exporter?
my current architecture look like this:
1. GKE Cluster(103.103.103.1)
2. my-new-VM (201.201.201.1) --> (node-exporter is installed and the metrics are exposed to hxxp://201.201.201.1:9100/metrics)
Thank you for your help.
Can you d oa video about alertmanager of this helmchart
Thank you so much.
Great tutorial !!!! 👍
Hey Nana! Thanks for the amazing tutorial! I was trying to add exporter for postgres. But it doesn't have any such parameter as mongo uri. What changes to make in that case?
excellent video, thank you Nana
Brilliant !! Many thanks !!
Hi just one comment: at 6:39 you are explaining "release: prometheus" label and how it is important. It doesnt have to have string "prometheus" its release name of the kube-prometheus-stack chart
Hi Nana, first of all. Really brilliant video. Thanks for all the effort you've put into this.
I feel like my understanding of Prometheus has gone up a few steps now.
Any ideas or pointers or links to documentation as to how I would pull this off with a Jenkins service? I've followed the pattern laid out here but can't seem to get my Jenkins server listed under Prometheus Targets. It works when I use MongoDB though.
I'm using the default Jenkins helm chart.
Thanks... Much helpful to me
Glad the video was helpful for you Shakeer :)
mam can you make a tutorial on how to monitor the clickhouse and clickhouse-exporter with prometheus and grafana please
What is the Difference of Service Discovery or Service Monitor and when we use each of them . Any advise please .
Thank you, this is excellent!
Thank you very much!!! ☺☺☺
Hello, Nice tutorial like always.
I have a doubt in this. Even without using `mongodb-exporter` I am able to see everything related to mongodb deployment's CPU/memory etc.
So, I am curious that why do we even need `mongodb-exporter`? Is it to see if internals of mongodb application is working fine or not? If yes, then even after deploying why I wasn't seeing any sharding etc metrics in Grafana? Any suggestions would be welcome.
great info! thank you!
Awesome, thanks 🔥
For the values.yaml. Please add the following line to enable to service monitoring in mongodb exporter
serviceMonitor:
enabled: true
Thank you for your videos. they are really great and very helpful. I have a small question: my service have already monitoring metrics, so i don't need the exporter. I just want to send my endpoint, which has path "posts/metrics" directly to prometheus and grafana. I made Service and ServiceMonitor which i can see among other servicemonitors, but prometheus didn't see it. Should i install any helm adapters or i just made a mistake in my services and service-monitor yaml files?
Great guide
Hi Nana Can you make HPA with Custom Metrics from Prometheus video?
You are a life saver
How to figure out the URI for any service? is there a standard way?
I am working on a project where I need to monitor the k8 cluster metrics as well as an msk cluster metrics. Can you provide some info on if/how I can use the kube-prometheus to get the job done?
For springboot service we no need to install any external exporter right
you are doing an awesome job (Y)
I'm trying to apply the same concept to an Ingress Controller. I'm using ingress-nginx and I can't find they way to scrape data from this (I already set the metrics: true on my ingress controller, and also added additional labels with the kube-prometheus-stack name). What I see is that the problem could came from the namespace because I have the Prometheus stack on a namaespace: monitoring and my Ingress is on a namespace: dev so prometheus isn't scraping anything out of his namespace. What can I do ? need a bit of help !
Thank you and congratulations for your channel. I have instantly subscribed when I saw your exceptional explanations :)
watch this video for detailed explanation on how to monitor ingress-nginx: th-cam.com/video/fAmYRWJnPzM/w-d-xo.html
Cool guide, thanks! One question, I've already installed the kube-prometheus-stack (and Metrics Server), and I automatically see the resource usages in Grafana you show at the end for each existing and new deployment/pod I create, without having to go through the process of adding an exporter (and service, servicemonitor, ...), like you did for the mongodb deployment. This video led me to believe I needed to do that (or expose /metrics and explicitly configure it in the Prometheus config) for each new deployment of which I want to see the metrics in Grafana. I'm wondering where do the resource usages I see come from then? Metrics Server? Or are the metrics you show at the end in Grafana not actually the ones that the mongodb exporter exposes?
Hello, I have a question, I have my deployment and service yamel of my app created in go, my question is: with the helm that I installed in part1 of your prometheus video, I understood that there is the kube-metrics export that what you do obtains the information of all the kubernetes objects including the pods, so my question is for my app to work in go, do I necessarily need to implement the monitor service as seen in this video or is it not necessary? Thank you
Hi thank you so much for the explanation of this topic. It is amazing how you explain this topic so easily.
I have a problem with my setup. I made exactly what you did with newer versions of everything and the exporter takes a lot of time to return the metrics. Therefore even when the target appears in Prometheus, this one is never up because: "Get "context deadline exceeded". During your tutorial, you fetch the information in 30ms and I cannot do it with 30s. If I use the port-forward I can see the information, but it is really slow to show the metrics.
Do you have any idea? Thank you again for your time, you got a new subscriber :)
I am having the same problem you are having. I extended my scrapeTimeout on the service monitor to 30s and I get the same error.
When I port-forward and navigate to the /metrics endpoint it takes ~10s to display the data, but for some reason giving 30s to the service monitor still times it out.
I ended up increasing the scrapeTimeout to 60s and it was able to successfully scrape the data. Going to have to find a way to optimize the exporter it looks like...
I had the same issue, but I found out that the interval cannot be shorter than the timeout. So, I set the interval to 70s and the scrapeTimeout to 60s. That did the trick.
Really nice :)
Hello Nana, these videos are good,but I have an important question, I was looking in the internet and I really could not find any video on website that shows how to edit prometheus files or creating alerts ON prometheus when the prometheus was installed using helm, can you share a website link or a video link where you or anyone shows how to create alerts on prometheus or how to edit prometheus confiuguration files using helm? , thank you
nice video
Thanks for this nice tutorial. I did same deployment using terraform and an azure mongodb database. Pod, servicemonitor are well set but strangely i cannot get metrics in prometheus. I noticed that values.yaml have a "serviceMonitor enabled" entry. Should this be also set ?
Found your comment just now after 1 year but I have encountered the issue where the servicemonitor does not get created after helm install and leave the serviceMonitor enabled in the values file does fix it.
can we run the port-forward command inside putty and run it as localhost?
Should i install prometheus on each namespace of k8s cluster? Or it can collect metrics from others namespaces also.
What changes do I need to make to an existing golang service to monitor the status (400, 200 etc) of the endpoints in the service?
Hi Anushree, what application is it? If it's a third party application, you should search for an exporter and check in the docs what metrics get exported from that service, similar to the process in this video.
@@TechWorldwithNana Hello, I understood that with only the metrics that the helm prometheus operator installs, I already obtained the information of all the pods that are in the kubernetes in all the namespaces, including custom applications, for example, created with go . Or is it that I necessarily have to install an exporter for go and a service monitor?
Hello, I have a question, I have my deployment and service yamel of my app created in go, my question is: with the helm that I installed in part1 of your prometheus video, I understood that there is the kube-metrics export that what you do obtains the information of all the kubernetes objects including the pods, so my question is for my app to work in go, do I necessarily need to implement the monitor service as seen in this video or is it not necessary? Thank you
You are awesome!