Create smart services by retrieving data from an InfluxDB instance.
Plugin Configuration
To enable this plugin, you need to:- Go to the Integrations / Plugins page.
- Select the Data Integration category.
- Locate the InfluxDB card.
- Click on the card switch to activate the plugin.
- 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).
Comments
0 comments
Please sign in to leave a comment.