Configure the Timeseries DB
You can configure the timeseries database in Litmus Edge by navigating to DataHub > Configuration.
Limitation: When using DataHub for storing data polled from connected devices, it's important to note the following limitations:
- InfluxDB initialization for large databases takes a long time with high CPU utilization. Ensure the Litmus Edge device has sufficient computing resources.
- DataHub does not store custom-formatted driver output like JSON or arrays to ensure efficient NoSQL timeseries database handling.
- DataHub handles string values differently than integers. As a result, when querying stored data, the way string and integer values are handled can impact the structure and results of your query. Sample Influx Query:
- For String Values: SELECT "value_str" FROM "temperature_readings" WHERE ("value_str"::field = 'pressure') AND $timeFilter
- For Integer Values: SELECT "value" FROM "temperature_readings" WHERE ("value"::field = 555) AND $timeFilter
You have the option of configuring an internal or external InfluxDB timeseries database.
DataHub's Configuration module offers the following functionalities:
- Toggle the Timeseries DB
- Select and Customize Timeseries DB Source type
- Test Timeseries DB
You can enable or disable the Timeseries DB by using the Timeseries DB disabled or Timeseries DB enabled toggle.
You can change the Timeseries DB source type by using the Source type drop-down list and selecting internal or external.
Note: If you select internal, make sure to select the Enable Data Store option for the device you want to store data for. See Enable Data Store to learn more.
If you select external enter the following details:
- DB uri: The IP address and port of the externally deployed InfluxDB database. If the InfluxDB database is deployed on the same device as Litmus Edge, enter http://localhost:8086.
- DB username: Enter the Influx DB v1.x username.
- DB password: Enter the Influx DB v1.x password.
- Auth token: Copy the token for the InfluxDB 2.x database. You can access the database from a browser window and navigate to Data > Tokens.
- Organization name: Enter the InfluxDB 2.x organization name configured for the database.
- DB vendor: The available vendors are
- InfluxDB v1.x
- InfluxDB v2.x
- Description (Optional): Enter a description for the externally deployed InfluxDB.
- Name: Enter a name for the externally deployed InfluxDB.
If you select internal, no further configurations are required.
You can test the connectivity of the Timeseries DB by clicking Test.
The connected status and response message displays.