0

How to Configure a Proxy Server (version 24)

  • updated 3 mths ago

A proxy server is needed when a stream of data needs forwarded through an intermediate level in the network, such as in the Purdue Model shown below where there is no direct path from Level 3 to Level 4.

A proxy can be a standalone SaF service whose responsibility is to simply send data to the next level (as shown in the Purdue Model screenshot above), or it can be configured on an existing Historian machine where the SaF service would log data locally, then forward it on to its next destination as seen below.

Any SaF service can be configured as a proxy to forward data on to another destination.


Prior to version 24, ALL sessions coming through the proxy were routed to the same destination(s) as configured in the proxy.config file (see How to Configure a Proxy Server - Version 23). With the new Store and Forward (SaF) service, the user can control which destination each individual session is routed to. There are three options to choose from when determining the destination:

  1. SessionCollectorType - routes the session to a particular destination(s) based upon the Collector in use. Options include API, CSV, CygNet, Logger, MQTT, OPC, SQL, and null.
  2. SessionName - routes the session to particular destination(s) based upon the session name
  3. SessionOrigin - routes the session to a particular destination(s) based upon the origin (machine name or IP address) of the session

Each option can be chosen more than once and in combination with other options. If wishing to send ALL sessions to the same destination(s), similar to that in previous versions, the user can use the SessionCollectorType option and set its 'RegexMatchPattern' to "null".

Configuration

  1. Ensure the SaF service is installed on the server. The following screenshot shows the minimum components needed to configure a proxy server including SaF, Identity (local or remote), Admin service, and Admin Client. Other components can be installed as needed.

  2. Open the store_and_forward.service.json file. By default, this is located in C:\ProgramData\Canary\StoreAndForward.
  3. Edit the "RouteDestinations" array by adding as many Destinations as needed. Each Destination has one or more Endpoints (server name or IP address of where to send the data) which is paired with a RegexMatchKind (choose one of the 3 options from above) and a RegexMatchPattern.

    The following example illustrates the two options: SessionName and SessionCollectorType. Any session name that contains the string "Test" is routed to "ProdHistorian" and "DevHistorian". Any session coming from any Canary Collector is routed to "ProdHistorian". If a session were to match multiple routes, the top-most route wins.

    "RouteDestinations": [
        {
          "Destinations": [
            {
              "Endpoint": "ProdHistorian",
              "ForceHistorianConnection": false
            },
            {
              "Endpoint": "DevHistorian",
              "ForceHistorianConnection": false
            }
          ],
          "RegexMatchKind": "SessionName",
          "RegexMatchPattern": "Test"
        },
        {
          "Destinations": [
            {
              "Endpoint": "ProdHistorian",
              "ForceHistorianConnection": false
            }
          ],
          "RegexMatchKind": "SessionCollectorType",
          "RegexMatchPattern": null
        }
      ]
  4. Save the configuration, then restart the SaF service.
Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular

Support Center