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 measurement
  • timestamp
  • fields: at least one key-value containing the value
  • tags: meta data of the measurement, describes the origin of the measurement

Example

1
<measurement>[,<tag-key>=<tag-value>...] <field-key>=<field-value>[,<field2-key>=<field2-value>...] [unix-nano-timestamp]

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.

Time series overview

  1. Enter a unique name
  2. Optionally enter a description
  3. Toggle whether a grafana data source should be created
  4. Toggle whether a database should be created, should only be off if the database already exists
  5. Select a database type, currently only influx (v1.x and v2.x), after selecting a database type the specific database settings will appear

Time series create basics

Influx v1.x

  1. Enter the influx admin user
  2. Enter the influx admin password
  3. Enter the influx host address
  4. Enter the influx database name

The influx admin user/password, host and database will be used to connect to the influx database.

  1. Read only user
  2. 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.

Time series create influx settings

Influx v2.x

  1. 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.

  1. Enter the influx host address
  2. Enter the organization name
  3. Enter the bucket name
  4. 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.

Time series create influx v2 settings

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.

A time series database can’t be deleted if there are measurements still using it!

Time series detail