MergenHub Envest
Home/Docs/Modules

Historian (data logger)

Log groups, triggers, SQLite or ODBC targets, store-and-forward, trends and export.

The historian records tag values into a database and serves trends, exports and OPC UA HistoryRead. It runs as its own service (MergenHubHistorian) and reads live values from the core over the local API.

Extensions › Historian — log groups and the trend viewer
Extensions › Historian — log groups and the trend viewer

Targets

TargetWhen to use
SQLite (logs.db, default)single server, up to a few hundred million rows; zero setup
ODBCSQL Server, MySQL/MariaDB, PostgreSQL, Oracle — corporate databases, reporting tools, long retention

Settings › Historian (or the log group) holds the connection; the Browse button discovers SQL Server instances on the network, lists databases and can create the table for you.

Log groups

A log group is a set of tags with one storage rule:

  • Trigger — periodic (every N ms), on change (with deadband), on a trigger tag edge, or a time window (e.g. 06:00–22:00). Advanced latched triggers match Kepware's behaviour.
  • Table formatnarrow (one row per tag sample) or wide (one column per tag), with selectable column mapping.
  • Table mode — single table, table per day/month, or fixed table with automatic creation.
  • Batch size / flush interval — tune for the database.

Store-and-forward

When the target is unreachable the historian buffers samples on disk and writes them when the connection returns; nothing is lost during database maintenance or network outages.

Historian › Trend: pick tags and a time range, zoom, pan, compare, then export as CSV, Excel or PNG. Downsampling (averages/min/max per bucket) keeps long ranges fast.

Trend view with cursor readout and export buttons
Trend view with cursor readout and export buttons

OPC UA HistoryRead

Tags inside a log group answer HistoryRead requests (raw values and processed aggregates such as average/min/max/interpolative) so UA clients can chart history without direct database access.

Sizing

Narrow SQLite storage costs about 40–60 bytes per sample. 1,000 tags every 10 s ≈ 8.6 M samples/day ≈ 0.4–0.5 GB/day. Use on-change logging with deadbands for slowly moving values, and an ODBC database for multi-year retention.