---
title: InfluxDB v2.x TCP Integration Guide
slug: bhdo/influxdb-v2x-tcp-integration-guide
createdAt: 2024-01-30T14:42:43.755Z
---

Review the following guide for setting up an integration between Belden Horizon Data Operations and an InfluxDB database (version 2.x).&#x20;

# User Scenario

In this guide you will deploy InfluxDB from the same computer (Windows-based) running BHDO and then use the DB - InfluxDB v2.x TCP connector to connect locally BHDO and the database.&#x20;

# Before You Begin

You will need to set up your computer so that it can run Docker commands.&#x20;

# Step 1: Set up InfluxDB

You will first need to pull an InfluxDB image file and then run it on your computer.&#x20;

**To set up InfluxDB:**

1. On your computer, open the command prompt window.&#x20;
2. Run the following command.&#x20;
   `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.&#x20;
3. Once the pulling and running of InfluxDB is complete, open a browser window and enter http\://localhost:8086 in the address window.&#x20;
   The setup screen for InfluxDB displays.&#x20;

   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/-AE-DmvxDBy5oTN-pgRrK_influxdbinitial-user.png "InfluxDB initial setup screen")
4. Configure the details for the initial user. You will need to refer to these values when setting up the connector in BHDO.&#x20;
   - **Username**
   - **Password**
   - **Initial Organization Name**
   - **Initial Bucket Name**
5. Click **Continue**.&#x20;
6. Continue setting up the database as needed.&#x20;
7. Return to the homepage of InfluxDB.&#x20;
8. Navigate to **Data&#x20;**> **Tokens**. Then, click the token name already created.&#x20;
   Details for the token display

   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/Q5Fk7tvFfH8I6AO9-FY8k_tokens.png "The Tokens page")
9. Click **Copy to Clipboard** and store the token somewhere securely. You will refer to this when setting up the connector in BHDO.&#x20;

   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/W_Y_npKkQcRaTnMKokMR4_copytoken.png "Token details")

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 Belden Horizon Data Operations.&#x20;

# Step 2: Add Device

Follow the steps to [Connect a Device](docId\:T-cWPe0_Jsfw5-aoj8WPP). 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** check box.&#x20;

# Step 3: Add Tags

After connecting the device in Belden Horizon Data Operations, you can [Add Tags](docId\:Wpe2HMXelARLBnhWbuChY) to the device. Create tags that you want to use to create outbound topics for the connector.&#x20;

# Step 4: Add the InfluxDB TCP Connector

Follow the steps to [Add a Connector](docId\:tkKE__fVsjbk_6yAmnFNW) and select the **DB - InfluxDB v2.x TCP&#x20;**&#x70;rovider.&#x20;

Configure the following parameters.&#x20;

- **Name**: Enter a name for the connector.&#x20;
- **InfluxDB address**: Enter **http\://localhost:8086**.&#x20;
- **InfluxDB bucket name**: Enter the bucket name configured in the InfluxDB setup in Step 1.&#x20;
- **Organization**: Enter the organization name configured in the InfluxDB setup in Step 1.&#x20;
- **Auth token**: Paste the token copied in Step 1.&#x20;
- **Username**: Enter the username configured in the InfluxDB setup in Step 1.&#x20;
- **Password**: Enter the password configured in the InfluxDB setup in Step 1.&#x20;
- **Insert batch size**: Enter the number of messages to be collected as a batch before inserting into the database&#x20;
- **Insert batch commit time**: Enter the time, in seconds, before the next commit, regardless of batch size. &#x20;
- **Throttling limit**: The maximum number of messages per second to be processed. The default value is zero, which means that there is no limit.&#x20;
- **Persistent storage**: When enabled, this will cause messages to undergo a store-and-forward procedure. Messages will be stored within BHDO when cloud providers are online. &#x20;
- **Queue Mode**: Select the queue mode as **lifo&#x20;**(last in first out) or **fifo&#x20;**(first in first out). Selecting **lifo&#x20;**&#x6D;eans that the last data entry is processed first, and selecting **fifo&#x20;**&#x6D;eans the first data entry is processed first.&#x20;

# Step 5: Enable the Connector

After adding the connector, click the toggle in the connector tile to enable it.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/vAqK-046vdh4I0e1y9cfX/aJXD0MyBuuhX2RuuCgi2p_influxdb2tcp.png" size="60" width="370" height="345" position="center" showCaption="false"}

If you see a *Failed&#x20;*&#x73;tatus, review the [Connector Logs](docId\:q8Q3J9CWP9n67ro4lmdZV) and any relevant error messages.&#x20;

# 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:**

1. Click the connector tile.
   The connector *Dashboard&#x20;*&#x61;ppears.&#x20;
2. Click the **Topics&#x20;**&#x74;ab.&#x20;
3. Click the **Import from DeviceHub** tags icon.&#x20;
   The *DeviceHub Import&#x20;*&#x64;ialog box appears.

   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/4fC8yaOKctxiiTvUDGfWu_import-from-devicehub.png" size="80" width="1148" height="570" position="center" showCaption="false"}
4. Select all the tags to import and click **Import**.&#x20;

After adding all required topics, navigate to the *Integration&#x20;*&#x6F;verview page and ensure the connector is not disabled and still shows a CONNECTED status.&#x20;

# Step 7: Enable Topics

To enable the topics, return to the *Topics&#x20;*&#x74;ab and click the **Enable all topics** icon.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/bCV1JMfeMF7XQryi1HSGr_enable-all-topics.png" size="80" width="1148" height="570" caption="Enable all topics icon" position="center" showCaption="true"}

# Step 8: Verify Connection

Return to the InfluxDB browser window and explore the metrics to ensure that data is being successfully sent from Belden Horizon Data Operations to to InfluxDB.&#x20;

