Sparkplug B Messages

The MQTT Sparkplug B collector connects to a MQTT broker that supports Sparkplug B. It subscribes on the configured topic, which you can set to spBv1.0/# if you want to receive all messages. The topic is of the following format for Sparkplug B namespace/group_id/message_type/edge_node_id/[device_id]. The best way to configure the topic is to pass a comma separated list of topics containing only the groups, edge nodes or devices you’re interested in.

For every message that the collector receives it will check if there is a corresponding measurement configured and create points. To configure a measurement you need to specify the group id, edge node id, device id(optional) and the metric name.

Measurement discovery and auto-onboarding

The SparkplugB collector can be configured to discover new measurements and optionally to try to automatically onboard them.
Incoming messages that are not yet linked to a measurement are given a default name: group_id/edge_node_id/device_id/metric_name and the measurement is added in status Discovered if AutoOnboard is not enabled. If AutoOnboard is enabled and the collector has a default database configured, Factry Historian will attempt to set the newly discovered measurement to status Active.
Discovered measurements can be promoted to Active by setting a database and optionally changing their name.

Collector settings

Some collector settings are specific to the MQTT Sparkplug B collector.

DiscoverMeasurements

Description: Automatically discover measurements by parsing incoming messages. If enabled, the collector will try to parse incoming messages and create measurements based on the message contents. Currently only supported for SparkplugB messages.

AutoOnboard

Description: Automatically try to onboard discovered measurements using the collector’s Default Database.
Prerequisites: The default database has to be configured for the collector, and DiscoverMeasurements has to be enabled.

NameRegexMatcher

Description: Change the automatically generated name for discovered measurements by setting this field and NameRegexReplaceBy. The regex in this field will be matched with the default name generated by the collector. The capture groups in the regex here can be used to selectively replace (parts of) the generated name.

NameRegexReplaceBy

Description: The replacement string to replace the automatically generated name by. Use $1, $2, …, $n to reference capture groups/submatches in the NameRegexMatcher

Measurement settings

The measurement settings reflect the configuration possibilities for mapping a measurement to a Sparkplug B metric.

Measurement settings

GroupID

Description: The group ID, it provides for a logical grouping of MQTT EoN nodes.

Required: yes

EdgeNodeID

Description: The edge node ID, it uniquely identifies the MQTT EoN node within the infrastructure.

Required: yes

DeviceID

Description: The device ID, it identifies a device attached (physically or logically) to the MQTT EoN node.

Required: no

MetricName

Description: The name of the metric.

Required: yes

TagNames

Description: Comma separated list of tags to extract.

Required: no