improve docs for Grafana deployment
Opened this issue · 4 comments
The doc https://retina.sh/docs/Installation/Grafana/grafana/ is not very clear and the instructions for https://retina.sh/docs/Installation/Grafana/prometheus-unmanaged are re-directing the user to Grafana cloud to create a new dashboard.
Question
Why are we re-directing the user to Grafana Cloud?
Proposal
- restructure the document to separate Prometheus deployment and Grafana deployment
- provide instructions on how to deploy Grafana via Helm for consistency (since we already do that for Prometheus )
- provide instructions on how to configure Prometheus data source in Grafana and create Kubernetes dashboard
References
@SRodi Proposal makes sense, we need to be more explicit in saying BYO Grafana can be deployed anywhere. Even in cluster would work. Ideally, we should enhance this to show how to install Grafana instance in cluster which can be port forwarded. I will accept this issue; can you assign this to yourself and fix it?
Perhaps also worth adding the generation of configmaps from dashboard JSON's included in the repository for Grafana to scan and automatically create relevant dashboards.
@whatnick I agree, this is an option on the values.yaml of Grafana Helm chart
My suggestion would be to add to the doc an example of how to import at least kubernetes-networking-clusters dashboard when deploying Grafana via Helm chart, by including these steps:
- create a ConfigMap that contains the dashboard JSON file. This ConfigMap will be used to provision the dashboard in Grafana.
- update the values.yaml file to include the dashboard provisioning configuration. Specify the path to the ConfigMap and enable the dashboard providers.
For example:
# values.yaml
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/default
dashboards:
default:
kubernetes-networking-clusters:
gnetId: 18814
revision: 1
datasource: Prometheus
Then use the Helm command to deploy Grafana with the updated values.yaml file.
kubectl create namespace monitoring
helm search repo grafana/grafana
helm install my-grafana grafana/grafana --namespace monitoring -f values.yaml
This will deploy Grafana and automatically import the kubernetes-networking-clusters dashboard.
Just to note since you have said
- provide instructions on how to deploy Grafana via Helm for consistency (since we already do that for Prometheus)
The kube-prometheus
chart includes Grafana. By following the instructions in Prometheus Unmanaged to set up self-hosted Prometheus stack, you have already installed Grafana by the time you get to the "Configuring Grafana" steps. IMO, this section should be rewritten to actually be configuring the instance, and not mention SaaS Grafana or any further install steps except maybe saying you can access the instance you just installed by kubectl port-forward svc/prometheus-grafana 8080:80
.