Adding measurements to an MQTT (JSON) collector
Once the collector is connected, you can add one or more measurements. A measurement defines how data from a subscribed topic is mapped into Historian.
To create a new measurement manually, go to the Measurements page in Historian and click + Create Measurement.
You can find JSONPath documentation online, and jsonpath.com is a useful tool to quickly test expressions against sample messages before configuring them in Historian.
Example configuration: Assume your broker publishes the following JSON message on topic factory/machine1/metrics:
{
"temperature": 23.5,
"pressure": 1012,
"status": "Good",
"machineId": "Mixer-01",
"ts": "2025-09-18T09:45:00Z"
}You can configure a measurement with:
- MeasurementPath: $.temperature
- TimestampPath: $.ts
- StatusPath: $.status
- TagNamesAndTagValuePaths: {"machine": "$.machineId"}
If the timestamp is in UNIX format, set TimestampLayout to UNIX, UNIXMILLIS, UNIXMICROS, or UNIXNANOS. Otherwise RFC3339 is assumed.
Expected outcome:
- The measurement status changes to Good within a few seconds.
- Live values appear in the data preview panel.
- The measurement shows up in the configured measurements list.