Appearance
Dashboards
A dashboard is a grid of widgets over one time window. Open them under Telemetry → Dashboards. Every Events Stream also gets a built-in Web Analytics dashboard.
To add a widget, build a search in Explore or a metric query and click Add to Dashboard, or click Edit → Add Widget on the dashboard itself. Each widget reads one of three things:
- Logs, spans and events: a count or aggregation of a field over a search.
- Metrics: one or more metric queries, combined with formulas.
- Monitors: whether each monitor was up, degraded or down over the window.
Not sure where to start? Import → Example: Kitchen Sink loads a dashboard that uses every panel, a variable of each kind and the annotations.
Panels
| Panel | Shows |
|---|---|
| Time series | Lines over time, one per query and group. |
| Stat | One big number per series, with a sparkline behind it. |
| Gauge | Each series' value on a dial from min to max, its thresholds around the rim. |
| Bar gauge | A bar per series, handy for ranking routes or paths. |
| Table | A row per series (grouped fields get their own columns) and a column per value: last, mean, max, min, total, count, first. Click a header to sort. |
| State timeline | A row per monitor (or series), colored by state over time. |
| Status history | The same rows cut into equal cells, each showing the worst state in it. |
| Heatmap | How a histogram metric's values spread over time. |
State timeline and status history read monitors directly: pick monitors (none means every monitor in the namespace), and turn on a row per group for grouped monitors. Given a metric or search instead, they color each value by its thresholds and value mappings, so a queue depth can read Idle, Busy or Backed up.
Display options
| Option | What it does |
|---|---|
| Unit | How values are written: ms, s, By (bytes), percent, percentunit (0 to 1 as a percentage), req/s, or any label. |
| Decimals | Fixed decimal places, instead of automatic. |
| Value | Which value a stat, gauge or bar gauge shows: last, mean, max, min, total, count or first. |
| Min / Max | A gauge's range. Without them: 0 to 100 for percentages, else from the data. |
| Thresholds | Colors from a value up: a base color, then yellow from 70, red from 90, say. |
| Value mappings | A value or range shown as text, with an optional color: 0 to 40 shows as Idle. A mapping wins over thresholds. |
| Color | For stats and tables: color the value, its background, or neither. |
| Time Range | The dashboard's window, or this widget's own (the last 24 hours, say). |
Time and Live
Pick a window from 15 minutes to 30 days, or Custom for fixed dates. Live refreshes the dashboard every 10 seconds (Web Analytics every 30), only redrawing what changed. It pauses while the window is in the background and catches up when you're back. A custom window doesn't move, so it gets a Refresh button instead.
The link keeps the dashboard, its window and your variable picks, so a copied URL opens exactly what you see.
Variables
Variables add pickers above the widgets. Use one in any filter as field:$name:
| Kind | Values from |
|---|---|
| Values from data | A field of logs, spans and events (the most frequent in the window first), or a metric's tag. |
| Custom list | Values you type, such as prod, staging. |
| Text box | Whatever is typed. |
One pick matches exactly; several match any of them (service:$service with api and web means (service:api OR service:web)); All, or no pick, drops the filter. A negated filter (-service:$service) excludes every pick. $name outside a filter becomes the picked value. Set variables up under Edit → Variables.
Annotations
Incidents in the namespace shade the time series they overlap, with a marker where each starts; hover a chart for their names. Under Edit you can also mark monitors, so the times they weren't up shade the charts too. The Annotations button hides them. Explore's chart and histogram show incidents as well.
Formulas
A formula combines a widget's metric queries by name (a, b, ...), group by group:
| Kind | Examples |
|---|---|
| Arithmetic | a / b * 100, a % 60, a ^ 2 |
| Comparison | a > 100 keeps only the values above 100. a > bool 100 gives 1 or 0 instead. ==, !=, <, <=, >= too. |
| Series | a and b keeps a where b has a value; a or b fills gaps in a from b; a unless b keeps a where b has none. |
| Math | abs, ceil, floor, round(x, 0.1), sqrt, exp, ln, log2, log10, sgn |
| Limits | clamp(x, 0, 100), clamp_min(x, 0), clamp_max(x, 100) |
| Across groups | sum(a), avg(a), min(a), max(a), count(a) collapse every group into one line |
A query without groups applies to every group of the other side, so a / b works when only a is grouped. Division by zero leaves a gap rather than an infinite value. The formula box suggests functions and query names as you type.
Import and export
Export saves a dashboard as a file, with its widgets, display options, variables and settings. Import takes that file back (matching Streams by name and type) or a Grafana dashboard's JSON:
- Stat, gauge, bar gauge, table, state timeline, status history, time series and heatmap panels convert to the same panels. Bar and pie charts become bar gauges; text and row panels are skipped.
- Prometheus queries become metric queries matched to your metric names, including arithmetic, comparisons,
and/or/unlessand the functions above. - Template variables become variables, and filters on them (
env=~"$env") keep working. - Units, decimals, min and max, thresholds, value mappings and the stat value carry over.
Anything that didn't convert is listed after the import.