Skip to main content
Skip table of contents

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

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

CODE
{
    "HostName" : "localhost",
    "Port" : 8086,
    "Ssl" : false,
    "Username" : "admin",
    "Password" : "admin",
    "Token": null,
    "ConnectTimeoutInSeconds" : 30,
    "ReadTimeoutInSeconds" : 120,
    "CallTimeoutInSeconds" : 150,
    "Databases" : [ ],
    "Simulation" : false
}
InfluxDB V1 Additional Configuration

Property Name

Default Value

Data Type

Description

HostName

localhost

String

The name or IP address of the InfluxDB server that will be accessed.

Port

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.

Ssl

false

Boolean

Set to true if you are using a secure HTTPS connection, leave false otherwise.

Username

admin

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 Token field.

Password

admin

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 Token field.

Token

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.

ConnectTimeoutInSeconds

30

Integer

How long the connector will wait for a response when connecting to InfluxDB.

ReadTimeoutInSeconds

120

Integer

How long the connector will wait for a response when reading data from InfluxDB.

CallTimeoutInSeconds

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.

Databases

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.

Simulation

false

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 true, leave false otherwise.

InfluxDB V2

CODE
{
    "Url" : "http://localhost:8086",
    "Username" : "admin",
    "Password" : "admin",
    "Token" : null,
    "ConnectTimeoutInSeconds" : 30,
    "ReadTimeoutInSeconds" : 120,
    "CallTimeoutInSeconds" : 150,
    "Organizations" : [ ],
    "Simulation" : false,
    "IndexingSchemaQueryStart" : null,
    "IndexingSchemaQueryStop" : null,
    "IndexingSchemaDiscoverOnly" : false
}
InfluxDB V2 Additional Configuration

Property Name

Default Value

Data Type

Description

Url

localhost

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.: https://us-east-1-1.aws.cloud2.influxdata.com/).

Username

admin

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 Token field and ignore this field.

Password

admin

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 Token field and ignore this field.

Token

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.

ConnectTimeoutInSeconds

30

Integer

The connect timeout is applied when connecting a TCP socket to the target host.

ReadTimeoutInSeconds

120

Integer

The read timeout is applied to both the TCP socket and for individual read IO operations including on Source of the Response.

CallTimeoutInSeconds

150

Integer

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.

Organizations

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.

Simulation

false

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 true, leave false otherwise.

IndexingSchemaQueryStart

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 "2016-01-01T00:00:00Z" or whatever date makes sense for you.

IndexingSchemaQueryStop

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.

IndexingSchemaDiscoverOnly

false

Boolean

Coming soon in R63

If set to true, the indexing operation will not create an asset tree and associated signals in Seeq, it will just scan the InfluxDB server for Organizations, Buckets, Measurements and Tag Keys and add them to the configuration. You can then modify the configuration as you please and set this option back to false to re-enable full indexing.

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

Self-Signed Certificates

If the InfluxDB connector encounters an SSL certificate that is not trusted (e.g., it is self-signed or otherwise not derived from a root certificate authority), it will add the certificate to the hosting Agent’s <global_folder>/keys/untrusted folder. You can choose to trust the certificate by moving it to the <global_folder>/keys/trusted folder.

If you don’t see a PEM file in the folder above, you may be using an earlier version of Seeq that does not support this certificate trust mechanism (R63 and earlier).

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:

CODE
"Tree" : "${_measurement} >> ${Location} >> Model ${Model} >> Unit# ${Unit Serial No}"

You can also enable/disable databases and measurements using the Enabled field.

JSON
{
    "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.

JavaScript errors detected

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

If this problem persists, please contact our support.