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

using raw dashboards in folders #133

Open
khumps opened this issue Mar 16, 2023 · 2 comments
Open

using raw dashboards in folders #133

khumps opened this issue Mar 16, 2023 · 2 comments

Comments

@khumps
Copy link

khumps commented Mar 16, 2023

The kube-prometheus documentation mentions using the rawDashboards field instead of the dashboards field when passing in pre-rendered JSON dashboards for "performance" reasons. However, I want to put my dashboards in folders which appears to only be possible with the folderDashboards field. Is there some undocumented folderRawDashboards field or does folderDashboards support using importstr?

@baconalot
Copy link

I would argue a new structure is needed to administer dashboard configuration separate from dashboard creation. Things like folder layout and starring are managed on a different level in grafana and mixing those with dashboard creation is bound to create headaches.
ex.

rawDashboards+:: {
            'overview.json': (importstr 'extra_dashboards/overview.json'),
            'jobs.json': (importstr 'extra_dashboards/jobs.json'),
},
dashboardConfig+:: {
            'overview': {folder:'myfolder', starred:true},
            'jobs': {folder:'anotherfolder'}
},

The referencing of the dashboards is of course the tricky part here.

@baconalot
Copy link

baconalot commented May 11, 2023

Or alternatively: switch to a dashboard structure that eats an object instead of only the definition.
ex.

dashboardsExtended+:: {
     'overview.json': {type:'raw', data:(importstr 'extra_dashboards/overview.json'), starred:true, folder:'myfolder'},
},

That solves the referencing problem

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

No branches or pull requests

2 participants