-
Notifications
You must be signed in to change notification settings - Fork 51
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
What would be the best way to import json dashboards / boards from grafana.com #51
Comments
This setup is very opinionated about this, and expects you to provide dashboards in form of configuration up front. If you want a dashboard from grafana.com you need to download it and add it to the |
Do you have an example of this? Wouldn't it make your file bloated? A suggestion could be to be able to define voulumen mounts. The config maps with dashboard json is easy to create. |
with jsonnet you can merge anything you want onto the existing structure, if that's what you want to do you can, but we prefer to do everything declaratively 🙂 |
An example would be {
grafanaDashboards+:: {
'my-dashboard.json':
dashboard.new('My Dashboard')
.addTemplate(
{
current: {
text: 'Prometheus',
value: 'Prometheus',
},
hide: 0,
label: null,
name: 'datasource',
options: [],
query: 'prometheus',
refresh: 1,
regex: '',
type: 'datasource',
},
)
.addRow(
row.new()
.addPanel(graphPanel.new('My Panel', span=6, datasource='$datasource')
.addTarget(prometheus.target('vector(1)')))
),
},
} |
I added #52 as an example of how to add a dashboard. |
Thanks.. It's not exactly what we need... but we could make it work.. Tried adding the entire json into the template tag.. that didn't work.. So we'll just use the code to create the configmap mappings in grafana and then we'll add the json to the created configmap in another deployment step. |
No description provided.
The text was updated successfully, but these errors were encountered: