Skip to main content
Skip table of contents

Understanding the InfluxDB Connector

How InfluxDB Data is Mapped to Seeq

InfluxDB Concepts

InfluxDB has a few key concepts (see relevant InfluxDB v1 docs or InfluxDB v2 docs) that underpin its data model.

An InfluxDB v1 server can host one or more databases, each database can have one or more measurements.

An InfluxDB v2 server can host one or more organizations, each organization can have one or more buckets, and each bucket can have one or more measurements. (Buckets in v2 are analogous to Databases in v1.)

In either InfluxDB v1 or v2, each measurement can have a different set of tags and fields.

A measurement is roughly analogous to a SQL table, as it has a schema that is defined by the set of tag keys and field keys that are defined for the measurement.

Tag values are always strings, and they are indexed for fast filtering/retrieval.

series is defined as a unique combination of tag values within a measurement.

Field values can be floating point numbers, integer numbers or strings. Field values are not indexed.

Timestamp is a built-in, indexed, primary field for all measurements.

The diagram to the right depicts all of these concepts. Note that InfluxDB 2 users should replace the word “Database” with “Bucket”.


Equivalent Seeq Concepts

Each InfluxDB series is mapped to a set of signals in Seeq. For each series, each InfluxDB field within a measurement begets a Seeq signal.

Signals are organized into an asset tree according to the database, measurement and tag values that define the InfluxDB series.

In the example to the right, you can see how the asset tree is assembled from the InfluxDB schema above it.

This organization facilitates search, navigation, asset swapping and roll-up functionality (like Treemap).

The diagram to the right depicts this mapping. Note that InfluxDB 2 users should replace the word “Database” with “Bucket”.


Schema Recommendations

If you are still designing your InfluxDB schema, you may want some guidance about how to map equipment assets with associated sensors to measurements, tags and fields in InfluxDB.

It is recommend that you have one InfluxDB measurement per asset type. Typical asset types would be Power GeneratorPump, Heat Exchanger, Truck. Since each unique measurement in InfluxDB can have a different set of tags and fields, you can accommodate different sensors on these different types of assets but still treat them commonly in Seeq and leverage asset swapping.

Within a measurement, each unique asset should be differentiated by one or more tags. In InfluxDB, tags are indexed so that you can query for sensor data for a particular set of tags. For example, you can query for the Temperature field within the Power Generator measurement where the Unit Serial No tag is A1230FL1. Seeq will map each of these asset instances to a node in the asset hierarchy, which facilitates asset swapping and roll-ups.

Each unique sensor for an asset type should be represented as an InfluxDB field. Fields are not indexed and can contain the vast amount of sensor readings that is commonly found in industrial applications.

Units of Measure

InfluxDB does not currently have a clean mechanism for storing metadata for a series

It is recommended that you make the units part of the field name and then use a Seeq property transform to pull it out and put it in Seeq's Value Unit Of Measure field.

Add the units in square brackets to the field name in your InfluxDB schema. Examples:

CODE
Temperature [F]
Compressor Power [kW]

Once you do this, use the following Property Transform to move the units into the Value Unit Of Measure field:

CODE
    "Transforms" : [ {
      "Inputs" : [ {
        "Property" : "Name",
        "Value" : "(?<name>.*?)\\s*\\[(?<units>.*?)\\]"
      } ],
      "Outputs" : [ {
        "Property" : "Value Unit Of Measure",
        "Value" : "${units}"
      }, {
        "Property" : "Name",
        "Value" : "${name}"
      } ],
      "Enabled" : true,
      "Log" : false
    } ]

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.