Grafana
Managed-cluster Grafana
Native managed clusters use the cluster observability add-on’s Grafana with Prometheus and Loki data sources. When Portal access is enabled, Context members can use Explore through the Portal hostname without cluster ingress. See Access cluster Grafana through Portal for prerequisites, access scope and diagnostics.
This add-on does not install Grafana Operator or its dashboard custom resources.
Legacy Grafana Operator installation
The following instructions describe the predecessor platform-monitoring installation and its existing dashboards. They do not configure the native managed-cluster observability add-on.
Grafana is installed using the grafana operator which manages the grafana instance, dashboards and datasources using CRDs. CRDs API reference: https://grafana-operator.github.io/grafana-operator/docs/api/
It runs as a deployment:
kubectl -n platform-monitoring get deploy grafana-operator
kubectl -n platform-monitoring get deploy platform-grafana-deploymentDashboards
Dashboards are automatically synced by the operator.
You can use the grafanadashboard resources to check its status and when it was last synced.
kubectl -n platform-monitoring get grafanadashboard
NAME NO MATCHING INSTANCES LAST RESYNC AGE
bastion 42m 7h43m
continuous-load 2m17s 7h43m
kubernetes-apiserver 42m 7h43m
[...]When exporting dashboard json from Grafana, make sure special characters are replaced as follows
- replace
{{ target }}with{{ "{{" }} target {{ "}}" }} - replace
$somevarwith${somevar}
Datasources
- Prometheus: points to the prometheus frontend to access all dashboard metrics
- Alertmanager: points to the managed alertmanager to manage silences, view firing alerts, contact points, and notification policies