Skip to main content

Integration guideSeal API and Scripts

Grafana

Show selected quality and operational measures from Seal in Grafana.

Illustration of a seal beside a laptop showing a data table and an evidence binder linked by a red thread.

Seal to GrafanaSeal API and Scripts

Seal sends
Selected Seal records
Source of truth
Seal
Set up
Scoped with your team
Neil › Operational report
draft

Bring our quality data into an operational report.

Neil

  • Once the connection is configured, I’ll use the records it provides and cite each one. Anything it doesn’t supply stays listed as missing.
Reads
Selected Seal records
Returns
  • Defined measures and the records behind them
  • Missing or unmatched information
  • Next steps for your team to review
Illustrative work with Grafana: a request to Neil, the source it reads and the draft it returns for your review.

1What’s connected.

Send selected quality and operational measures from Seal to Grafana through a connection set up with Seal’s API, and show them beside operational data. Agree the measures, refresh frequency and access before building dashboards.

Connection setup and permissions

Use Seal’s APIs or scripting engine for a connection tailored to your process. Agree the data mapping, access and direction of transfer before implementation.

2Let Grafana query the agreed Seal measures.

Route

Grafana’s Infinity data source pulls data from existing REST APIs and can read JSON, CSV, TSV, XML and GraphQL.⁠¹ Alerting, recorded queries and query caching with Infinity need a backend parser, JSONata or JQ.⁠¹ The PostgreSQL data source is built into Grafana OSS and Enterprise, for measures your team already copies into a database.⁠²

Refresh

Dashboards do not refresh automatically by default, and a manual refresh runs every query on the dashboard at once.⁠³ The server’s min_refresh_interval sets the shortest refresh allowed, five seconds by default.⁠⁴ Query caching, in Grafana Enterprise and Grafana Cloud, returns the cached result for a repeated query until the cache expires.⁠⁵

When it fails

A panel shows an error icon
Panels whose queries return errors show an error icon, and the panel inspector shows the query and its response.⁠⁶ Read the response from Seal in the inspector before changing the panel.
A DatasourceError alert fires
An alert rule enters the Error state when its query fails, and by default Grafana then fires a DatasourceError alert.⁠⁷ Treat the alert as a broken connection to Seal, not as a change in quality.
A corrected record still shows the old figure
A cached query result is served until the cache expires.⁠⁵ Keep the cache time shorter than the delay reviewers accept, or turn caching off for panels used in a review.

Check one record

Choose one panel, such as open deviations by site, and run the same filter in Seal. After a manual refresh the counts should match. Then change one record in Seal and confirm the panel moves on its next refresh.

3Start with the job.

Tell us what Neil needs to do and which records it needs. We’ll confirm the interface, permissions and implementation scope with your team.

Discuss this connection →

4Before it goes live.

Access and any write-back

Define which records are in scope and whose permissions apply. Whether the connection writes back at all is a separate decision, with its own mapping and approval.

Verification and release

Review the configured connection for its intended use. Keep the requirements, checks and evidence with the change, and approve the release through your team’s controls.

Read the assurance detail →

References

  1. 1Grafana: Infinity data source.
  2. 2Grafana: PostgreSQL data source.
  3. 3Grafana: use dashboards.
  4. 4Grafana: configuration.
  5. 5Grafana: data source management.
  6. 6Grafana: panel inspector.
  7. 7Grafana: no data and error states.