Time series database
Factry Historian uses time series databases which are optimized for storing and serving time series through time-value pairs.
A point consists of:
measurement
: name of the measurementtimestamp
fields
: at least one key-value containing the valuetags
: meta data of the measurement, describes the origin of the measurement
Example
|
|
Creating a time series database connection
To create a time series database connection, go to the ‘Configuration’ tab on the bottom left. Here the time series databases overview should be selected.
Click the ‘Create database’ button.
- Enter a unique name
- Optionally enter a description
- Toggle whether a grafana data source should be created
- Toggle whether a database should be created, should only be off if the database already exists
- Select a database type, currently only influx (v1.x and v2.x), after selecting a database type the specific database settings will appear
Influx v1.x
- Enter the influx admin user
- Enter the influx admin password
- Enter the influx host address
- Enter the influx database name
The influx admin user/password, host and database will be used to connect to the influx database.
- Read only user
- Read only password
The read only user/password is the influx user used by the historian and grafana to query the data source, if the user doesn’t exist yet it will be created.
When you’re done you can press the ‘Save’ button, if everything is working you’ll see a success notification. If something went wrong more details are available in the error message.
Influx v2.x
- Enter the admin or write token
Enter an admin token if you wish to create the database. Otherwise enter a valid write token for the database.
- Enter the influx host address
- Enter the organization name
- Enter the bucket name
- Enter the read only token
This will be automatically generated if left blank and you have selected create database.
The read only token is used by the grafana data source.
When you’re done you can press the ‘Save’ button, if everything is working you’ll see a success notification. If something went wrong more details are available in the error message.
Updating/deleting a time series database connection
Updating/deleting an existing time series connection can be done in the detail view, you can get here by clicking on the time series database in the overview.
Creating the database itself and the grafana data source can only be done while creating the time series database. Updating an existing time series database will not create a new database, user or grafana data source.
Deleting a time series database will not delete the underlying database or grafana data source.