InfluxDB

Prev Next

Create smart services by retrieving data from an InfluxDB instance.

Plugin Configuration

To enable this plugin, you need to:

  1. Go to the Integrations / Plugins page.

  2. Select the Data Integration category.

  3. Locate the InfluxDB card.

  4. Click on the card switch to activate the plugin.

  5. Configure the plugin properties and save.

Here is the list of all the properties that can be used in the plugin configuration.

PROPERTIES

Organization

The InfluxDB organization ID.
Type: STRING | Mandatory

Token

The token configured in the InfluxDB account.
Type: STRING | Mandatory

Server URL

The server URL of the InfluxDB instance
Type: STRING | Mandatory

Volatile metric configuration

Volatile metrics associated to InfluxDB require you to configure:

  • Bucket: the name of the InfluxDB bucket where to execute the query (e.g. the Website Monitoring Bucket).

  • Field: the name of the measurement field to be read.

  • Measurement: the name of the measurement to read.

Once saved, within the page you can now insert any type of widget that supports metrics, and display the data directly coming from InfluxDB.

The backend, on the fly, composes the InfluxDB query and runs it on the remote server.

Here is an example of the query:

from(bucket:"${bucketName}")
|> range(start: ${startTime}, stop: ${endTime})
|> filter(fn: (r) => r["_field"] == "${fieldName}")
|> filter(fn: (r) => r["_measurement"] == "${measurement}")
|> filter(fn: (r) => r.host == "${thingAssetId}")
|> aggregateWindow(every: ${aggregateWindow}, fn: mean, createEmpty: false)
|> yield(name: "mean")

The last two rows related to aggregation will be added only if the widget requests data by also passing the aggregate window parameter (e.g. 1h).