kubedr
kubedr copied to clipboard
Document how metrics can be scraped with Prometheus
As can be seen here: https://catalogicsoftware.com/clab-docs/kubedr/userguide/monitoring.html#prometheus-metrics
We now export some backup related Prometheus metrics. The metrics end point is protected by RBAC by default so I tested it in the following way:
-
Removed RBAC by commenting out the line
- manager_auth_proxy_patch.yamland uncommenting the line- manager_prometheus_metrics_patch.yamlin the filekubedr/config/default/kustomization.yaml. You need to build KubeDR after this change. -
Deploy KubeDR and then run the following command:
$ kubectl -n kubedr-system port-forward <KUBEDR-CONTROLLER-POD> 8080:8080
Now, the following command will show all the relevant metrics:
$ curl -s http://localhost:8080/metrics | grep kubedr_
We need to figure out how to set up Prometheus in the default KubeDR configuration. The "kubebuilder" book at https://book.kubebuilder.io/reference/metrics.html has some details in this regard. Once we find a working Prometheus set up, we should document the procedure in user guide. It would also help to have some information on Grafana integration.