How-To Guides
Integration Guides

InfluxDB v2.x TCP Integration Guide

10min

Review the following guide for setting up an integration between Manufacturing Connect Edge and an InfluxDB database (version 2.x).

Note: The following data types and formats are not viewable in InfluxDB:

  • string
  • char
  • JSON payloads

User Scenario

In this guide you will deploy InfluxDB from the same computer (Windows-based) running Manufacturing Connect Edge and then use the DB - InfluxDB v2.x TCP connector to connect locally Manufacturing Connect 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:

  1. On your computer, open the command prompt window.
  2. 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.
  3. 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.

    InfluxDB initial setup screen
    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 Manufacturing Connect Edge.
    • Username
    • Password
    • Initial Organization Name
    • Initial Bucket Name
  5. Click Continue.
  6. Continue setting up the database as needed.
  7. Return to the homepage of InfluxDB.
  8. Navigate to Data > Tokens. Then, click the token name already created. Details for the token display

    The Tokens page
    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 Manufacturing Connect Edge.

    Token details
    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 Manufacturing Connect Edge.

Step 2: Add Device



Step 3: Add Tags



Step 4: Add the InfluxDB TCP Connector

Follow the steps to Add a Connector 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 (Optional): Enter a username to access the database.
  • Password (Optional): Enter the password associated with the username.
  • 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 Manufacturing Connect 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.

Document image


If you see a Failed status, you can review the Connector Logs 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.



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



Step 8: Verify Connection

Access the InfluxDB database to ensure that data is being sent successfully from Manufacturing Connect Edge to the database.