Create an MQTT Collector

Before you begin

  1. Deploy Proficy Historian for AWS.
  2. Install collectors. You can install them on-premises or on a VPC (which can be different from the one on which Proficy Historian for AWS is deployed).

About this task

The MQTT collector collects data published to a topic using an MQTT broker. The data should be in Predix time series data format.
Features:
  • You can subscribe for multiple-level topics using a wildcard.
  • Only the unsolicited data collection is supported; polled collection is not supported.
  • The timestamp resolution is seconds, milliseconds, and microseconds.
  • Boolean, floating point, integer, and string data types are supported.
How it works:
  1. The MQTT collector connects to an MQTT broker and subscribes to a topic. Transport Layer Security (TLS) authentication is used for subscribing the data from message broker to avoid middleware attacks so that the data is securely transferred from message broker to the MQTT collector.
  2. The collector converts the data from the Predix Timeseries format to a Historian-understandabe format.
  3. It verifies whether the tag is available in Historian; if not, it will add the tag and then add the data samples, and streams the data to Data Archiver.

Message format:

{
"body":
[
    {
        "attributes":{"machine_type":"<value>"},
        "datapoints":[[<value>,<value>,<value>]],
        "name":"<value>"}],
        "messageId":"<value>"}

The following table describes these parameters.

JSON Parameter Description Required/Optional
machine_type The name of the machine from which you want to collect data. Optional
datapoints Time (in epoch format), value, and quality. Required
name The tag name Required
messageId The type of the message Optional

Procedure

  1. Run Command Prompt as an administrator.
  2. Run the CloudHistorianConfigurationUtility.exe file. It is provided along with the collectors installer. After you install collectors, it will be available in the C:\Program Files\GE Digital\Historian Cloud Config folder by default.
  3. Enter the number corresponding to creating a collector instance.
  4. Enter the following details:
    Field Description
    NLB DNS Enter the Amazon Network Load Balancer (NLB) DNS.
    Tip: To find the NLB DNS:
    1. Access the EKS cluster on which you have deployed Proficy Historian for AWS.
    2. Access the EC2 instance.
    3. In the navigation pane, under Load Balancing, select Load Balancers.
    4. Select the load balancer for which you want to find the DNS.
    5. In the Description section, copy the DNS name.
    Username Enter the username to connect to Proficy Historian for AWS.
    Password Enter the password to connect to Proficy Historian for AWS.
    Tip: This is the value you entered in the Password field under UAA Configuration when you created the stack.
  5. Enter the number corresponding to the collector that you want to create.
  6. Enter the following details:
    Field Description
    Interface name of the collector Enter the name that you want to provide for the collector instance. A value is required and must be unique in the DNS.
    MQTT server Enter the IP address or host name of the MQTT broker using which you want to collect data.
    MQTT port Enter the port number of the MQTT broker.
    MQTT topic Enter the MQTT topic from which you want to collect data.
    The MQTT collector is created and started.