Environment Variables
The following environment variables are used to configure the LE Sparkplug Edge Node:
Variable Name | Required/Optional | Description | Default Value |
---|---|---|---|
EDGE_API_TOKEN | Required | A token used to connect to the Litmus Edge API. To use this variable, set the API Token to connect with. | N/A (No default value provided) |
GROUP_ID | Required | An identifier for grouping multiple Sparkplug Edge Nodes. To use this variable, set the Sparkplug Group ID. | N/A (No default value provided) |
NODE_ID | Required | An identifier for a specific Sparkplug Edge Node within your infrastructure. To use this variable, set the Sparkplug Node ID. | N/A (No default value provided) |
PRIMARY_HOST_SUPPORT | Required | A flag to determine if the Edge Node should wait for a Primary Host Application. The default value is "false". | false |
PRIMARY_HOST_ID | Optional | The ID of the Primary Host Application (required if PRIMARY_HOST_SUPPORT is set to "true"). To use this variable, set the primary host application ID. | N/A (No default value provided) |
LE_STORE_AND_FORWARD | Required | A flag to determine if the Edge Node should enable the Store And Forward mechanism. | false |
LE_TTL_DURATION | Optional | This environment variable represents the time-to-live (TTL) duration for the entries in the Edge Node database (if `LE_STORE_AND_FORWARD` is enabled). The value should be specified as the number of hours. The value should be specified as an integer. The default value is 12 hours. You can adjust this value to set the desired expiration time for the entries in the database. For example, if you want the entries to expire after 24 hours, you can set this variable to "24". | 12 |
LE_MAX_SIZE_MB | Optional | This environment variable represents the maximum size of the Edge Node database in megabytes (MB) (if `LE_STORE_AND_FORWARD` is enabled). The default value is 1000 megabytes (1GB). The value should be specified as an integer. You can adjust this value according to the storage capacity you want to allocate to the database. For example, if you want to limit the database size to 500 megabytes, you can set this variable to "500". | 1000 |
LE_MAX_NUM_ENTRIES | Optional | This environment variable represents the maximum number of entries allowed in the Edge Node database (if `LE_STORE_AND_FORWARD` is enabled). The value should be specified as an integer. The default value is 1,000,000 (one million). You can adjust this value to set an upper limit on the number of entries in the database based on your specific requirements and expected workload. | 1000000 |
MQTT_SERVERS | Required | A JSON Array of MQTT Server Objects. Example: [{\"url\":\"<Broker URL>\",\"user\":\"<Username>\",\"password\":\"<Password>\"}]. | N/A (No default value provided) |
MQTT_CLIENT_ID | Optional | An identifier for the MQTT client connection. The default value is blank for auto-generation. To use this variable, set the MQTT Client ID or leave it blank for auto-generation. | Blank for auto-generation |
MQTT_CLIENT_ID_SUFFIX | Optional | A suffix to add to the specified MQTT Client ID. The default value is blank for auto-generation. To use this variable, set a suffix or leave it blank for auto-generation. | Blank for auto-generation |
MQTT_CONNECT_TIMEOUT | Optional | The maximum time to wait to establish a connection before abandoning the attempt. The default value is "30s". To use this variable, set the maximum time to wait to establish a connection. | 30s |
MQTT_WRITE_TIMEOUT | Optional | The maximum time to wait to write data before abandoning the attempt. The default value is "3s". To use this variable, set the maximum time to wait to write data. | 3s |
MQTT_KEEPALIVE | Optional | Max seconds of inactivity before a keepalive message is sent. The default value is 30. To use this variable, set the maximum seconds of inactivity before sending a keepalive message. | 30 |
LE_LOGGING_LEVEL | Optional | The logging level for the Sparkplug Edge Node. The default value is "Info". To use this variable, set the logging level for the Sparkplug Edge Node (e.g. Info, Debug, Warn, Error, etc.). | Info |