InfluxDB v3 Integration Guide
18 min
note this feature is available starting with litmus edge 4 1 x the following guide shows you how to set up an integration between litmus edge and influxdb v3 https //docs influxdata com/influxdb3/core/ 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 influxdb 3 core https //docs influxdata com/influxdb3/core create and manage api tokens https //docs influxdata com/influxdb3/core/admin/tokens/ query data with sql https //docs influxdata com/influxdb3/core/query data/sql/ 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 https //docs influxdata com/influxdb3/core/admin/databases/ 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 https //docs influxdata com/influxdb3/core/admin/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