Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve docs for Grafana deployment #758

Closed
SRodi opened this issue Sep 19, 2024 · 4 comments · Fixed by #809
Closed

improve docs for Grafana deployment #758

SRodi opened this issue Sep 19, 2024 · 4 comments · Fixed by #809
Assignees
Labels
area/documentation Improvements or additions to documentation type/enhancement New feature or request

Comments

@SRodi
Copy link
Member

SRodi commented Sep 19, 2024

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

  1. restructure the document to separate Prometheus deployment and Grafana deployment
  2. provide instructions on how to deploy Grafana via Helm for consistency (since we already do that for Prometheus )
  3. provide instructions on how to configure Prometheus data source in Grafana and create Kubernetes dashboard

References

@SRodi SRodi added area/documentation Improvements or additions to documentation type/enhancement New feature or request labels Sep 19, 2024
@vakalapa
Copy link
Contributor

vakalapa commented Sep 19, 2024

@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?

@SRodi SRodi self-assigned this Sep 19, 2024
@whatnick
Copy link
Contributor

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.

@SRodi
Copy link
Member Author

SRodi commented Sep 23, 2024

@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:

  1. create a ConfigMap that contains the dashboard JSON file. This ConfigMap will be used to provision the dashboard in Grafana.
  2. 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.

@rbtr
Copy link
Collaborator

rbtr commented Sep 24, 2024

Just to note since you have said

  1. 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.

github-merge-queue bot pushed a commit that referenced this issue Oct 4, 2024
# Description

* fix instructions for Prometheus and Grafana installation
* revamp and restructure

## Related Issue

fix #758 

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [x] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.


![image](https://github.com/user-attachments/assets/9c5b742a-f4bd-4003-b2f4-078c2a5d319e)


![image](https://github.com/user-attachments/assets/5e1880f4-bd82-4a19-894c-82cf4482d900)


![image](https://github.com/user-attachments/assets/1d9c37df-480c-4409-9cf1-28e195fc7b3a)


## Additional Notes

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.

---------

Signed-off-by: Simone Rodigari <[email protected]>
@SRodi SRodi closed this as completed in #809 Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation type/enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants