Day 78 - Prometheus

This commit is contained in:
Michael Cade 2022-03-21 06:54:58 +00:00
parent 170d79a4dd
commit 54f9a619f9

View File

@ -42,19 +42,19 @@ We will be using our minikube cluster locally again for this quick and simple in
`helm repo add prometheus-community https://prometheus-community.github.io/helm-charts` `helm repo add prometheus-community https://prometheus-community.github.io/helm-charts`
![](Images/day78_monitoring1.png) ![](Images/Day78_Monitoring1.png)
As you can see from the above we have also ran a helm repo update, we are now ready to deploy Prometheus into our minikube environment using the `helm install stable prometheus-community/prometheus` command. As you can see from the above we have also ran a helm repo update, we are now ready to deploy Prometheus into our minikube environment using the `helm install stable prometheus-community/prometheus` command.
![](Images/day78_monitoring2.png) ![](Images/Day78_Monitoring2.png)
After a couple of minutes you will see a number of new pods appear, for this demo I have deployed into the default namespace, I would normally push this to its own namespace. After a couple of minutes you will see a number of new pods appear, for this demo I have deployed into the default namespace, I would normally push this to its own namespace.
![](Images/day78_monitoring3.png) ![](Images/Day78_Monitoring3.png)
Once all the pods are running we can also take a look at all the deployed aspects of Prometheus. Once all the pods are running we can also take a look at all the deployed aspects of Prometheus.
![](Images/day78_monitoring4.png) ![](Images/Day78_Monitoring4.png)
Now for us to access the Prometheus Server UI we can use the following command to port forward. Now for us to access the Prometheus Server UI we can use the following command to port forward.
@ -64,11 +64,11 @@ export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,compon
``` ```
When we first open our browser to http://localhost:9090 we see the following very blank screen. When we first open our browser to http://localhost:9090 we see the following very blank screen.
![](Images/day78_monitoring5.png) ![](Images/Day78_Monitoring5.png)
Because we have deployed to our Kubernetes cluster we will automatically be picking up metrics from our Kubernetes API so we can use some PromQL to at least make sure we are capturing metrics `container_cpu_usage_seconds_total` Because we have deployed to our Kubernetes cluster we will automatically be picking up metrics from our Kubernetes API so we can use some PromQL to at least make sure we are capturing metrics `container_cpu_usage_seconds_total`
![](Images/day78_monitoring6.png) ![](Images/Day78_Monitoring6.png)
Short on learning PromQL and putting that into practice this is very much like I mentioned previously in that gaining metrics is great, so is monitoring but you have to know what you are monitoring and why and what you are not monitoring and why! Short on learning PromQL and putting that into practice this is very much like I mentioned previously in that gaining metrics is great, so is monitoring but you have to know what you are monitoring and why and what you are not monitoring and why!