Environment Variables Used by the Historian Database
The environment variables used by the Historian database are available in the historian-archiver-conf.json file. The following table describes these variables.
Note: Before applying changes to the environment variables, ensure that the number of archive files do not exceed 1024. Otherwise, the archiver will crash. This is because 1024 is the default number of file descriptors a process can open on Linux. We recommend that you create archive files daily or by size so that you can monitor the number of archive files created.
Environment Variable | Description | Default Value | Valid Values |
---|---|---|---|
HS_ARCHIVER_CREATE_TYPE | The type of the archive file creation. | Days |
|
HS_DEFAULT_CYCLIC_ARCHIVING | Indicates whether data must be overwritten after a specified duration. If the value of this variable is true, data is overwritten after the duration specified in the HS_CYCLIC_ARCHIVE_DURATION_HOURS variable. This is used for the SCADA buffer data store. If the value of this variable is true, the default data store is set to SCADA buffer. | false |
|
HS_CYCLIC_ARCHIVE_DURATION_HOURS | The duration, in hours, after which cyclic archiving (data overwrite) begins. A value is required if the value of the HS_DEFAULT_CYCLIC_ARCHIVING variable is true. | 8760 | 0 to 8760 |
HS_ARCHIVE_SIZE_IN_MB | The size limit, in MB, of an archive file. After an archive reaches the specified size, a new archive file is created. A value is required if the value of the HS_ARCHIVER_CREATE_TYPE variable is BySize. This is used during start-up or creation of a data store. | 100 | 1 to 99999 |
HS_ARCHIVE_DURATION_IN_HOURS | The number of hours an archive file is used for archiving data. After this duration, a new archive file is created. A value is required if the value of the HS_ARCHIVER_CREATE_TYPE variable is Hours. This is used during start-up or creation of a data store. | 1 | 1 to 90 * 24 |
HS_ARCHIVE_DURATION_IN_DAYS | The number of days an archive file is used for archiving data. After this duration, a new archive file is created. A value is required if the value of the HS_ARCHIVER_CREATE_TYPE variable is Daily. This is used during start-up or creation of a data store. | 1 | 1 to 1440 |
HS_FREE_SPACE_REQUIRED_IN_MB | Defines the free space, in MB, required for the archiver to work. This is used during start-up or creation of a data store. Tip: Set this value, in MB, to be at least five times the integral multiple of the archive size. |
500 | 1 to 999999999 |
HS_USE_ARCHIVE_CACHING | Indicates whether data must be cached. When caching is enabled, when data queries are requested, they are cached according to the system RAM size available in the main memory. The cache is released if the RAM is used within a certain limit. This helps querying of data faster for future requests. This is used during start-up or creation of a data store. | true |
|
HS_CREATE_OFFLINE_ARCHIVE | Indicates whether to allow writing of past data in an archive file until January 1, 1970. | true |
|
HS_ARCHIVE_ACTIVE_HOURS | The number of hours an archive file was used to write data. This is used during start-up or creation of a data store. | 8760 | 1 to hours till January 1, 1970 |
HS_MODE_OF_OPERATION |
Indicates whether .ihc and .iha files must be loaded from a different Historian database (can be from a Windows-based Historian as well). If you set the value to |
normal |
|
HS_ALLOW_HELD_VALUE_QUERY | Indicates whether the held sample must be queried when Archive compression is enabled. | false |
|
HS_LICENSE_FILE_PATH |
The absolute path of the license file of Historian for Linux. Important: The Historian database container must have a valid license file for all the enabled features, including high tag count support. If a valid license is not provided, Historian for Linux switches to demo mode (which supports only 32 tags) while starting the Docker container.
For example, if you mount a /data/edgedata directory with /data/ with the Historian database container, you can keep the license file in /data/edgedata/historian-license on the host machine. But you should set the variable to |
/config/historin-license | |
HS_NUMBER_OF_LOG_FILES | The maximum number of log files to be created. Once this value exceeds, the oldest file will be deleted to accommodate the new one. | 100 | 1 to 100 |
HS_SIZE_OF_EACH_LOG_FILE | The maximum size of a single log file, in MB. If this value exceeds, a new log file will be created. | 10 | 1 to 10 |
debug | Indicates whether debug logs must be enabled. | off |
|