InfluxDB v3 Integration Guide
The following guide shows you how to set up an integration between Litmus Edge and InfluxDB v3. Once the integration is set up, you can use it to publish time-series data from Litmus Edge directly into an InfluxDB v3 measurement using the official InfluxDB v3 Go SDK and Line Protocol.
Note: The InfluxDB v3 connector only supports outbound (publish) data flow — data travels from Litmus Edge to InfluxDB. Inbound subscriptions are not supported by this connector.
Before You Begin
Before configuring the connector in Litmus Edge, complete the following setup steps in InfluxDB.
Note: This guide uses DeviceHub tag data as an example. Litmus Edge also supports streaming custom JSON structures produced by Analytics or Digital Twins to InfluxDB. The steps are the same, but the field schema written to the measurement will reflect your custom payload structure.
Refer to the following InfluxDB 3 Core resources for more information:
Step 1: Note Your Host URL
Identify the URL of your InfluxDB v3 instance. You will need this URL when configuring the connector in Litmus Edge. The format depends on your deployment type:
Deployment Type | Example Host URL |
|---|---|
Cloud Serverless (AWS) | https://us-east-1-1.aws.cloud2.influxdata.com |
Cloud Serverless (Azure) | https://eastus-1.azure.cloud2.influxdata.com |
Cloud Dedicated | https://cluster-id.influxdb.io |
Self-hosted Clustered | https://influxdb.internal.company.com |
Step 2: Note Your Organization (Cloud Serverless Only)
If you are using InfluxDB Cloud Serverless, note your organization name or ID. You can find this in the InfluxDB UI under your account settings.
Note: The Organization field does not apply to Cloud Dedicated or self-hosted deployments. Leave it blank when configuring those deployment types.
Step 3: Create or Identify a Database
Identify the name of the target database in your InfluxDB instance. If the database does not yet exist, create it before proceeding.
See Create a database in the InfluxDB 3 Core documentation.
Step 4: Create an API Token
Create an API token in InfluxDB with write permissions scoped to the target database. Litmus Edge uses this token to authenticate all write requests.
Important: The API token is displayed only once at creation time. Store it securely before closing the dialog.
- Cloud Serverless: Navigate to Load Data > API Tokens in the InfluxDB UI and click Generate API Token.
- CLI: Use influx auth create --write-bucket <database-name>.
After creation, copy the token value immediately.
See Create and manage API tokens for detailed instructions.
Set up the Outbound Subscription (Publish to InfluxDB)
Follow the steps below to configure Litmus Edge to publish data to InfluxDB v3.
Step 1: Add the InfluxDB v3 Connector
Follow the steps to Add a Connector and select the DB - InfluxDB v3 connector provider.
Configure the following parameters:
- Name: Enter a name for the connector.
- Host URL: Enter the full URL of your InfluxDB v3 instance noted in Before You Begin — Step 1.
- Connection Type: Select the transport protocol for your InfluxDB endpoint. Use tcp for standard HTTPS connections.
- Organization (Cloud Serverless only): Enter your InfluxDB organization name or ID noted in Before You Begin — Step 2. Leave blank for Cloud Dedicated and self-hosted Clustered deployments.
- Database: Enter the name of the target InfluxDB v3 database noted in Before You Begin — Step 3.
- API Token: Paste the API token created in Before You Begin — Step 4.
Step 2 (Optional): Configure SSL/TLS
If you selected ssl as the Connection Type in Step 1, configure the certificate fields below. All fields are optional. Provide only what your SSL setup requires. Each field accepts a file upload or pasted text.
- CA Certificate: The Certificate Authority certificate used to verify the InfluxDB server's identity.
- Certificate: The client certificate for mutual TLS (mTLS) authentication.
- Private Key: The private key corresponding to the client certificate.
Step 3 (Optional): Configure Static Tags
Enable the Show Static Tags checkbox to define one or more static key-value pairs. The key-value pairs are appended as InfluxDB tags to every record written by this connector regardless of the payload source.
To add a static tag:
- Check the Show Static Tags checkbox to expand the static tags table.
- Enter a tag name in the Key field and its value in the Value field.
- Click + Add to add the tag to the table.
- Repeat for each additional static tag you want to apply.
Step 4 (Optional): Configure Advanced Parameters
Expand the Advanced Parameters section to adjust write behavior:
- Write Precision: The timestamp precision used for all writes. Options: ns (nanoseconds), us (microseconds), ms (milliseconds), s (seconds). Default: ms.
- Batch Size: The number of records to accumulate before sending a batch write to InfluxDB. Range: 1 to 10000. Default: 5000.
- Batch Interval (ms): The maximum time in milliseconds to wait before flushing a batch even if the batch size has not been reached. Range: 100 to 60000. Default: 1000.
Step 5: Enable the Connector
After adding the connector, click the toggle in the connector tile to enable it. If you see a Failed status, review the Manage Connectors page and the relevant error messages.
Step 6: Add an Outbound Topic
After the connector is enabled, add one or more outbound topics to define which Litmus Edge tag data is published to InfluxDB.
To add an outbound topic:
- Click the connector tile. The connector Dashboard appears.
- Click the Topics tab.
- Click the Add a new subscription icon. The Data Integration dialog box appears.
- Configure the following parameters:
- Data Direction: Select Local to Remote - Outbound.
- Local Data Topic: Select the DeviceHub tag or topic from Litmus Edge that you want to publish.
- Remote Data Topic (optional): Enter the name of the InfluxDB measurement to write this topic's data to. If the measurement does not exist, InfluxDB will create it automatically on the first write. If left empty, the connector expects a DeviceHub payload and automatically constructs the measurement name as deviceName.deviceID.
- Enable: Select the toggle to enable the topic.
- Click OK to add the topic.
- From the connector tile, verify that the connector shows a CONNECTED status and the topic shows an Enabled status.
Step 7: Verify Data in InfluxDB
To confirm that data is flowing from Litmus Edge into InfluxDB:
- In your InfluxDB UI, navigate to Data Explorer or open the SQL Query Editor.
- Run a query against the target measurement to view incoming data. Replace <measurement> with the measurement name you configured in Step 6.
SELECT *
FROM <measurement>
ORDER BY time DESC
LIMIT 100;- Confirm that rows appear with field values from your Litmus Edge tags.
Tip: You can also verify ingestion activity by navigating to Load Data > Buckets, selecting your database, and inspecting the measurement schema to confirm fields and tags are written as expected.
Data Mapping
The payload type determines how your Litmus Edge data is mapped to an InfluxDB measurement. InfluxDB organizes data in a measurement (table) using two concepts:
- Fields: The numeric, boolean, or string values you want to analyze or chart (for example, temperature, speed, pressure)
- Tags: Indexed string metadata used to filter and group data (for example, device name, site, machine ID)
DeviceHub Payload
When your local topic publishes a standard DeviceHub tag payload, the connector maps each field automatically as shown in this example payload:
{
"success": true,
"datatype": "int64",
"timestamp": 1683901827473,
"registerId": "7782779E-1582-4773-AB02-0A8CE8BD3597",
"value": 0,
"deviceID": "629145EB-2549-4BC1-8ECB-ACD86BC44061",
"tagName": "Air_Pressure_1",
"deviceName": "PLC_4",
"description": "",
"metadata": {
"Device_Location": "North_Wing",
"City": "Toronto",
"Country": "Canada",
"Category": "Pressure"
}
}Payload Field | InfluxDB Type | Name in Measurement | Notes |
|---|---|---|---|
success | Field | success | |
datatype | Tag | datatype | |
timestamp | Timestamp | timestamp | Written as a Unix timestamp |
registerId | Tag | registerId | |
value | Field | value | Supports int, float, string, bool |
deviceID | Tag | deviceID | |
tagName | Tag | tagName | |
deviceName | Tag | deviceName | |
description | Tag | description | |
metadata.* | Tag | metadata.<key> | All metadata sub-fields are flattened and written as individual tags |
Note: If no Remote Data Topic (measurement name) is specified on the outbound topic, the connector automatically constructs the measurement name as deviceName.deviceID using values from the payload. If the payload does not contain deviceName or deviceID, the record is not published and an error is logged.
Custom Payload Automatic Mapping
When your local topic publishes a custom JSON payload (for example, from Analytics or Digital Twins) and User-defined Tags & Fields is disabled, the connector applies automatic mapping rules:
- The JSON is flattened. Nested keys are written using dot notation (e.g. machineData.sensors.temperatureCelsius)
- All string values are mapped to Tags
- All numeric (int, float) and boolean values are mapped to Fields
- The timestamp is set at the time the record is sent rather than taken from the payload
Example payload:
{
"customerId": "ACME-IND-01",
"customerName": "Acme Industrial Solutions",
"siteLocation": "Detroit_Plant_A",
"machineData": {
"machineId": "CNC_001",
"type": "Lathe",
"status": "Operational",
"sensors": {
"temperatureCelsius": 45.2,
"vibrationRMS": 0.02,
"spindleSpeedRPM": 1500
},
"productionMetrics": {
"partsProduced": 120,
"efficiencyPercentage": 92.5
}
},
"maintenance": {
"lastService": "2026-01-15",
"nextServiceDue": "2026-03-15"
}
}Payload Field | Value Type | InfluxDB Type | Name in Measurement |
|---|---|---|---|
customerId | String | Tag | customerId |
customerName | String | Tag | customerName |
siteLocation | String | Tag | siteLocation |
machineData.machineId | String | Tag | machineData.machineId |
machineData.type | String | Tag | machineData.type |
machineData.status | String | Tag | machineData.status |
machineData.sensors.temperatureCelsius | Float | Field | machineData.sensors.temperatureCelsius |
machineData.sensors.vibrationRMS | Float | Field | machineData.sensors.vibrationRMS |
machineData.sensors.spindleSpeedRPM | Float | Field | machineData.sensors.spindleSpeedRPM |
machineData.productionMetrics.partsProduced | Int | Field | machineData.productionMetrics.partsProduced |
machineData.productionMetrics.efficiencyPercentage | Float | Field | machineData.productionMetrics.efficiencyPercentage |
maintenance.lastService | String | Tag | maintenance.lastService |
maintenance.nextServiceDue | String | Tag | maintenance.nextServiceDue |