Install and Configure the Server-To-Server Collector to Work with Azure IoT Hub

Before you begin

  1. Set up an Azure IoT Hub account.
  2. Create an IoT device.
  3. Depending on the transport protocol that you want to use, ensure that the corresponding port number is available. For information, refer to Protocols and Port Numbers.

About this task

This topic describes how to install the Server-To-Server collector such that data is sent from the Historian server to Azure IoT Hub.

Procedure

  1. Using Command Prompt, navigate to the following folder: <installation folder of Historian>/Collectors.
  2. Run the following command: historian_s2s_collector_install_SxS_AzureIOT.msi /L*V "<path>" MSIFASTINSTALL="7" REBOOT=ReallySuppress IGNOREDEPENDENCIES=All CLIENTUILEVEL=3 MSICLIENTUSESEXTERNALUI=1 ROOTDRIVE="<path>" DATADIR="<path>" SOURCESERVERNAME="<value>" DESTINATIONSERVERNAME="Cloud" CONFIGSERVER="<value>" AZUREIOTHUB="<value>" DEVICEID="<value>" DEVICESHAREDKEY="<value>" PROTOCOL="<value>" PROXY="<value>" proxyuser=<value> proxypassword=<value>
    historian_s2s_collector_install_SxS_AzureIOT.msi /L*V "<C:\Proficy Historian Data\install_s2sAzure.log>" MSIFASTINSTALL="7" REBOOT=ReallySuppress IGNOREDEPENDENCIES=ALL CLIENTUILEVEL=3 MSICLIENTUSESEXTERNALUI=1 ROOTDRIVE="C:\" DATADIR="C:\Proficy Historian Data" SOURCESERVERNAME="ConfigServer6" DESTINATIONSERVERNAME="Cloud" CONFIGSERVER="none" AZUREIOTHUB="<value>" DEVICEID="<value>" DEVICESHAREDKEY="<value>" PROTOCOL="AMQP_OVER_WEBSOCKETS" PROXY="<host name of the proxy server>:<port number>" proxyuser=<value> proxypassword=<value>
    The following table describes the parameters.
    Note: All the parameters and their values are case-sensitive.
    Parameter Description Required? Valid Values
    /L*V The path to the log file. For example: C:\MyLogs\azureIoT.log.
    Important: If the file or the folder that you have specified does not exist, it is created. If, however, the file exists, it is overwritten.
    Yes
    MSIFASTINSTALL Indicates how quickly the installation must be completed. Yes 7
    REBOOT Indicates whether rebooting the system must be forced or suppressed. Yes ReallySuppress
    IGNOREDEPENDENCIES Indicates whether the dependencies must to installed as well. Yes All
    CLIENTUILEVEL Indicates the UI level. Yes 3
    MSICLIENTUSESEXTERNALUI Indicates whether the installation must use an external UI. Yes 1
    ROOTDRIVE The drive letter where you want to place the binary files of the Historian server. Yes
    DATADIR The disk path where you want to store the Historian data files. Yes
    SOURCESERVERNAME The machine name of the Historian server from which you want to send data to Azure IoT Hub. Yes
    DESTINATIONSERVERNAME The host name of the Historian server to which the data must be transferred. For collectors sending data to Predix or Azure IoT Hub, this field is used as part of the InterfaceName and DefaultTagPrefix parameters (will reflect in the collector registry after installation). The InterfaceName contains the values for SOURCESERVERNAME and DESTINATIONSERVERNAME. Yes
    CONFIGSERVER The host name of the machine from which you can access Historian Administrator to add the collector tags manually. Yes
    • none: Enter this value if you want to provide the tag names using the offline configuration file instead of adding tags manually.
    • <host name of the machine from which you can access Historian Administrator>: Enter the host name if you want to add collector tags manually using Historian Administrator.
    azureiothub The name of the Azure IoT Hub account that you have created. Yes
    deviceid The ID of the IoT device in which you want to store the data. Yes
    devicesharedkey The device shared key for the IoT device. Yes
    protocol The protocol that you want to use to send data to Azure IoT Hub. Yes
    • HTTP
    • MQTT
    • AMQP
    • MQTT_OVER_WEBSOCKETS
    • AMQP_OVER_WEBSOCKETS
    For information on which protocol to choose, refer to Protocols and Port Numbers.
    proxy The host name and port number of the proxy server that you want to use to send data to Azure IoT Hub. Yes (only if you want to use a proxy server)
    proxyusername The user name to connect to the proxy server. Yes (only if you want to use a proxy server)
    proxypassword The password to connect to the proxy server. Yes (only if you want to use a proxy server)
    The Server-To-Server collector is installed and configured to send data to Azure IoT Hub.
  3. Start the Server-To-Server collector.
    The data from the Historian server is sent to the IoT device via the Server-To-Server collector.

What to do next

If you want to specify the tags whose data you want to send to Azure IoT Hub, perform one of the following steps:
  • Modify the offline configuration file of the collector. By default, this file is available in the following location: <installation folder of Historian>\GE Digital\<collector name>.
    Note: You can use this option only if you have provided the value none for the CONFIGSERVER parameter during the installation.
  • Access Historian Administrator, and manage the tag configuration. For instructions, refer to the Tag Configuration section of the Historian Administrator document.
    Note: You can use this option only if you have provided the host name of the server for the CONFIGSERVER parameter during the installation.