Grafana, without waiting for a plugin
Tag Historian charts in Grafana today, on Grafana Cloud's free tier included, through the Infinity data source — built and signed by Grafana Labs, already in the plugin catalogue, and very good at reading JSON over HTTP. Which is what our API is.
Half an hour the first time, almost all of it spent once on the data source. After that a new panel is a URL and two column names.
Last updated
1. Get an API key
Create an account and an API key first. The free plan is €0 and takes an email address — no card — and gives you 5 tags and 50,000 readings a day. Then create the key on the Settings page in Tag Historian Explorer — and the scope you give it is not a detail.
The key is shown once. Copy it straight into the Grafana data source form — if you lose it, generate a new one rather than hunting for the old one.
2. Install Infinity
On Grafana Cloud: Connections → Add new connection → Infinity → Install. On a self-hosted Grafana:
grafana-cli plugins install yesoreyeram-infinity-datasource3. The data source
Connections → Data sources → Add new data source → Infinity. Six fields matter.
| Field | Value |
|---|---|
| Base URL | https://api.taghistorian.com |
| Allowed hosts | https://api.taghistorian.com |
| Auth type | API key |
| Key | Authorization |
| Value | Token <your-api-key> |
| Add to | Header |
Token, notBearer. The wordToken, one space, then the key. That is the header InfluxDB v2 clients send and the one this API understands. Grafana's own "Bearer token" field sends a different word and will not authenticate.- Allowed hosts is not optional once a credential is configured — Infinity refuses to send the key to a host that is not on that list, and the error it gives is not a helpful one.
4. A panel
Set Type JSON, Parser Backend, Source URL, Format Time series. Then the URL, with the root selector measurements and two columns — timestamp as a Timestamp and value as a Number.
/api/measurements/$customerId/$tag?from=${__timeFrom:date}&to=${__timeTo:date}&maxPoints=800&decimation=lttb- Use
${__timeFrom:date}, not${__from}. The plain macro renders epoch milliseconds, and it interpolates in the browser — so a request made by the Grafana server for an alert or a shared dashboard never gets it substituted at all. decimation=lttbis not decoration. It thins the series to the point budget by selecting stored points — it never invents a value and always keeps the first, the last and the peaks. Leave it off and a fast tag over a long window returns every stored reading: potentially megabytes, per panel, per refresh.- The resolution does not follow your panel width. Grafana tells a native plugin how many pixels wide a panel is; Infinity has no macro for it, so the point budget is a fixed number in the URL. It is a good number for any panel. It is not adaptive, and we would rather say so than let you find out.
5. A tag dropdown
A dashboard variable of type Query against the Infinity data source, root selector tags, column tagName:
GET /api/tags?take=1000Make it multi-value and set Repeat on a row to it. One row becomes one row per tag. Refresh it on dashboard load — not from a panel, because the tag list sits on a much tighter rate limit than the measurement reads do.
The thing nobody else will tell you
Over a short window the API returns stored readings. Over a long one it answers from the hourly or daily roll-up, and then every point is an average of its interval. A two-minute excursion to 300% inside an hour whose mean is normal is simply not in the picture — and the two cases draw an identical-looking line.
So every response says which it was, in a resolution field at the top level: Raw means readings, Hour and Day mean averages. Put it on screen. The dashboard we ship does, in a small panel beside every graph, because a chart that cannot tell you this is a chart making a claim it has not earned.
An importable dashboard, if you would rather not click
Everything above is the whole recipe — there is nothing held back. But building twelve panels by hand is still twelve copies of one URL, so there is a dashboard JSON that arrives with a tag dropdown and a row of panels per tag already wired, plus a data source provisioning file for a self-hosted Grafana. Ask and we will send you both.
Common questions
- Is there a Tag Historian data source plugin for Grafana?
- No, and there is deliberately no timeline for one. Grafana requires a paid Commercial Plugin Subscription to sign a plugin for a closed-source commercial product, which is a recurring bill with a renewal date — and a listing whose signature lapses shows every user a deprecation banner. The Infinity data source, which Grafana Labs builds and signs itself, gets you charts, a tag dropdown and alert rules today at no cost.
- Does this work on Grafana Cloud?
- Yes, including the free tier. Infinity is in the Grafana plugin catalogue, so it installs on Grafana Cloud in one click. That is the main reason to prefer it: a private or custom-built plugin cannot be installed on Grafana Cloud at all.
- Where does the API key go, and can dashboard viewers see it?
- No. The key goes in Grafana's encrypted secure settings, which are not readable from the browser after you save them. Infinity sends every request from the Grafana server rather than from the browser, so the key never reaches a viewer and cross-origin rules never come into it. Set Scope to Read when you create the key — a Grafana server is shared with everyone who can log into it, nothing on a dashboard needs to write, and a read-scoped key is refused the ingest, tag-editing and billing endpoints outright.
- Can I build Grafana alert rules on Tag Historian data?
- Yes — Infinity's backend parser runs queries server-side, which is what Grafana Alerting requires. One caveat that matters: over a long evaluation window the API answers from hourly or daily roll-ups, so the rule is reading averages and a short excursion will never fire it. Keep an alert rule’s time range short. For anything that must not be missed, Tag Historian's own alert rules evaluate on the ingest path, per reading, as the data arrives.
- Will a dashboard on a wall display hit a rate limit?
- No. Reading does not touch the daily reading allowance at all — that counts ingestion — and measurement reads draw the larger of the two per-minute budgets precisely because a dashboard is a read loop. Every response carries an X-RateLimit-Limit header so you can check your own budget rather than trusting a number on a web page. One thing worth knowing: that budget is per account, not per key, so a collector or a second dashboard on the same account spends from it too — and issuing Grafana its own key does not give it a separate allowance.