Application Settings

Application settings are configured through the UI in the Admin | Settings section, or may be manually edited using the runtime\intelligencehub-settings.json file. By default, the installation includes an example file with a .template extension. This file contains default settings, but will not be used by the runtime until it is renamed.

Application Settings are loaded on startup. Changes made through the UI page take effect immediately. Any manual edits made directly to the file will not take effect until the runtime is restarted.

By default the runtime looks for the settings file in the appData directory. The location of the settings file can be configured when launching the runtime using a java property or environment variable. Below are examples of how to change the location of the file.

bash
# As a java property
java -cp intelligencehub-X.X.jar:/lib* -Dhighbyte.settingsFile=/path/to/settings.json start

# As an environment variable
HIGHBYTE_SETTINGS_FILE=/path/to/settings.json java -cp intelligencehub-3.0.jar:/lib* start

Below is a list of application settings and associated descriptions that are available in the file.

Directories

Setting Description
directories.appData Specifies the location for loading and saving configuration, event log, user management, identity provider settings, and other application data files. If this setting is not specified or is invalid, application data files will be stored in the appData directory.

Note: Specifying a Windows path requires any path delimiters (\) to be properly escaped. For example, a path to C:\Program Data\HighByte\Intelligence Hub should be set as C:\\ProgramData\\HighByte\\Intelligence Hub.
directories.storeForwardData Specifies the location for loading and saving store and forward data files. If this setting is not specified or is invalid, store and forward data files will be stored in the runtime directory.

Configuration

Setting Description
configuration.scheme Specifies whether the REST based configuration API should be exposed via http or https.
configuration.schemeCertificate Specifies the certificate used for SSL.

Note: This setting is applied when configuration.scheme is set to https.
configuration.port Specifies which http/https port the REST based configuration API listens on.
configuration.rootDirectory Specifies the location for the product configuration component files for self-hosting. If this setting is not specified it defaults to a relative path used in the packaged installer (i.e., ../configuration). If the setting is invalid or the path is invalid, the runtime will not self-host the configuration component.
configuration.centralConfig Specifies if the hub is in central configuration mode, allowing it to be used to remotely configure other hubs. Set to True to enable this capability. The default setting is False.
configuration.autoSaveInterval Specifies the maximum interval in seconds that the configuration file is saved after a configuration change is made. Defaults to 60 seconds. The minimum is 5 seconds and the maximum is 3600 seconds (1 hour).
configuration.backupCopies Specifies the maximum number of configuration copies to backup. The default is 50. The minimum value is 0 (no backups) and the maximum is 100.

When enabled, a ‘backups’ directory is created in the application directory. The existing configuration file is copied to the backup directory prior to saving any new changes to the configuration. If the maximum backups already exist, the oldest backup (based on the last time the file was modified) is deleted from the backup directory.

Logging

Setting Description
log.fileSizeMB Specifies the maximum event log file size in megabytes. The valid range is 10–1000. If this setting is not specified or is invalid, a value of 100 will be used.

Once the file reaches the limit, the oldest events are moved into a backup file (.bak) and a new event log file is created. If a backup file already exists, it will be overwritten.
log.logAuditEvents Specifies if the hub logs audit events for objects (Connections, Models, etc) that are changed via the REST API. When enabled, audit events are logged for creation, update, and delete events. These events are logged to the event log and are of type AUDIT. Defaults to False.
log.debugLogging Enables advance debugging. Options are NONE, ERROR, WARNING, INFO, DEBUG, and ALL.

Only enable this setting in cases where detailed debug logs are required to troubleshoot an issue. Enabling this will impact performance.

See Debug Logging for additional details.

Redundancy

Setting Description
redundancy.backup.enabled Specifies if the hub is running as a redundancy backup to another primary hub.

See Application-Level Redundancy for more details.
redundancy.backup.primary.uri Specifies the URI for the primary hub’s configuration interface. This will be based on the primary’s configuration.scheme and configuration.port settings described above and its host address. For example, http://127.0.0.1:45245.
redundancy.backup.primary.pingIntervalSeconds Specifies how often to ping the primary (in seconds) to ensure it is operational. The valid range is 1-3600. If this setting is not specified, a value of 10 will be used.
redundancy.backup.primary.pingAtt Specifies how many failed attempts should occur before promoting the backup to active. The valid range is 1-10. If this setting is not specified, a value of 1 will be used.

