InfluxDB
JVM AGENT
Overview
The InfluxDB connectors enables Seeq to access data from an InfluxDB v1 or v2 server, translating measurements/tags/series into assets and signals in Seeq.
InfluxDB was largely rewritten between InfluxDB version 1 and version 2 and uses a different communication interface and query language between the two versions.
Seeq therefore provides two different connectors:
InfluxDB Connector
Natively supports InfluxDB v1
Also supports InfluxDB v2 if InfluxDB’s compatibility endpoints are used
InfluxDB 2 Connector
Natively supports InfluxDB v2
Does not support InfluxDB v1
Available in Seeq Server version R59 and later
Prerequisites
There are no prerequisites for connecting to InfluxDB, but you may want to read through Understanding the InfluxDB Connector, particularly the Schema Recommendations section.
Configuration
This is an example configuration template that is displayed in the Additional Configuration box that appears when you click Configure for an existing datasource (or if a new datasource is being created, in the Create new datasource connection modal that appears after clicking Add Datasource) on the Datasources administration page.
InfluxDB V1
{
"HostName" : "localhost",
"Port" : 8086,
"Ssl" : false,
"Username" : "admin",
"Password" : "admin",
"Token": null,
"ConnectTimeoutInSeconds" : 30,
"ReadTimeoutInSeconds" : 120,
"CallTimeoutInSeconds" : 150,
"Databases" : [ ],
"Simulation" : false
}
InfluxDBV1 Additional Configuration
Property Name | Default Value | Data Type | Description |
---|---|---|---|
|
| String | The name or IP address of the InfluxDB server that will be accessed. |
| 8086 | Integer | The port of the InfluxDB server. This only needs to be changed if you know that your server is running on a different port. |
|
| Boolean | Set to |
|
| String | This is the username of a user that has access to InfluxDB. If you prefer not to use username / password authentication, you can also opt for JWT token authentication using the |
|
| String/SecretFile | The password of a user that has access to the database. It is recommended to leverage a Secrets File to store this information. If you prefer not to use username / password authentication, you can also opt for JWT token authentication using the |
| null | String/SecretFile | The JWT token that will be used to authenticate to InfluxDB. It is recommended to leverage a Secrets File to store this information. Conversely, you can also authenticate via username / password. |
| 30 | Integer | How long the connector will wait for a response when connecting to InfluxDB. |
| 120 | Integer | How long the connector will wait for a response when reading data from InfluxDB. |
| 150 | Integer |
Coming soon in R63 The call timeout spans the entire call: resolving DNS, connecting, writing the request body, server processing, and reading the response body. If the call requires redirects or retries they must all be completed within one timeout period. |
| Empty List | List of Databases | Seeq will automatically fill in this property on the first connection. Afterward, you may modify the database definition as specified in https://seeq.atlassian.net/wiki/spaces/KB/pages/164003895/InfluxDB+Connector#Rearranging-the-Asset-Tree. |
|
| Boolean | If you have a blank InfluxDB server and you're just experimenting, you can load simulated data into InfluxDB by changing this field to |
InfluxDB V2
{
"Url" : "http://localhost:8086",
"Username" : "admin",
"Password" : "admin",
"Token" : null,
"ConnectTimeoutInSeconds" : 30,
"ReadTimeoutInSeconds" : 120,
"CallTimeoutInSeconds" : 150,
"Organizations" : [ ],
"Simulation" : false,
"IndexingSchemaQueryStart" : null,
"IndexingSchemaQueryStop" : null
}
InfluxDBV1 Additional Configuration
Property Name | Default Value | Data Type | Description |
---|---|---|---|
|
| String | The URL of the InfluxDB v2 server you wish to connect to. If you are using InfluxDB Cloud, this is the root of the URL you will see in your browser address bar when using the web-based admin console (e.g.: |
|
| String | NOT RECOMMENDED: This is the username of a user that has access to InfluxDB. It is strongly recommended that you commission an API Token and use that instead, as described here: https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/. You will place the token string in the |
|
| String/SecretFile | NOT RECOMMENDED: The password of a user that has access to the database. It is recommended to leverage a Secrets File to store this information. It is strongly recommended that you commission an API Token and use that instead, as described here: https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/. You will place the token string in the |
| null | String/SecretFile | The API Token used to access InfluxDB. Follow the instructions at https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/ to generate your token. It is recommended to leverage a Secrets File to store this information. You can also authenticate via username / password, but it is not recommended. |
| 30 | Integer | The connect timeout is applied when connecting a TCP socket to the target host. |
| 120 | Integer | The read timeout is applied to both the TCP socket and for individual read IO operations including on Source of the Response. |
| 150 | Integer |
Coming soon in R63 The call timeout spans the entire call: resolving DNS, connecting, writing the request body, server processing, and reading the response body. If the call requires redirects or retries they must all be completed within one timeout period. |
| Empty List | List of Organizations | Seeq will automatically fill in this property on the first connection. Afterward, you may modify the organization definition as specified in Rearranging the Asset Tree. |
|
| Boolean | If you have a blank InfluxDB server and you're just experimenting, you can load simulated data into InfluxDB by changing this field to |
| null (30 days ago) | String | InfluxDB v2 requires that a time period is included when querying for the set of measurements / tag keys / field keys that are present in a bucket. When this field is set to null, a default of 30 days ago is used. If you find that “old” measurements/tags/fields are not being indexed, considering setting this field to |
| null (now) | String | InfluxDB v2 requires that a time period is included when querying for the set of measurements / tag keys / field keys that are present in a bucket. When this field is set to null, a default of “now” is used. |
Known Issues
InfluxDB does not currently have a clean mechanism for storing metadata for a series. Find our schema recommendations for working around this limitation here.
Please report any other issues you find to our support portal.
Troubleshooting
Rearranging the Asset Tree
You may be interested in rearranging the ordering of the asset tree in Seeq. The default asset tree organization will be populated within the configuration file, as shown on the right.
To rearrange the ordering, change the Tree field to reflect the new ordering. Each level of the asset tree is separated by >> and the levels can contain static text as well. You can omit levels by just removing them. For example, this tree specification removes the database level and adds a "Model" and "Unit#" prefix to make the asset tree easier to understand:
"Tree" : "${_measurement} >> ${Location} >> Model ${Model} >> Unit# ${Unit Serial No}"
You can also enable/disable databases and measurements using the Enabled field.
{
"Databases" : [ {
"Database" : "American_Manufacturing",
"Enabled" : true,
"Measurements" : [ {
"Measurement" : "Power Generators",
"Enabled" : true,
"Tree" : "${_database} >> ${_measurement} >> ${Location} >> ${Model} >> ${Unit Serial No}"
} ]
} ]
}
Note: This example is for an InfluxDB v1 configuration. InfluxDB v2 configurations will have Organizations
and Buckets
in place of Databases
.
If you are running into other issues with connecting to or access data from InfluxDB, view our guide for troubleshooting datasource issues.
Performance considerations
The InfluxDB connector does not have any special performance considerations. View our guide on optimizing datasource performance for general guidance.