Configure an MQTT Sparkplug B Collector Instance using Historian Administrator
Before you begin
- Ensure that you installed the Historian server and collectors.
- Ensure that you created an MQTT Sparkplug B collector instance, using RemoteCollectorConfigurator or Configuration Hub.
About this task
Procedure
- Access Historian Administrator.
- Select Collectors, and then select the MQTT Sparkplug B collector instance that you want to configure.
-
In the right-side, below the Collector: <Name of the Collector
Instance>, select Configuration.
The fields specific to the collector instance appear.
-
Enter values as specified in the following table.
Table 1. Configuration: HostName=localhost|Port=|ClientId=|PrimaryHostId=|GroupId=|EdgeNodeId=|DeviceId=|username=|password=|cafile=|certfile=|privatekeyfile=|version=MQTT_V311|reordertimeout= HostName (mandatory) MQTT broker Ip or hostname. Port (mandatory) MQTT broker port. ClientID Unique name to identify the client. PrimaryHostID (mandatory) The unique host ID of the Collector. The Collector will publish the STATE message topic using this host ID and then the Publisher will subscribe and start publishing the topics to this host ID. GroupId (mandatory) The Sparkplug B group name to which you want your collector to subscribe. If this is empty along with the other fields below TOPIC, the collector will subscribe to all the available groups, nodes, and devices. Use of the wildcard "+" is supported. EdgeNodeId (mandatory) The Sparkplug B edge node ID to which you want your collector to subscribe. If this is empty, then the Collector will subscribe to all the edge nodes corresponding to the entered GROUP ID. If the GROUP ID and DEVICE ID are also empty, then the collector will subscribe to all the available groups, nodes and devices. Use of the wildcards "+" and "#" are supported. DeviceId (mandatory) The Sparkplug B device name. If this is empty, the collector subscribes to node messages if a NODE ID is entered, otherwise, if a DEVICE ID is entered, it subscribes to device messages. Use of the wildcards "+" and "#" are supported. username The username to connect to the MQTT broker. A value is required if you have configured username/password-based authentication in the MQTT broker. password The password to connect to the MQTT broker. A value is required if you have configured username/password-based authentication in the MQTT broker. cafile The path to the CA server root file to connect to the MQTT broker. A value is required if you have configured certificate-based authentication in the MQTT broker. certfile The path to the client certificate file to connect to the MQTT broker. A value is required if you have configured certificate-based authentication in the MQTT broker. privatekeyfile The path to the private key file to connect to the MQTT broker. A value is required if you have configured certificate-based authentication in the MQTT broker. version The version of the MQTT that you want to use. That is, MQTT_V311 or MQTT_V5. reordertimeout TagName Prefix The prefix to be included in the tag. By using this field, you can clearly identify a tag. For example, you can clearly differentiate the tags that are collected. The following options are available:
- <interfacename>
- <groupid>
- <edgenodeid>
- <deviceid>
For example, if all four fields provided and the interface / collector name is "sparkplug1" and the Topic contains group id = g1 edge node id = n1, device id = d1 then device tags will be created in Historian as “sparkplug1.g1. n1.d1.tag1”.
Tag include Mask The mask along with wildcard to collect those tags that include the mask you provided and store in Historian. For example, *Pressure*. This will collect all the tags that begin with "Pressure". If you enter Pressure*, all the tags that end with "Pressure" will be collected. Similarly, if you enter *Pres?, all the tags that contain "pres" at the beginning will be collected. It can be "Pressure", "Press", or "Pres1". Note: Whenever a new tag is collected, the collector verifies the tag availability in the Historian and, if not present, adds the tag, then adds the data samples, streaming the data to the Historian server or a cloud destination.Tag Exclude Mask The mask along with wildcard to exclude those tags that include the mask you provided. For example, *Pressure*. This will exclude all the tags that begin with "Pressure". If you enter Pressure*, all the tags that end with "Pressure" will be excluded. Similarly, if you enter *Pres?, all the tags that contain "pres" at the beginning will be excluded. It can be "Pressure", "Press", or "Pres1". -
After you configure the collector instance, select
Update.
The instance is updated with the new configuration.