> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashduty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dashboards

> Turn queries into dashboard panels in Flashduty Monitors: folder organisation, template variables, period-over-period comparison, cross-panel cursor linking, click-to-filter, version history and restore.

A dashboard turns queries into charts. It consists of tabs, sections, and panels. Each panel binds one data source and a set of queries, which run live for the current time range and variables every time the dashboard opens. Use it for the few charts you open again and again for routine inspection and incident review. You don't have to rewrite the queries in the [Query workbench](https://docs.flashduty.com/en/monitors/explore/explore.md) every time.

## Where to find it

* **Menu**: **Visualization → Dashboards** in the left menu. Members who can view data sources see this entry.
* **From the Query Workbench**: save a query that returns results straight to a dashboard — see [Create and save a dashboard](#create-and-save-a-dashboard).

Whether you can view or edit a dashboard depends on its **folder** — see [Permissions](#permissions).

## List and folders

The left side is the folder tree shared with alert rules; the right side lists the dashboards in the current folder. Folders are created, renamed, moved and deleted on the tree — see [Folder management](https://docs.flashduty.com/en/monitors/folders/folders.md).

* The box above the folder tree on the left searches the **current folder** only; the search term and page are kept in the page address, so links can be shared and returning from a dashboard restores the list; the page size you choose is remembered in the browser and reused the next time you open this list.
* **Search all dashboards** at the top right of the page looks across every folder you can read (only folders you can read are listed), ignoring the folder you are currently in: it matches a dashboard's **title or description**, with multiple keywords separated by spaces (up to 128 characters). Each result shows the title and its folder path (long paths wrap in full), and clicking one opens that dashboard; results are paged 20 at a time and there is a **Retry** button if the request fails. It is not a dialog: it expands in place, and results appear in a dropdown panel below it. Its search state lives only in the search box. Click the ✕ on the right, press `Esc`, or click outside the panel to close it; closing discards the search, and it is never written into the page address.
* When the box is open but empty, the panel lists the **5 most recently opened** dashboards (title plus full folder path); clicking one opens it and moves it to the top. This history is kept only in the current account's browser, is never uploaded, and **Clear history** empties it.
* Each row's **More** menu offers: move to another folder, clone to this folder, clone to another folder. A clone is a new dashboard whose title gets a "copy" suffix and **does not carry version history**; moving or cloning into another folder requires read access to that folder.

## Create and save a dashboard

**Create**: click **New dashboard** at the top right of the list (requires the Dashboard management permission). A new dashboard defaults to "Last 1 hour" and starts with one empty `Overview` tab.

**Save from the Query Workbench**: click **Save to dashboard** in the workbench, choose a new or an existing dashboard, and enter a chart title. Then pick a chart type; the workbench suggests one from the query result, and you can change it. When saving to an existing dashboard the panel is appended to the bottom of the first tab and takes effect only when you save.

> [!NOTE]
>
> Dashboards do not support Prometheus's Both query mode. A workbench query that runs as Both is saved to the panel as Range.

**Editing and saving**:

* Every change while editing is a draft you can undo / redo (`⌘Z` / `⌘⇧Z`). The draft lives only in the current browser page and is **lost on refresh**; you are warned before leaving the page.
* When saving you can add a **version message** (optional, up to 1024 characters). Every save creates a new version.
* If the relative time range you were previewing differs from the default, you can tick an option to make it the dashboard's default time range.
* If someone else saved while you were editing, the save fails and you can save a copy, discard your draft and load the latest version, or keep editing. Drafts are never merged automatically.

## Tabs, sections and panel layout

* **Tabs** are the top-level divisions of a dashboard. Double-click a title to rename it.
* **Sections** live inside a tab and can be collapsed. **Collapsed sections do not load data**, which makes them a good place for charts you rarely need.
* **Panels** sit on a 24-column grid and can be dragged, resized, duplicated and deleted.
* A panel description appears in the ⓘ tooltip next to the title by default, or as a subtitle below it; descriptions do not support images or HTML.
* Only panels in the current tab and in expanded sections load, with panels in view first.

For limits, see [Quotas and limits](#quotas-and-limits).

## Panel types and queries

The panel editor shows a preview on the left and configuration on the right. Available chart types:

| Chart type | Best for |
| - | - |
| **Time series** | Trends over time, with multiple series for comparison |
| **Table** | Rows and columns of detail, good for instant query results |
| **Stat** | One key number, with threshold colouring |
| **Text** | Markdown notes; needs no data source or query |

**Data source**: Prometheus, MySQL and Loki are supported. Pick a fixed data source or a **data source variable**, so switching the variable switches the whole dashboard.

**Query mode** decides how a query fetches data: **Range** evaluates the query point by point at the step to draw a trend, while **Instant** computes a single value for the whole time range — there `[$__auto]` spans the entire range. In most cases the data source and chart type choose it: tables use instant values, time series and stat use ranges, and MySQL queries a time window. Loki metric panels (stat and table) pick it themselves under **Query → Options → Query mode**, defaulting to Range for stat and Instant for table. Loki time series panels stay on Range, and Prometheus and MySQL offer no choice.

| Setting | Description |
| - | - |
| **Query expression** | Prometheus / Loki panels can reference template variables as `$name` or `${name}` and use [built-in time variables](#built-in-time-variables). MySQL panels do not support variables |
| **Multiple queries** | Only time series supports multiple queries (`A`–`Z`). When switching to another chart type you choose which one to keep |
| **Series name** | The display name of each series in a time series, for example, `{{instance}}` becomes the `instance` label value; empty shows all labels |
| **Min step** | The lower bound of the step for range queries, 15s by default. Offered for Prometheus panels and for Loki metric panels (stat and table); instant queries do not accept it, and neither do Loki logs panels |
| **Value fields** | The fields a stat panel shows; case-sensitive |
| **Unit / decimals / thresholds** | Thresholds can be "higher is worse" or "lower is worse", with warning / critical levels coloured as text or background |
| **Table columns** | Unit, thresholds and colouring for numeric columns; background colouring can apply to the whole row |
| **Value mappings** | Show values as text and colour (for example, 0 as "Offline" in red). The first matching mapping wins and overrides threshold colours |
| **Drill-down** | Panel links and data links — see [Click-to-filter and drill-down links](#click-to-filter-and-drill-down-links) |

After changing a query, press Enter (or `⌘/Ctrl + Enter`) to run the preview. Changing the data source, chart type or time reruns it automatically, and display settings (unit, thresholds, and so on) apply instantly. **Saving does not require a successful preview.**

### Panel-level query options

These options apply to **all queries** of the panel:

| Option | Description |
| - | - |
| **Max data points** | The maximum points per series, which sets the query step. Empty means it is calculated from the panel width |
| **Relative time** | Always query the most recent period instead of following the dashboard's time range, for example, `5m` |
| **Time shift** | Shift the query window back, for example, `1d` to compare with the same period yesterday |
| **Comparison** | Period-over-period — see [Period-over-period comparison](#period-over-period-comparison) |

Durations are "number + unit" (`s` / `m` / `h` / `d` / `w`), for example, `5m`, `1h`, `1d`. Panels with a relative time or time shift show the actual queried time next to the title, so viewers know they do not follow the global time.

### Built-in time variables

You can use these variables directly in a panel's query expression; they are calculated from that panel's time window and step:

| Variable | Meaning |
| - | - |
| `$__interval` | The query step, for example, `30s`, calculated from the time range and max data points and never below the min step |
| `$__rate_interval` | The larger of `step + 15s` and `60s`, ready to use in `rate()` |
| `$__range` | The length of the time window, for example, `86400s` for 24 hours |
| `$__auto` | In Loki instant queries, the whole window length (for example, `1h`, `5m`); in Loki range queries, the same as `$__interval` |

Where they are available:

| Data source · query mode | Variables |
| - | - |
| Prometheus · range | `$__interval`, `$__rate_interval`, `$__range` |
| Loki · range | `$__auto`, `$__interval`, `$__range` |
| Loki · instant | `$__auto`, `$__range` |

> [!NOTE]
>
> Built-in time variables work only in **panel query expressions** — not in template variable candidate queries — and do not accept format suffixes such as `:raw`. They are not available for MySQL panels. Using them anywhere else prevents the dashboard from being saved.

### Template checks as you type

While you write a query expression in the panel editor, it is checked for template syntax immediately, and any write that **will be rejected on save** is listed under the input, judged against the current data source and query mode:

| Message | What it means and what to do |
| - | - |
| "Variable instance is multi-select or allows All and expands to a regex; change `=` to `=~` or saving will be rejected" | A multi-select variable, one that allows "All", or one written explicitly as `${name:regex}` is expanded to a regex, so it cannot go inside an exact matcher. Click **Switch to regex match** to fix every flagged matcher in one pass: `=` → `=~`, `!=` → `!~` (a LogQL line filter is rewritten the same way) |
| "Variable pod is not defined; check the spelling" | The `$xxx` / `${xxx}` in the expression matches no template variable. Fix the spelling, or define it first in **Manage variables** on the variable bar (see [Template variables](#template-variables)); when text follows the variable name you must write `${name}_suffix`, or the whole thing is read as a longer variable name |
| "Built-in variable \_\_rate\_interval is not available for this datasource / query mode; saving will be rejected" | You used a `$__` time variable the data source and query mode do not support. Check the availability list under [Built-in time variables](#built-in-time-variables), and switch the variable or the query mode |

Variables accept a **format suffix**, written `${name:suffix}`. Panel query expressions (Prometheus / Loki) support two suffixes: `:regex` expands the variable as a regex whether or not it is multi-select, and `:raw` inserts it as is and requires the variable to hold a single value. Built-in time variables do not accept a suffix; data links accept the same syntax, see [Click-to-filter and drill-down links](#click-to-filter-and-drill-down-links).

## Template variables

The variable bar sits above the canvas; each variable is a filter. While editing, click **Manage variables** at the end of the bar to add, change or delete variables.

| Type | Values come from | Settings |
| - | - | - |
| **Datasource** | A specific data source | Data source type (Prometheus / MySQL / Loki), default data source |
| **Custom** | A hand-written list | One option per line, `text=value` or a bare value |
| **Query** | A data source query | Data source (fixed or a data source variable) + query + when to refresh options |

**Candidate queries for Query variables**:

* **Prometheus**: `label` (required) and `metric` (optional), plus `= / != / =~ / !~` label filters.
* **SQL data sources**: an expression and a value field.
* **Loki**: an expression and a field. The field must be a stream label name (dotted or JSON field names do not work); options are that label's values on the selected streams within the dashboard's time range. An empty expression means all streams.

Expressions may reference other dashboard variables but not built-in time variables. Click **Preview candidates** to check the query.

**Naming and references**:

* Names start with a letter or underscore, contain only letters, digits and underscores, are at most 64 characters, must not start with `__`, and must be unique.
* Renaming a variable updates every place that references it.
* A variable that is still referenced cannot be deleted; remove the references first.

**Single, multi and "All"**:

* A **single-select** variable always has one value; it defaults to the first option.
* A **multi-select** variable can be left empty, and **empty means "All"**. "All" means no filtering, not "every current option".
* Variables that allow "All" can be cleared; others must keep a value.
* When the page address has no value, the variable uses its default, or else the first option ("All" if allowed).
* A value passed in through a link applies even if it is not among the options; the control marks it as such.

Variable selections are written to the page address, so they travel with shared links.

## Time range and auto-refresh

* **Time range**: the dashboard's saved default is used. The defaults you can save are 15m / 30m / 1h / 3h / 6h / 12h / 24h / 7d.
* **Auto-refresh**: a dashboard can save off / 30s / 1m / 5m; while viewing you can pick more intervals (10s to 1h). Choosing one refreshes immediately.
* **Display time zone**: click **Change time zone** at the bottom of the time picker to choose a city time zone or one of the three shortcuts below. It only affects dashboards and is remembered in this browser. Relative ranges (such as "Last 1 hour") are durations and are not shifted by time zone.

| Shortcut | Meaning |
| - | - |
| **Default** | Your effective time zone from personal settings |
| **Browser time** | The browser's current time zone |
| **Coordinated Universal Time** | Always UTC |

## Period-over-period comparison

In a time series or stat panel, set **Query options → Comparison** to "1 day ago" or "1 week ago". The same query runs again for the previous period and both results appear in one chart:

* **Time series**: the comparison series is a dashed line in the same colour, with the period in the legend, for example, "series (1 day ago)".
* **Stat**: shows the percentage change against the comparison period, for example, "▲ 12.3% vs 1 day ago". No percentage is shown when the comparison value is 0 or missing.
* If the comparison query fails, only the comparison line is missing; the current results are unaffected.

## Cross-panel cursor linking

Moving the mouse over any time series shows a vertical line at the same moment on the dashboard's other time series, so you can line up several metrics. Panels with a relative time or time shift do not take part.

## Click-to-filter and drill-down links

**Click-to-filter**: click data in a chart, such as a point, a stat, or a table cell. If its label or column name matches a dashboard variable, choose "Filter by `k = v`" to set that variable and refresh the dashboard. Data source variables are not used for filtering.

**Data links**: with data links configured, clicking a data point opens an external address (`http(s)://`) or an in-product address (starting with `/`), optionally carrying the clicked value, labels and time:

* A time series can mark one link as **open on click** (at most one per panel). Stat and table panels open the link directly when there is one, and show a menu when there are several.
* Inserted values are URL-encoded automatically; use `${xxx:raw}` to insert a value into a path as is.
* Placeholders: `${__value.raw}` (value), `${__value.time}` (time, ms), `${__series.name}` (series name), `${__field.labels.<label>}` (label value), `${__from}` / `${__to}` (time range bounds, ms), `${__url_time_range}` (time range parameters), `${__all_variables}` (all variable parameters), and any dashboard variable name.

**Panel links**: shown next to the panel title and opened in a new tab by default; they accept the placeholders above except those tied to a data point.

## Sharing

A dashboard keeps its time range, variable selections, fullscreen panel and auto-refresh in the page address, so copying the address shares your current view. In a fullscreen panel, **Copy panel link** opens straight to that panel in fullscreen.

> [!NOTE]
>
> Dashboards **cannot** be shared publicly or anonymously. Anyone opening a link must sign in and have access to the dashboard's folder and the panels' data sources.

## Fullscreen and query details

Hover over a panel title to **Edit** (requires management permission), go **Fullscreen**, or **Refresh**.

* **Refresh**: this icon appears in the hover actions once the panel's query has finished; click it to re-run that panel's query immediately.

* In fullscreen you can change that panel's time range without affecting the others.

* In fullscreen you can **Copy panel link** or **Download data CSV**.

* **Query details** lists each query's expression and status; **Open in query workbench** takes the current variables and time to the [Query workbench](https://docs.flashduty.com/en/monitors/explore/explore.md) for debugging.

* Shortcuts: press `v` on a panel to toggle fullscreen and `e` to edit.

## Version history and restore

Click **⋮ → Version history** at the top right of the dashboard:

* **Compare**: tick two versions and click **Compare** to see the JSON diff of their definitions.
* **Restore**: on the compare page, click **Restore vN**. Restoring **creates a new version** from the old content; the current version stays in history.
* Each dashboard keeps its latest **20** versions.

## Delete and trash

Deleted dashboards go to the trash and are permanently deleted, with their version history, after **30 days**.

The console has no trash page yet. To restore a dashboard, use the Open API to list the trash (`/monit/dashboard/trash/list`) and restore (`/monit/dashboard/restore`); if the original folder no longer exists, specify a target folder.

## Permissions

| Action | Required |
| - | - |
| View dashboards | The Data source view permission, and read access to the folder |
| Create, edit, move, delete, clone, restore versions | The Dashboard management permission, and read access to the folder (and any target folder) |
| See data in a panel | Query permission on the panel's data sources |

* Folder read access is determined by the teams bound to the folder; the owner account and Admins can read every folder. See [Folder management](https://docs.flashduty.com/en/monitors/folders/folders.md).
* A panel whose data source you cannot query (or that is disabled or missing) shows a "no data source permission" message. See [Data sources](https://docs.flashduty.com/en/monitors/data-sources/data-sources.md) for data source authorization.

## Export JSON

Click **⋮ → Export JSON** to download the current version's full definition for backups or version control. Importing is not available in the console yet.

## Panel states and common issues

| What the panel shows | Cause and fix |
| - | - |
| No data | The query succeeded but returned nothing for this time range |
| **Partially failed** | Some queries failed; hover to see why. Successful parts still render |
| Result does not match the chart | The result shape does not suit the chart type (for example, a table received time series data); change the chart type or the query |
| Unresolved variable | A variable the panel needs has no value yet; make a selection in the variable bar |
| No data source permission | See [Permissions](#permissions) |
| Query timeout / result too large | Narrow the time range or simplify the query |
| Query failed | Read the error and click **Retry** to rerun the panel |

If someone saves the dashboard while you are viewing it, the page loads the latest version automatically.

## Quotas and limits

| Limit | Maximum |
| - | - |
| Tabs per dashboard | 10 |
| Sections per tab | 10 |
| Panels per tab | 30 |
| Panels per dashboard | 100 |
| Variables per dashboard | 20 |
| Data links per table (including link columns) | 5 |
| Versions kept | 20 |
| Trash retention | 30 days |
| Dashboard definition size | 1 MiB |
| Search-all-dashboards keyword length | 128 characters |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.