How-To Guides
Integration Guides

InfluxDB v2.x TCP Integration Guide

11min
review the following guide for setting up an integration between litmus edge and an influxdb database (version 2 x) note the following data types and formats are not viewable in influxdb string char json payloads video user scenario in this guide you will deploy influxdb from the same computer ( windows based ) running litmus edge and then use the db influxdb v2 x tcp connector to connect locally litmus edge and the database before you begin you will need to set up your computer so that it can run docker commands step 1 set up influxdb you will first need to pull an influxdb image file and then run it on your computer to set up influxdb on your computer, open the command prompt window run the following command docker run name influxdb p 8086 8086 influxdb 2 0 9 the command will create the influxdb container with the name "influxdb", on port 8086, and install influxdb version 2 0 9 if you are using a different version of influxdb, update the version number once the pulling and running of influxdb is complete, open a browser window and enter http //localhost 8086 in the address window the setup screen for influxdb displays configure the details for the initial user you will need to refer to these values when setting up the connector in litmus edge username password initial organization name initial bucket name click continue continue setting up the database as needed return to the homepage of influxdb navigate to data > tokens then, click the token name already created details for the token display click copy to clipboard and store the token somewhere securely you will refer to this when setting up the connector in litmus edge now that influxdb is configured to your specific requirements and you've collected the parameters needed to set up the connection, you can complete the setup in litmus edge step 2 add device follow the steps to connect a device docid 3eyafppweuvmblcey17sq the device will be used to store tags that will be eventually used to create outbound topics in the connector make sure to select the enable data store checkbox step 3 add tags after connecting the device in litmus edge, you can add tags docid 8se7z3pmrfwl1nmzcwalx to the device create tags that you want to use to create outbound topics for the connector step 4 add the influxdb v2 x tcp connector follow the steps to add a connector docid\ ogw7fkqbwidbabn4wl5rr and select the db influxdb v2 x tcp provider configure the following parameters name enter a name for the connector influxdb address enter http //localhost 8086 influxdb bucket name enter the bucket name configured in the influxdb setup in step 1 organization enter the organization name configured in the influxdb setup in step 1 auth token paste the token copied in step 1 username enter the username configured in the influxdb setup in step 1 password enter the password configured in the influxdb setup in step 1 insert batch size enter the number of messages to be collected as a batch before inserting into the database insert batch commit time the batch commit time in seconds throttling limit the maximum number of messages per second to be processed the default value is zero, which means that there is no limit persistent storage when enabled, this will cause messages to undergo a store and forward procedure messages will be stored within litmus edge when cloud providers are online queue mode select the queue mode as lifo (last in first out) or fifo (first in first out) selecting lifo means that the last data entry is processed first, and selecting fifo means the first data entry is processed first 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, you can review the manage connectors docid 3u7jzldinehy8shvifd d and relevant error messages step 6 create topics for connector you will now need to import the tags you added in step 3 to the connector as topics to create outbound topics click the connector tile the connector dashboard appears click the topics tab click the import from devicehub tags icon the devicehub import dialog box appears select all the tags to import and click import after adding all required topics, navigate to the integration overview page and ensure the connector is not disabled and still shows a connected status step 7 enable topics ensure the topics you imported are enabled by returning to the topics tab and clicking the enable all topics icon step 8 verify connection return to the influxdb browser window and explore the metrics to ensure that data is being successfully sent from litmus edge to influxdb