What are Library Panels?
Library panels are shared, reusable panel definitions stored separately from dashboards:- Single source of truth: Update once, reflect everywhere
- Version controlled: Track changes with version history
- Organized by folder: Store in folders with permissions
- Dashboard independent: Panel configuration without grid position or ID
Library panels exclude dashboard-specific properties like
gridPos, id, and libraryPanel reference from the stored model.Creating Library Panels
From an Existing Panel
- Edit a panel on any dashboard
- Click the panel title → More… → Create library panel
- Configure:
- Name: Unique identifier for the panel
- Folder: Where to store the library panel
- Description: Optional documentation
- Save the library panel
From the Library Panels Page
- Navigate to Dashboards → Library panels
- Click New library panel
- Configure the panel (visualization, queries, options)
- Set name, folder, and description
- Save
TypeScript Interface
Using Library Panels in Dashboards
Add to Dashboard
- Edit a dashboard
- Click Add → Add a panel from the panel library
- Search or browse library panels
- Select a panel to add it to your dashboard
- Position and resize as needed
Panel Reference
When added to a dashboard, library panels are referenced (not copied):Unlink from Library
To customize a library panel for a specific dashboard:- Click the panel title → More… → Unlink library panel
- The panel becomes a regular dashboard panel
- Changes no longer sync with the library panel
Managing Library Panels
Search and Filter
The library panels page supports filtering:Update Library Panel
Updating a library panel affects all connected dashboards:- From the library panels page, click a panel
- Edit the panel configuration
- Save changes
- All dashboards using this panel will be updated
Delete Library Panel
Before deleting, check connected dashboards:API Reference
List Library Panels
Get Library Panel
Create Library Panel
Update Library Panel
Delete Library Panel
Get Connected Dashboards
Permissions and Sharing
Folder Permissions
Library panels inherit permissions from their folder:- Viewers: Can use library panels in dashboards
- Editors: Can update library panel definitions
- Admins: Can delete library panels and manage permissions
To use a library panel, users need at least view permission on the folder containing it.
Moving Between Folders
Update thefolderUid to move a library panel:
Version History
Library panels track version numbers:- Incremented automatically on each update
- Used for optimistic locking (prevents concurrent updates)
- Version mismatch on update returns an error
TypeScript Examples
Using the library panels API frompublic/app/features/library-panels/state/api.ts:1:
Best Practices
When to Use Library Panels
When to Use Library Panels
Good use cases:
- Standard metrics shown across multiple dashboards (CPU, memory, disk)
- Compliance or SLA panels that must be consistent
- Complex visualizations that teams frequently reuse
- One-off panels unique to a dashboard
- Panels that need per-dashboard customization
- Rapidly changing experimental visualizations
Naming Conventions
Naming Conventions
Use clear, descriptive names:
- Include metric and visualization type:
CPU Usage - Timeseries - Add scope if relevant:
K8s Pod Memory - Table - Avoid generic names like
Panel 1orGraph
Folder Organization
Folder Organization
Organize library panels by:
- Team:
SRE/,Data/,Platform/ - Service:
API/,Database/,Frontend/ - Type:
SLI Panels/,Debug Panels/
Version Management
Version Management
- Test changes on a copy before updating widely-used panels
- Document breaking changes in the description
- Consider creating a new panel instead of updating for major changes
Performance Considerations
Performance Considerations
- Library panels are loaded individually, so many on one dashboard can slow loading
- Each library panel tracks connections, which adds database queries
- For high-traffic dashboards, consider unlinking frequently accessed panels
Related Topics
Panels
Understand panel configuration and options
Folders
Organize library panels with folders
Dashboard Variables
Use variables in library panel queries
Permissions
Manage access to library panels