Grafana Dashboards
Section titled “Grafana Dashboards”OSOS ships a Grafana data source plugin — Apptomator — that lets you build Grafana dashboards on top of OSOS data. Its defining property is that an administrator builds a dashboard once, and every viewer who opens it sees only the rows their own OSOS access allows.
That is not a filter you configure. The plugin holds no credentials of its own: every request travels through Grafana’s data source proxy with the signed-in viewer’s OAuth token attached, so the gateway and permissions evaluate the request exactly as they would for that person in the OSOS web portal. Two people opening the same panel get different rows, and neither of them can widen what they see.
This page is for the person building panels. Installing the plugin, wiring Grafana’s OAuth against the OSOS identity service, and publishing the plugin archive are covered in Grafana Datasource Plugin in Setup & Maintenance.
What you can and cannot build
Section titled “What you can and cannot build”The plugin executes saved OSOS queries — it is not an ad-hoc query builder. Everything a panel can read has already been modelled in OSOS:
| You have | A panel can |
|---|---|
| A data view | Read its entries as rows |
| A saved data query | Apply it as a quick filter on those rows |
| A saved statistic query | Return the aggregate it computes, chart-shaped |
Two consequences follow, and they shape how you design for Grafana:
- A view is required for every panel. Entries are only ever read through a view, because a view’s execution plan is what the gateway authorizes. There is no entity-level shortcut — if the data should be on a dashboard, it needs a view.
- Anything you want aggregated should be a statistic query. Aggregation in OSOS is far cheaper than pulling rows into Grafana and grouping them there, and the result arrives ready to chart.
Setting up the data source
Section titled “Setting up the data source”Done once per Grafana instance, under Connections → Data sources → Add new data source → Apptomator.
| Setting | Value |
|---|---|
| URL | The OSOS gateway base URL — the customer’s real domain, e.g. https://osos.example.com |
| Forward OAuth Identity | ON. Not optional |
| Save & test | Confirms the URL, the token forwarding and the gateway in one call |
Two of these deserve emphasis:
- The URL must be a host that resolves to the customer’s domain. The gateway resolves both the domain and the space from the
Hostheader, and a request whose host does not resolve is rejected withMISSING_DOMAIN_ID. An internal cluster address will not work. - Forward OAuth Identity is what makes the model work. With it off, the proxy forwards no viewer token and the per-viewer permission model silently stops applying — panels do not fail, they just stop being personal.
Access mode is pinned to proxy by the plugin and is not offered as a choice. Direct (browser) access bypasses the proxy entirely, so Grafana would never attach the viewer’s token.
Building a panel
Section titled “Building a panel”The query editor is a cascade that mirrors the OSOS access model — module, then view, then query. Since 1.8 the cascade starts at Module: the previous Entity picker is gone, and a panel saved before this change self-heals its module the first time you open its editor.
| Field | Meaning |
|---|---|
| Type | Rows (Data Query) for row-level data, Statistic Query for an aggregate |
| Module | The module holding the view to read from — the cascade’s starting point |
| View | Required. The view whose execution plan the gateway authorizes, and which determines the entity — the entity is never picked directly; it travels with the view and is what gets saved on the query |
| Saved query | Optional for rows (a quick filter on top of the view); required for statistic panels |
| (parameters) | One input per parameter the selected saved query declares. Values are free text, so dashboard variables such as $department work |
| Time field | Rows only. A Date/DateTime field to expose as the frame’s time column — and to filter the panel by the dashboard time range |
| Limit | Rows only. Defaults to 1000; the server clamps it to its own ceiling regardless |
| Fields | Rows only. Comma-separated column names to keep; empty means all |
| Metadata | Rows only, off by default. Shows the _meta* bookkeeping columns |
Since 1.8, this also changed who can build a panel: discovery now goes through the same end-user endpoint an OSOS dashboard itself uses, so an ordinary OSOS user’s own view access is enough to author a working panel. Before, the underlying discovery calls required an OSOS admin-scoped token, so only an admin’s credentials could build one. Grafana’s own authoring permission — who may open the query editor at all — is unchanged and remains the separate, pre-existing gate; see analytics.oauth.authoringGroup in Grafana Datasource Plugin.
Text inputs commit when you leave the field or press Enter, not on every keystroke.
Parameters and dashboard variables Since 1.8
Section titled “Parameters and dashboard variables Since 1.8”A saved query’s parameters appear as inputs, and each accepts a Grafana dashboard variable. $department in a parameter box makes the panel follow the dashboard’s variable picker.
One rule matters when a parameter is bound to a Number or Boolean field: a blank value is sent as “unset”, never as 0 or false. That is deliberate — a blank Number silently becoming 0 would filter the data to nothing and look like an empty result rather than a mistake. Leave a parameter blank to mean “don’t filter on this”.
Time fields and the dashboard time picker Since 1.8
Section titled “Time fields and the dashboard time picker Since 1.8”Without a Time field, the dashboard’s time picker has no effect on the panel. Setting one does three things at once: it becomes the frame’s time column, the rows are sorted by it, and the panel is narrowed to the picker’s range server-side.
The dropdown offers:
- the entity’s own
Date/DateTimefields; Date/DateTimefields inside blocks, shown asBasic info / Birthdate;- the two system audit dates, Created at and Last updated.
_metaData.createdAt and _metaData.updatedAt are deliberately not offered. They carry the same instants, but they are computed when an entry is read rather than stored, so no filter could ever match them — offering them would give you a time column the picker silently ignores. Created at and Last updated come from stored fields and do work with the picker.
Range bounds are formatted to match how the field stores its values — a Date field holds "2026-05-19", a DateTime field a full ISO instant — and date-only bounds use the dashboard’s timezone, so the days match what the picker shows.
How OSOS values are displayed
Section titled “How OSOS values are displayed”Most OSOS field values are objects, so each is flattened into a display cell:
| Value | Shown as |
|---|---|
| Reference | its resolved main title, e.g. Super Admin |
| Category | its resolved label, e.g. Approved |
| File | [file] avatar.jpg — a placeholder; attachments are not rendered |
| Localized value | the viewer’s Grafana language, falling back to English |
| Multi-value field | its parts joined |
Block (address: {city, country}) | one column per sub-field: address.city, address.country |
Blocks expand into columns exactly as they do in the OSOS table view. The block name is kept as a prefix because Grafana column names must be unique, so two blocks that both have a city stay distinct. A block that cannot become columns — one nested inside a repeated field — falls back to city: Damascus, country: Syria in a single cell.
Numeric OSOS fields stay numeric, so they remain summable. Every object-valued field becomes text, and text can only be counted or grouped — not summed.
The _meta* columns — _metaData, _metaOrder, _metaCurrentSteps, _metaWorkflowHistory, _metaAdhocSteps — sit on every entry and explode into many columns, so they are hidden unless you turn Metadata on. Naming one in Fields shows it regardless.
Audit columns Since 1.8
Section titled “Audit columns Since 1.8”Every row frame now carries four audit-stamp columns, appended after the entry’s own fields so they never bump a Time field you chose out of the frame’s leading position:
| Column | Shows | Type |
|---|---|---|
creationInfo.doneAt | when the entry was created | time, always |
creationInfo.doneBy | who created it — resolved display name, or the raw actor id if it can’t be resolved | text |
updateInfo.doneAt | when the entry was last updated | time, always |
updateInfo.doneBy | who last updated it — resolved display name, or the raw actor id if it can’t be resolved | text |
They are unconditional — no setting turns them on — so a breakdown of entries by creation day, or a count grouped by author, needs only a Group by transformation, with no Time field chosen first. Name one or more of them in Fields to keep only those columns on a panel that doesn’t want all four. Both …doneAt columns are typed as time whether or not either is the panel’s chosen Time field, so bucketing one by day is a Format time transformation away.
A reference that no longer resolves — a deleted doneBy actor, for instance — now falls back to its raw id, the same as any other unresolved reference, rather than a fixed rendering bug that used to show the literal string "{}" in the cell.
Charting
Section titled “Charting”Panels are not limited to tables — pick any visualization. What a chart needs is a numeric column and something to plot it against, so which query type you choose matters more than which visualization you pick.
Aggregates — use a Statistic Query. The shortest path to a bar, pie or stat panel, because the aggregation happens in OSOS. The frame comes back chart-shaped already: a category column (the group-by), one column per sub-grouping, and a numeric value. Point a Bar chart or Pie chart at it and it renders with no transformations at all.
Counts and sums over rows — use a Rows query plus a transformation. Rows come back un-aggregated, so add Transform → Group by: group by the column you want on the x-axis, and set another field to Calculate → Count (or Sum/Mean). Then switch the visualization to Bar chart.
Trends over time — use a Rows query with a Time field. The column becomes a real Grafana time column, rows are sorted by it and narrowed to the picker’s range, so a Time series panel draws in order and follows the picker. Pair it with a numeric column, or with Group by on a time interval to count entries per day.
Two things worth knowing:
- Multi-series charts from a sub-grouped statistic query arrive in long format (
category,department,value). Grafana’s bar chart wants one column per series, so add Transform → Partition by values on the sub-group column, or Rows to fields. - Combining two queries in one chart is done with Transform → Join by field — the plugin does not join server-side. Add both queries as separate targets on the panel.
Embedding a dashboard in OSOS
Section titled “Embedding a dashboard in OSOS”A Grafana dashboard can be shown inside OSOS using a page of type Embedded, which renders a plain iframe — nothing special is needed on the OSOS side.
| Goal | URL |
|---|---|
| Whole dashboard, no Grafana chrome | <grafana>/d/<uid>/<slug>?kiosk |
| A single panel | <grafana>/d-solo/<uid>/<slug>?panelId=<n> |
Whether the embed actually renders depends on two server-side conditions — Grafana permitting framing at all, and the two sites being same-site so Grafana’s session cookie is sent. Both are deployment settings; see Grafana Datasource Plugin.
Limits to design around
Section titled “Limits to design around”These are properties of the model, not bugs — plan for them rather than around them.
- Saved queries only. No ad-hoc query builder. If a dashboard needs a new cut of the data, model it as a view or a saved query first.
- No alerting and no scheduled reports. Grafana alert rules and reports run without a viewer session, so there is no identity to forward and no way to honour per-viewer permissions. Anything alert-shaped belongs in OSOS‘s own notifications and SLA/time-monitoring machinery.
- Row cap
Since 1.8. The server clamps every request to its own ceiling (10 000 by default), so a panel can never stream a whole collection. Aggregate instead. Fieldstrims columns after the rows arrive, it does not reduce what is transferred. The view decides which fields come back, so trim there if volume matters.- Statistic panels take no runtime parameters. The statistic execute route accepts only the query’s own filter field. If a statistic must vary by input, make the variation part of the query design.
- Attachments are not rendered — files show as
[file] <name>. - The sharing paths that render without a session — snapshots, public dashboards — must stay disabled. They would serve one user’s data to whoever opens the link. See the setup page.
Related
Section titled “Related”- Data Views & Faces — the unit every panel executes against
- Queries — saved data and statistic queries
- Dashboards, Summaries & Counter Widgets — OSOS‘s own in-product dashboards
- Reports — scheduled, document-shaped output
- Webhooks & Integrations — the other outbound integration surfaces
- Grafana Datasource Plugin — installing and operating it
Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27