Grafana

Dashboards, alerts and PromQL from the panel

palupdated 2026-09-29DeveloperIn pal's registry󱔓Menu bar: Alerts󰌹2 deep links󰀐Several accounts

Open in pal

In pal's registry: the button shows it in pal, which asks before installing; the command does the same from a terminal. This page can't see what your pal has installed.

Grafana: Every dashboard, starred first, its folder and tags on the right; the pane draws its first panels from their own queries
Every dashboard, starred first, its folder and tags on the right; the pane draws its first panels from their own queries
Grafana: What is firing and pending, by rule, with the summary and since when; the pane has the labels and the dashboard
What is firing and pending, by rule, with the summary and since when; the pane has the labels and the dashboard
Grafana: Silence an instance for an hour, four or a day from the list, or jump to its dashboard
Silence an instance for an hour, four or a day from the list, or jump to its dashboard
Grafana: A PromQL prompt: one row per series with its value; Enter copies it, ⌘O opens Explore
A PromQL prompt: one row per series with its value; Enter copies it, ⌘O opens Explore
Grafana: ⌘Enter asks for the range to open a dashboard over, and whether in kiosk mode for a wall
⌘Enter asks for the range to open a dashboard over, and whether in kiosk mode for a wall
1 of 5

What it does

Your Grafana dashboards, alerts and Prometheus queries from the panel, with a bar item that counts what is firing. Silence an alert for an hour or a day without opening the browser.

  • Every dashboard by name, starred first, with its folder and tags; open it, pick a time range or go kiosk
  • A preview of the dashboard's first graphs in the side pane
  • Alerts firing and pending with summary, severity and labels; cmd+s silences one for an hour, cmd+d for a day
  • A PromQL prompt: one row per series with its value, saved queries before you type, cmd+o opens Explore
  • A bar item counting firing (red) and pending (amber) alerts, hidden while all is quiet
  • Several Grafanas as separate instances; deep links open a query or a dashboard from a script