Expression Engine (JavaScript)

Setting Description
expressionEngine.allowExpressionImports Specifies if the hub will allow the use of 3^rd^-party javascript imports in instance, condition, or trigger expressions.

See Expressions for more details.
expressionEngine.allowExpressionEval Specifies whether or not the use of eval() is allowed during javascript evaluation. This setting applies to all expression fields and imported libraries
expressionEngine.expressionEngineTimeoutSeconds Specifies the maximum amount of time an expressions can take to compute a result. The valid range is 1-30 seconds. If this settings is not specified, a value of 10 seconds is used. If this setting is out-of-range the settings will be set to the closest acceptable value.
expressionEngine.hubBindingName Specifies the name of the internal JavaScript object used in the expression engine to provide access to metadata like Quality. This only needs to be changed if importing a JS library that may have a naming conflict, which should be rare.
expressionEngine.allowEnvironmentVariables Specifies if the hub can resolve environment variable references. If disabled {{System.Environment}} references will not be resolved and will not be available from the reference panel.
The default setting is False.

See Environment Variables for more information.

MQTT Broker

Setting Description
hbMqttBroker.enabled Enables the Intelligence Hub MQTT Broker.
hbMqttBroker.allowAnonymous When false MQTT clients are required to specify a username and password to authenticate with the broker. In order for a user to access the broker the following claims are required:
  • broker:subscribe: Allows the MQTT client subscribe access to all topics.
  • broker:publish: Allows the MQTT client publish access to all topics.
  • broker:*: Allows the MQTT client subscribe and publish access to all topics.

See Create a User for details.
hbMqttBroker.endpoints An array of one or more endpoints hosted by the broker. The endpoints have the following settings.
hostname The hostname the endpoint binds to. By default this is 0.0.0.0, which binds to all endpoints.
port The port the endpoint binds to. By default this is 1885.
useSSL Enables secure communication (SSL) for the endpoint.
certificateKeyAlias When SSL is enabled, this specifies the alias name for the key in the keystore to use for encryption. The public key must be trusted by MQTT Client.
protocol The protocol used by the endpoint. The following options are available.
  • mqtt.tcp – TCP connection
  • mqtt.ws – Websocket connection

REST Data Server

Setting Description
restDataServer.enabled Enables the REST Data Server.
restDataServer.hostname The hostname/network interface to bind to. In most cases this should be 0.0.0.0, 127.0.0.1 (localhost), or a NIC address on the machine
restDataServer.port The port to bind to. Defaults to 8885.
restDataServer.useHttps Enable this to host using https.
restDataServer.schemeCertificate The certificate/key used to host https. This should be added to the certificate store. By default this uses the internal self-signed certificate.

After enabling the REST Data Server, access http://localhost:8885/data/doc to view and test the OpenAPI specification.

Example Template File with Defaults

json
{
  "settings": {
    "directories" : {
      "appData" : "../appData",
      "storeForwardData" : "../appData"
    },
    "configuration" : {
      "scheme" : "http",
      "port" : 45245,
      "autoSaveIntervalSeconds" : 60,
      "backupCopies" : 50,
      "centralConfig" : false
    },
    "hbMqttBroker" : {
      "enabled" : false,
      "allowAnonymous" : true,
      "endpoints" : [ {
        "hostname" : "0.0.0.0",
        "port" : 1885,
        "useSSL" : false,
        "certificateKeyAlias" : "",
        "protocol" : "mqtt.tcp"
      }, {
        "hostname" : "0.0.0.0",
        "port" : 1886,
        "useSSL" : false,
        "certificateKeyAlias" : "",
        "protocol" : "mqtt.ws"
      } ]
    },
    "restDataServer" : {
      "enabled" : false,
      "hostname" : "0.0.0.0",
      "port" : 8885,
      "useHttps" : false,
      "schemeCertificate" : ""
    },
    "log" : {
      "fileSizeMB" : 100,
      "logAuditEvents" : false
    },
    "redundancy" : {
      "backup" : {
        "enabled" : false,
        "primary" : {
          "uri" : "",
          "pingIntervalSeconds" : 10,
          "pingAttempts" : 1
        }
      }
    },
    "expressionEngine": {
      "allowExpressionImports": false,
      "expressionEngineTimeoutSeconds": 10,
      "hubBindingName": "hub",
      "allowEnvironmentVariables" : false
    }
  }
}