InfluxDB v2.x TCP Integration Guide
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
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.
You will need to set up your computer so that it can run Docker commands.
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 Manufacturing Connect 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 Manufacturing Connect 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 Manufacturing Connect Edge.
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.
After adding the connector, click the toggle in the connector tile to enable it.
If you see a Failed status, you can review the Connector Logs and relevant error messages.
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.
Access the InfluxDB database to ensure that data is being sent successfully from Manufacturing Connect Edge to the database.