Working with Library Panels - missing details #286
Replies: 2 comments
-
Library panels are just weird in Grafana. I went down the rabbit hole when I was working on the feature, but let me see if I can remember. The main thing is that you can't import a dashboard into Grafana prior to the library component existing. So once you have a library components in your staging ENV, you pull it down, pull the associated dashboards and then export them out to production. You just can't upload a dashboard while the library component doesn't exist, and you can't delete a library component while a dashboard references it. I have a test for that, so my first step is: gdg b libraryelements upload out:
Then you can List the dashboards that have a connection with the given panel ID: (Latest release has a bug with this though I can push a small patch soon ).
The T47...etc is the library panel ID. 2024-08-15 18:52:09 INF Running Sanity Check of Organization Membership
2024-08-15 18:52:09 INF Listing library connections for context context=testing
┌────┬───────────┬──────────────────────────────┬──────────────────────────────┬────────┐
│ ID │ UID │ SLUG │ TITLE │ FOLDER │
├────┼───────────┼──────────────────────────────┼──────────────────────────────┼────────┤
│ 12 │ F3eInwQ7z │ dashboard-makeover-challenge │ Dashboard Makeover Challenge │ Other │
└────┴───────────┴──────────────────────────────┴──────────────────────────────┴────────┘
If you look at the JSON for the dashboard you'll see that the UID for the libarary panel matches: "libraryPanel": {
"description": "",
"meta": {
"connectedDashboards": 3,
"created": "2022-04-27T21:27:23Z",
"createdBy": {
"avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1",
"id": 13,
"name": "[email protected]"
},
"folderName": "mj",
"folderUid": "R0bMCcW7z",
"updated": "2022-04-27T21:29:50Z",
"updatedBy": {
"avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1",
"id": 13,
"name": "[email protected]"
}
},
"name": "Dashboard Makeover - Extra Cleaning Duty Assignment Today",
"type": "table",
"uid": "T47RSwQnz",
"version": 2
}, To create this in production, you just need to.
|
Beta Was this translation helpful? Give feedback.
-
#283 Fixes the listing issue. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I use GDG to export the dashboard and push dashboard .json files to stash under: grafana/dashboards/folders/.json
I put those *.json files in prod as grafana provisioning. I also have datasource.yml
I notice "Panel plugin not found: Unable to load library panel: XXXXXX-XXXXXX-XXXXX" error in prod.
I went through this document https://software.es.net/gdg/docs/tutorials/working-with-library-panels/
You have listed rules. But the solution is not clear.
Are you suggesting this is the workaround/solution we should use 'The only way I can see to move a lib element is to unlink the panel, delete the panel and re-create it in a different folder, then re-link it.'
If so the steps mentioned below or the order do not match the statement.
I would like to know how to make library panel work in prod environment using provisioning and gdg is there a way where we can make it available please?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Step-by-step instruction how to export library panels from UAT and make them available in prod - achievable via automation (bash script) not manual GUI steps ,as there will be several library panels linked to different dashboards (one to many relationships).
Desktop (please complete the following information):
Additional context
Beta Was this translation helpful? Give feedback.
All reactions