Palettes 3

  • Grafana Dashboardsgrafanalistrefreshes every 15 min

    Every dashboard, starred first, with its folder and tags; Enter opens it in the browser with the time range you set, cmd+enter asks for one. Folders as a filter that lists them, each a drill-in.

    • ↵Open the dashboard in the browser (with the `time_range` setting appended)
    • ⌘↵Open with a time range: from, to and kiosk asked in a form
    • ⌘CCopy the URL
    • ⌘SStar or unstar (the token's own stars, which sort first here)
    • ⌘FOpen in kiosk mode (no chrome, for a wall)
    • ⌘UCopy the uid
    • →The dashboard's folder as a level
    • ⇥All, Starred, Folders
  • Grafana Alertsalertsliverefreshes every 30s

    Every alert instance firing or pending, by rule, with its summary, severity, labels and since when; silences as a filter, with the active silences to expire.

    • ↵Open the rule in Grafana
    • ⌘↵Open the rule's dashboard
    • ⌘SSilence this instance for 1 hour (asks first)
    • ⌘⇧SSilence for 4 hours (asks first)
    • ⌘DSilence for 1 day (asks first)
    • ⌘EExpire the silence on a silenced instance, or a silence row (asks first)
    • ⌘CCopy the summary
    • ⌘LCopy the labels
    • ⇥All, Firing, Pending, Silenced
  • Grafana Queryqueryinput

    A PromQL instant query against the Prometheus datasource, one row per series with its value; the saved queries before you type. Enter copies the value, cmd+o opens Explore.

    • ↵Copy the value (on a saved query: run it)
    • ⌘↵Copy the series with its value
    • ⌘OOpen the expression in Explore
    • ⌘CCopy the expression
    • ⌘⇧ACopy every series with its value
    • ⌘SSave the expression under a name (the `queries` setting)
    • ⌘⌫Remove a saved query

Actions

  • OpenThe dashboard in the browser, with the time_range setting appended when set.↵
  • Open with a time rangeFrom, to and kiosk asked in a form.⌘↵
  • Star / Unstar⌘S
  • Open in kiosk mode⌘F
  • Copy URL⌘C
  • Open ruleOn an alert: the rule's page in Grafana.↵
  • Silence for 1 hour / 4 hours / 1 dayOn an alert instance; asks first. Needs the Editor role.⌘S
  • Expire silenceOn a silenced instance or a silence row; asks first.⌘E
  • Copy valueOn a query result.↵
  • Open in ExploreOn a query result or a saved query.⌘O

Settings

Extension, [extensions.grafana]

url
empty text

Where Grafana answers, scheme included; no trailing slash needed.

token
empty secret

A service account token (Administration › Service accounts): Viewer reads everything here, Editor is needed to silence alerts. Stored as a keychain: or env: reference.

time_range
empty text

Appended to a dashboard's URL as from=…&to=now when set (now-6h, now-24h, now-7d); leave empty to open the dashboard's own range.

datasource
empty text

The datasource the Query palette runs against, by uid or name; leave empty for Grafana's default.

queries
Targets down = up == 0Firing alerts = ALERTS{alertstate="firing"}CPU busy % = 100 - avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100Memory used % = 100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)Root disk used % = 100 * (1 - node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"}) list

PromQL listed before you type in the Query palette, one `Name = expr` per line (cmd+s on a result saves the one you ran).

sparklines
3 number

How many of a dashboard's time series panels the detail pane draws: as panel images when the image renderer plugin is installed, else as sparklines from the panels' queries. 0 turns it off.

timeout
8s number

How long one request may take before the row says Grafana did not answer.

Defaults shown. Change them in pal's settings window or in the config file.

The README

Everything Grafana does, key by key, from the extension's own README.md

Grafana

Grafana over its HTTP API with a service account token: the dashboards, the alerts firing and pending with their silences, a PromQL prompt against Prometheus, and a bar item counting what is firing. multi, so a second Grafana is [instances."grafana@work"] with its own url and token.

Palettes

Grafana Dashboards (grafana) is every dashboard the token can see (/api/search?type=dash-db), starred first, then as Grafana sorts them. A row is the title; the subtitle is the description, or the folder when there is none; the folder is a blue tag and the first two tags follow it; the uid, the tags and the folder are keywords. enter opens it in the browser with the time_range setting appended (from=now-6h&to=now) when set, cmd+enter asks for a range in a form (from, to, kiosk), cmd+f opens it in kiosk mode, cmd+s stars or unstars it (the token's own stars, /api/user/stars: a service account has its own list, which is what sorts first here), cmd+c copies the URL, cmd+u the uid, and → drills into the dashboard's folder. Marked dashboards (cmd-click, shift-click) open, copy, star and unstar together; so do marked alerts (open, silence, expire, copy) and saved queries. The filter (tab) is All, Starred, Folders; Folders lists every folder with a dashboard in it and enter drills in. Listed every 15 minutes, cmd+r sooner.

The detail pane (lazy) shows the description, the folder, the tags, the time range and refresh, the panels by type, and the first three time series panels (sparklines setting) drawn: as panel images when the image renderer plugin is installed (/render/d-solo/<uid>?panelId=…, probed once per run through /api/plugins/grafana-image-renderer/settings, in the panel's theme), else as sparklines drawn by the extension from the panels' own queries, one /api/ds/query call for the whole pane over the dashboard's time range (a panel whose expression uses a template variable is skipped; Grafana's $__ macros are fine). The caption is the first series' last value in the panel's unit.

Grafana Alerts (grafana-alerts) is live: every alert instance firing or pending, from the ruler's Prometheus-compatible API (/api/prometheus/grafana/api/v1/rules?state=firing&state=pending, the one that carries the rule uid), with the Alertmanager's view of what a silence covers (/api/alertmanager/grafana/api/v2/alerts) and the active silences (/api/v2/silences). Firing first, then by rule and labels. A row is the rule's name; the subtitle the rendered summary (else the instance's labels); a red firing or amber pending tag, the severity, a silenced tag, and since when. The detail pane has the summary and description, the rule (a link), the state and severity, the labels, the value, the rule's health when it is not ok, the silence and the dashboard the rule points at (view_url, or __dashboardUid__ with its panel). The filter is Firing and pending, Firing, Pending, Silenced; Silenced lists the covered instances and then the active silences themselves, each with Expire.

enter opens the rule in Grafana, cmd+enter its dashboard, cmd+s / cmd+shift+s / cmd+d silence the instance for 1 hour / 4 hours / 1 day (asking first; the matchers are the rule's uid plus the instance's own labels, createdBy: pal), cmd+e expires the silence, cmd+c copies the summary, cmd+l the labels. A silence needs the Editor role: a Viewer token gets a failure toast naming it. Listed on show, not twice within 30 s.

Grafana Query (grafana-query) is an input palette: what you type runs as a PromQL instant query (/api/ds/query) against the Prometheus datasource (datasource setting by uid or name, else Grafana's default), one row per series with Grafana's display name, the value on the right and the labels in the pane; a parse error is a calm hint with Prometheus's message. Before you type, the saved queries (queries setting, Name = expr lines): enter runs one (the prompt with the expression typed), cmd+backspace removes it. On a result enter copies the value, cmd+enter the series with its value, cmd+shift+a every series, cmd+c the expression, cmd+o opens Explore with it, cmd+s saves it under a name (written to the setting). The same expression is not asked again within 15 s, and a query still running when the next keystroke comes is abandoned.

Bar item

grafana/alerts: the Grafana glyph with the firing count in red and the pending count in amber as segments, hidden by its rules while both are zero (a firing instance under a silence does not count). It publishes grafana/firing and grafana/pending for anyone's expressions. Refreshed every minute, on show, wake and the network coming back; the listing is shared with the palette for 20 s. The popover lists the instances by state with a colour rail (grey once silenced), the summary, the severity and the age: enter opens the rule, o the dashboard, s / f / d silence for 1 hour / 4 hours / 1 day (asking first), s on a silenced one expires the silence, c copies the summary, a opens the alert list, p the palette, r refreshes, arrows and j/k move, a click focuses a row.

pal://grafana/query?expr=up%20%3D%3D%200 opens the prompt with the expression typed; pal://grafana/open?uid=cagdas-home&from=now-24h&kiosk=1 opens a dashboard (the time_range setting when from is absent).

Setup

In Grafana, Administration › Service accounts: add one with the Viewer role (Editor if you want to silence from pal or star dashboards), add a token. In pal, Settings › Extensions › Grafana: the URL with its scheme and the token, which the config file keeps as a keychain: or env: reference, never the value.

Settings, [extensions.grafana]:

key type default what
url text unset Where Grafana answers, scheme included.
token secret unset A service account token. A keychain: or env: reference in the file.
time_range text unset Appended to a dashboard's URL as from=…&to=now when set (now-6h); empty opens the dashboard's own range.
datasource text unset The Prometheus datasource the prompt runs against, by uid or name; empty is Grafana's default.
queries list five Name = expr lines The saved queries listed before you type.
sparklines number 3 How many time series panels the pane draws; 0 turns it off.
timeout number (s) 8 How long one request may take.

When something is wrong every palette is one inert hint row that says what and where to fix it: no URL (its enter opens Settings on the field), a URL without a scheme, no token, a keychain:/env: token that did not resolve, a rejected token (401), a host that did not answer within the timeout, or one that could not be reached. A URL that redirects (an http:// one behind a proxy answering 301 to https://) is followed with the token kept, and the log says which URL to set. The bar item hides on no setup (the strip has no room for a hint) and goes stale on anything else.

The endpoints, all under the URL you set: /api/search, /api/dashboards/uid/<uid>, /api/user/stars/dashboard/uid/<uid>, /api/prometheus/grafana/api/v1/rules, /api/alertmanager/grafana/api/v2/alerts, /api/alertmanager/grafana/api/v2/silences (and /silence/<id>), /api/datasources, /api/ds/query, /api/plugins/grafana-image-renderer/settings, /render/d-solo/<uid>. Needs the network: every request goes there, nothing else.

What it does not do

  • No Loki: the prompt is PromQL against a Prometheus datasource.
  • No editing of dashboards or rules; enter opens the right page.
  • Stars are the service account's, not your browser user's: Grafana keeps them per user and a token belongs to its account.
  • Pending instances are not in the Alertmanager yet, so a silence that would cover one shows only once it fires.

Platforms

macOS and Linux, the same on both: everything is HTTP.