Using Dashboard Rows
1. Adding Row Containers
| Property | Description | Default Value | Notes |
|---|---|---|---|
| row | Defines a new row container in the dashboard layout | None | Used to group panels vertically |
| collapsed | Indicates whether the row is collapsed by default | false | Set to true to hide the row initially |
| height | Height of the row in pixels | 200px | Adjusts vertical space for panels inside |
Example: Adding a Row Container
{
"dashboard": {
"rows": [
{
"id": 1,
"title": "System Metrics",
"collapsed": false,
"height": 300
}
]
}
}
2. Naming Row Titles
| Property | Value | Description |
|---|---|---|
| title | string |
The name displayed for the row in the dashboard |
| collapsed | boolean |
If true, the row is collapsed by default when the dashboard loads |
3. Collapsing and Expanding Rows
| Option | Values | Notes |
|---|---|---|
| collapsed | true / false |
Controls initial state of the row |
Note: When a row is collapsed, all panels within it are hidden from view but remain in the dashboard JSON.
Warning: Collapsed rows can be difficult to re-expand if the dashboard is viewed on a small screen or in a mobile layout.
4. Moving Rows (drag and drop)
Rows in a Grafana dashboard can be repositioned using drag and drop functionality. This allows for dynamic rearrangement of panels within the dashboard layout.
| Step | Action | Description |
|---|---|---|
| 1 | Click and hold | Click and hold the row handle (a small bar or icon at the top of each row) to initiate dragging. |
| 2 | Drag row | Drag the row to the desired position in the dashboard layout. |
| 3 | Release | Release the mouse button to drop the row into its new position. |
Note: The row handle is typically visible as a small horizontal bar or icon at the top of each dashboard row. This feature works in both edit and view modes.
Example: Reordering Rows
To reorder rows in Grafana:
- Enter dashboard edit mode.
- Locate the row handle (a small bar) at the top of a row.
- Click and drag the row to a new position in the dashboard.
- Release the mouse to drop the row into place.
5. Using Repeating Rows
Repeating rows in Grafana allow you to dynamically create multiple rows based on a variable's values, which is particularly useful for grouping panels by dimensions like environment, service, or region.
| Property | Description | Example |
|---|---|---|
| repeat | Defines the variable to repeat the row by. The row will be repeated for each value of this variable. | repeat: env |
| repeatDirection | Controls the direction of repeating rows. Options are h (horizontal) or v (vertical). Default is v. |
repeatDirection: h |
| maxPerRow | Limits the number of panels per row when repeating horizontally. Default is 0 (no limit). |
maxPerRow: 2 |
Example: Repeating Rows by Environment
{
"panels": [
{
"id": 1,
"type": "row",
"repeat": "env",
"repeatDirection": "v"
},
{
"id": 2,
"type": "graph",
"title": "CPU Usage - {{env}}"
}
]
}
Note: The variable
env must be defined in the dashboard's variables. Each repeated row will have a unique context based on the variable value.
6. Deleting Rows
Rows in Grafana dashboards can be deleted either individually or in bulk. This action removes the row and all panels within it from the dashboard.
| Action | Description | Notes |
|---|---|---|
| Delete Single Row | Click the row's gear icon and select "Delete row" | Available in Grafana v9.0+ |
| Delete Multiple Rows | Use the selection mode to select multiple rows and delete them together | Requires selecting rows first using the checkbox in the row header |
Example: Deleting a Row via UI
1. Click the row's gear icon (⚙️)
2. Select "Delete row" from the dropdown menu
3. Confirm deletion in the modal dialog
Note: Deleting a row is irreversible. Panels within the row will be permanently removed from the dashboard.
7. Setting Row Height
| Property | Values | Description |
|---|---|---|
| height | 200px, 100% |
Sets the height of the row in pixels or percentage |
| collapsed | true, false |
Controls whether the row is collapsed by default |
Note: The height property can be set in pixels or as a percentage of the dashboard width.
8. Organizing Panels in Rows
| Property | Description | Values |
|---|---|---|
| panels | List of panels in the row | [] |
| collapsed | Whether the row is collapsed by default | false or true |
| gridPos | Position of the row in the grid | { x: number, y: number, w: number, h: number } |
Example: Creating a Row with Panels
{
"panels": [
{
"id": 1,
"type": "graph",
"title": "CPU Usage"
},
{
"id": 2,
"type": "stat",
"title": "Memory Usage"
}
],
"collapsed": false,
"gridPos": {
"x": 0,
"y": 0,
"w": 24,
"h": 8
}
}
Note: Rows can contain multiple panels and are useful for grouping related metrics together.
9. Using Row for Summary Metrics
| Property | Description | Values |
|---|---|---|
| panels | Array of panels to include in the row | [] |
| collapsed | Whether the row is collapsed by default | false |
| title | Display title of the row | "Summary Metrics" |
Example: Define a Summary Metrics Row
{
"title": "Summary Metrics",
"collapsed": false,
"panels": [
{
"type": "stat",
"title": "Total Users"
},
{
"type": "gauge",
"title": "CPU Usage"
}
]
}
Note: Rows can contain multiple panels and are useful for grouping related metrics together.
10. Copying Rows
Example: Copying a Row in Grafana
// In Grafana UI, select a row and use the context menu
// to copy it to the clipboard
// The copied row includes all panels and their configurations
// as a JSON structure that can be pasted into another dashboard
// Example of row configuration in JSON format:
{
"id": 123,
"title": "System Metrics",
"panels": [
{
"id": 1,
"type": "graph",
"title": "CPU Usage"
},
{
"id": 2,
"type": "stat",
"title": "Memory Usage"
}
]
}
| Step | Description | Notes |
|---|---|---|
| Select Row | Click on the row header to select it | Selected rows show a blue highlight |
| Copy Action | Right-click on the selected row or use the toolbar | Copy option appears in context menu |
| Paste Destination | Open target dashboard and paste the row | Rows can be pasted into same or different dashboards |
Note: When copying rows, all panel configurations and data sources are preserved. This is useful for replicating dashboard layouts across multiple dashboards.