14.6. Tunnel (Pull)

So far the tunnelling example has used a Tunnel (Push) connection, where the sending DataHub instance pushes data to the receiving DataHub instance. But it is also possible to pull the data from the sending DataHub instance, using Tunnel (Pull). This allows you to make an outbound tunnelling connection from the receiving side, which can be useful in some configurations.

[Note]

This section builds on the previous two. For the best outcome, we recommend working through those sections first if you have not already done so.

On the Sending Side

In the Tunnel/Mirror option go to the Tunnel/Mirror Master section and make sure that the Accept secure connections box is checked, with the default service/port number 4503.

We use this port in this example to demonstrate that this tunnelling works over SSL, and so we can enable and disable each connection independently.

When finished, click OK and Apply.

On the Receiving Side

  1. In the Tunnel/Mirror option click the Add Master button.

  2. Configure the following:

    • Connection Name: Enter TUN001.

    • Primary Host: The name or IP address of the sending side computer.

    • Port: Set it to 4503 to match the SSL port on the sending side.

    You can leave all other options at their default settings. When tunnelling external historian data, the local and remote data domain names are not used, and the data flow and connection options are ignored.

    When finished, click OK and Apply.

  3. To keep this data separate from the Tunnel(Push) connection, you will need to configure a separate InfluxDB database in the External Historian option .

    Click the Add button to add an InfluxDB connection. For the Label enter Influx3 and for the Database name enter DataHubDB3.

    This Influx3 historian will store your Tunnel (Pull) separately from your Tunnel (Push) connection that logs to Influx2.

    Click OK and Apply.

  4. Now you need to create the Tunnel(Pull) connection itself. Again from the External Historian option, click the Add button and add a Tunnel (Pull) connection.

    • The Label can be something like PullFromDH1.

    • The Tunnel connection name must match what you entered above, TUN001.

    • For the Local historian label select DataHubDB3

  5. In the Remote System settings the Remote forwarding strategy should be FwdByTunnel.

    When finished, click OK and Apply.

The Tunnel (Pull) connection should now be functioning.

You can check Chronograf to see the results.

Test the store and forward feature by disabling the Tunnel/Mirror Slave connection on this side for at least 10 or 15 seconds.

You will start to see a gap in the data. When you re-enable the tunnel, the data should fill in, making the two trend lines identical again.