Hi all,
I'm building a network/infrastructure status screen in Perspective (8.3.x) and I want to display the health of my historian connection — in my case a Canary Historian connection configured under Services → Historians.
The gateway UI already shows exactly what I need: on the Historian details page there's a Status (RUNNING) field plus runtime metrics like Query Call Count, Query rates, Storage Success/Failure counts and rates. I'd like to read that same status from a gateway-scoped script (or any supported mechanism) so I can poll it into my status screen.
What I've checked so far:
- System tags: under
[System]Gateway/ I see Database, OPC, Gateway Network, StoreAndForward, EAM, etc. — but nothing for Historians.
- REST API (
/data/api/v1): the OpenAPI docs expose the historian-config endpoints (Get Historian Config, List Historian Resources, etc.), but those return configuration only — no runtime status or metrics endpoints that I could find searching for "status" / "diagnostics" / "metrics".
- Current workaround: an end-to-end probe —
system.tag.queryTagHistory() on a known historized tag with returnSize=1 inside a try/except, polled every few seconds. It works and it actually validates the full query pipeline, but it depends on a specific process tag existing, which I'd rather avoid.
Questions:
- Is there a supported way to read the historian connection Status (RUNNING/FAULTED/etc.) from scripting in 8.3 — something equivalent to
system.db.getConnectionInfo() but for historian connections?
- Are the runtime metrics shown on the Historian details page (query/storage rates) exposed anywhere accessible — system tags, REST endpoint, or the metrics dashboard backend?
Thanks in advanc
You mentioned a REST endpoint, the metrics dashboard backend polls data/api/v1/metrics/metric/<metric_name> by default. The available metrics are accessible via data/api/v1/metrics/available.
You could get the current throughput of a store+forward engine via data/api/v1/metrics/metric/storeforward.<engine_name>.store-throughput to get the current datapoint throughput. On any system, if it's not idle, it will be nonzero.
What are you specifically looking for? The store+forward engines have different queues, and one metric may not be the complete picture. You are likely going to find clarity in looking at multiple metrics to determine the overall health/progress of a historian.
Thanks Paul!
For now I'm specifically after the simplest piece: the Status shown on the Historians page (RUNNING / FAULTED / etc.) for a Canary Historian connection — basically the historian equivalent of system.db.getConnectionInfo() for database connections. The throughput/queue metrics are great context for a deeper health view later, but right now I just want to surface that connection state on a Perspective status screen.
Two things I ran into while testing:
GET /data/api/v1/metrics/available returns 404 on my gateway (8.3.x). Is that route version-dependent, or does it live somewhere else?
- Auth: I created an API key and calls come back 403 on
/data/api/v1/resources/find/.... My gateway uses SSO (OIDC IdP) for roles, and the API key doesn't seem to carry any role beyond "Authenticated" — and the key's security levels aren't editable after creation. What's the minimum permission setup for a read-only API key to hit these routes when roles come from an IdP?
Thanks again!
To access these endpoints programmatically, I believe you'll have to set up an API Key.
The user manual should help with this: API Documentation | Ignition User Manual
If you're after the status exclusively, the endpoint data/api/v1/resources/find/com.inductiveautomation.historian/historian-provider/<provider_name>, if found, should return a healthchecks section that describes the current status.
The manual referenced above should also mention the /openapi endpoint, which is also very handy to discover/test the available endpoints. I strongly encourage setting up a local, low-stakes environment to see which endpoints you might actually need.
There may be a better way to do this without the need of the REST API through obtaining a handle on the GatewayContext via the Tag History Manager via the getStatus function:
from com.inductiveautomation.ignition.gateway import IgnitionGateway
context = IgnitionGateway.get()
tagHistoryManager = context.getTagHistoryManager()
providerStatus = tagHistoryManager.getStatus("<history provider name>")
Keep in mind the above snippet has to run in the Gateway scripting context, it won't work in the Designer scripting console.