How-To: Collect metrics with Prometheus
Categories:
Prometheus collects and stores metrics as time series data. This guide will show you how to collect Radius control plane metrics to then be visualized and queried.
Install Prometheus on Kubernetes
-
Make sure you have the following pre-requisites:
-
Create a namespace that can be used to deploy the Grafana and Prometheus monitoring tools:
kubectl create namespace radius-monitoring
-
Install Prometheus into your monitoring namespace:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm install radius-prom prometheus-community/prometheus -n radius-monitoring
If you are Minikube user or want to disable persistent volume for development purposes, you can disable it by using the following command.
helm install radius-prom prometheus-community/prometheus -n radius-monitoring --set alertmanager.persistentVolume.enable=false --set pushgateway.persistentVolume.enabled=false --set server.persistentVolume.enabled=false
-
Validate your Prometheus installation:
kubectl get pods -n radius-monitoring
You should see something similar to the following:
NAME READY STATUS RESTARTS AGE radius-prom-kube-state-metrics-9849d6cc6-t94p8 1/1 Running 0 4m58s radius-prom-prometheus-alertmanager-749cc46f6-9b5t8 2/2 Running 0 4m58s radius-prom-prometheus-node-exporter-5jh8p 1/1 Running 0 4m58s radius-prom-prometheus-node-exporter-88gbg 1/1 Running 0 4m58s radius-prom-prometheus-node-exporter-bjp9f 1/1 Running 0 4m58s radius-prom-prometheus-pushgateway-688665d597-h4xx2 1/1 Running 0 4m58s radius-prom-prometheus-server-694fd8d7c-q5d59 2/2 Running 0 4m58s
-
Done! Prometheus is now installed and ready to collect metrics from the Radius control plane.
Next step: Add a Grafana dashboard
Now that you have Prometheus installed, you can visualize the metrics using Grafana. Follow the Grafana installation guide to get up and running with a Grafana dashboard.
Next: Add a Grafana dashboardFurther reading
Feedback
Was this page helpful?
Glad to hear it! Please feel free to star our repo and join our Discord server to stay up to date with the project.
Sorry to hear that. If you would like to also contribute a suggestion visit and tell us how we can improve.