From 35a209903e31b5c1ce753a0bd251d43bd3455d4e Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Wed, 5 Aug 2020 16:17:18 +0300 Subject: [PATCH] Add monitoring section to install docs --- docs/guides/installation.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/guides/installation.md b/docs/guides/installation.md index 9a3cc12f..22adf704 100644 --- a/docs/guides/installation.md +++ b/docs/guides/installation.md @@ -328,3 +328,30 @@ tk create helmrelease sealed-secrets \ --chart-name=sealed-secrets \ --chart-version="^1.10.0" ``` + +### Monitoring with Prometheus and Grafana + +The GitOps Toolkit comes with an optional monitoring stack. +You can install the stack in the `gitops-system` namespace with: + +```yaml +kustomize build github.com/fluxcd/toolkit/manifests/monitoring?ref=master | kubectl apply -f- +``` + +The monitoring stack is composed of: + +* Prometheus server - collects metrics from the toolkit controllers and stores them for 2h +* Grafana dashboards - displays the control plane resource usage and reconciliation stats + +![](../_files/cp-dashboard-p1.png) + +![](../_files/cp-dashboard-p2.png) + +If you wish to use your own Prometheus and Grafana instances, then you can import the dashboards from +[GitHub](https://github.com/fluxcd/toolkit/tree/master/manifests/monitoring/grafana/dashboards). + +!!! hint + Note that the toolkit controllers expose the `/metrics` endpoint on port `8080`. + When using Prometheus Operator you should create `PodMonitor` objects to configure scraping. + When Prometheus is running outside of the `gitops-system` namespace, you have to create a network policy + that allows traffic on port `8080` from the namespace where Prometheus is deployed.