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

fix(dashboards): Port multi-cluster dashboard to new grafonnet library #904

Merged

Conversation

skl
Copy link
Collaborator

@skl skl commented Apr 8, 2024

This PR ports the Kubernetes / Compute Resources / Multi-Cluster dashboard over to the new grafonnet library in order to support Grafana 11.

Relates to:

In addition:

  • Fixes outdated grafanaDashboardIDs references in order to provide consistent data links

Screenshot of updated dashboard running:

Screenshot 2024-04-08 at 17 22 38

Test procedure:

Add a dashboard provisioning YAML file to your Grafana instance, e.g. provisioning/dashboards/dashboards.yaml:

apiVersion: 1

providers:
  - name: dashboards
    type: file
    updateIntervalSeconds: 10
    options:
      path: /var/lib/grafana/dashboards
      foldersFromFilesStructure: true

Mount the dashboards_out to your docker container, e.g. via docker-compose.yaml:

- /path/to/kubernetes-mixin/dashboards_out:/var/lib/grafana/dashboards/kubernetes-mixin

Install the kubernetes-mixin repo deps:

go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
brew install jsonnet
cd kubernetes-mixin
jb install

Iterate and build the mixin:

make fmt generate

Grafana will automatically re-provision the dashboards every 10 seconds.

@povilasv povilasv merged commit b247371 into kubernetes-monitoring:master Apr 9, 2024
5 of 6 checks passed
@povilasv
Copy link
Contributor

povilasv commented Apr 9, 2024

Thank you

@skl skl deleted the skl/grafana11-multi-cluster branch April 9, 2024 13:30
Comment on lines +301 to +305
g.util.grid.wrapPanels(panels.highlights, panelWidth=4, panelHeight=3, startY=0)
+ g.util.grid.wrapPanels(panels.cpuUsage, panelWidth=24, panelHeight=7, startY=1)
+ g.util.grid.wrapPanels(panels.cpuQuota, panelWidth=24, panelHeight=7, startY=2)
+ g.util.grid.wrapPanels(panels.memoryUsage, panelWidth=24, panelHeight=7, startY=3)
+ g.util.grid.wrapPanels(panels.memoryRequests, panelWidth=24, panelHeight=7, startY=4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could provide whole array of panels into single wrapPanels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants