Cognite Integration Guide
Review the following guide for setting up an integration between Litmus Edge and Cognite. Once the integration is set up, you can send and receive data through the Cognite connector.
You must have access to Cognite Data Fusion.
You will need to retrieve the following parameters to configure the connection.
The project ID is the unique identifier assigned to each project within Cognite.
To get the project ID:
- Sign in to Cognite Data Fusion.
In the top-left corner, open the environment identifier to view the list of project IDs. Select the appropriate one to integrate with Litmus Edge.
Refer to Projects API documentation to learn more.
Sign in to the Microsoft Entra admin center and navigate to Identity > Overview > Properties. See How to find your Microsoft Entra ID to learn more.
To retrieve the client ID, you will need to register the Cognite account as an application in Microsoft Entra. If you don't have the appropriate permissions to create a client ID, follow up with your IT department. See Quickstart: Register an application with the Microsoft identity platform > Register an application to learn more.
To retrieve the client secret, you will need to register the Cognite account as an application in Microsoft Entra, and then create the client secret. Please note that the secret value is only visible when it is created, and not available to view after. If you don't have the appropriate permissions to create a client secret, follow up with your IT department. See Quickstart: Register an application with the Microsoft identity platform > Add a client secret to learn more.
A cluster is a grouping of resources within the platform.
To retrieve the cluster value:
- Log in to Cognite Data Fusion.
- Navigate to Data Management > Manage > Manage Access.
- Click the OpenID connect tab.
- Refer to the Audience field. The cluster value is between https:// and .cognitedata.com.
For example, if the audience value is https://az-eastus-1.cognitedata.com, the cluster value is az-eastus-1.
The scope specifies the level of access and permissions granted to an application in the Cognite platform.
To retrieve the scope value:
- Log in to Cognite Data Fusion.
- Navigate to Data Management > Manage > Manage Access.
- Click the OpenID connect tab.
- Refer to the Audience field and update it as needed for the scope.
For example, if the audience value is https://az-eastus-1.cognitedata.com, the scope value can be https://az-eastus-1.cognitedata.com/.default. Follow up with your IT department for further assistance.
Follow the steps to Add a Connector and select the Cognite Connector provider.
Configure the following parameters.
Parameter | Description |
---|---|
Name | Enter a name for the connector. |
Project ID | Enter the value retrieved in Step 1. |
Tenant ID | Enter the value retrieved in Step 1. |
Client ID | Enter the value retrieved in Step 1. |
Client Secret | Enter the value retrieved in Step 1. |
Cluster | Enter the value retrieved in Step 1. |
Scope | Enter the value retrieved in Step 1. |
Subscribe interval | Enter the interval (in seconds) that the connector polls for data. |
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. |
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 have the option of setting up an outbound or inbound connection.
To set up an outbound connection, you will need to create a DeviceHub device and tags. The tags will be used to send data to Cognite.
You will now need to import the tags you added 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.
You can verify the connection is successfully sending data by navigating the Cognite Data Explorer. See Explore data to learn more.
You have the option of subscribing to data from Cognite. The data that is subscribed to is a loopback as it is first sent from Litmus Edge to Cognite, and then back to Litmus Edge as time-series data.
To set up an inbound connection, you will need to create assets and time series as needed in Cognite through API. See Assets and Time Series to learn more.
Once you set up assets and time series, copy the IDs for the time series. You will refer to the IDs when configuring the remote topic names for the inbound connection.
To collect the time series IDs:
- Log in to Cognite Data Fusion.
- Click Data Explorer.
- Click the appropriate asset name to select it.
- Click the Time series tab.
- Click the appropriate time series name to select it.
- Under General, click the Copy icon for ID.
You will create topics for the connector that will subscribe to data from associated Cognite time series IDs.
To create inbound topics:
- Navigate to Integration.
- Click the connector tile.
- Click the Topics tab.
Click the Add a new subscription icon. The Data Integration dialog box appears.
- Configure the following parameters.
- Data Direction: Select Remote to Local - Inbound.
- Local Data Topic: Enter a topic name that will be used for subscribing to data in Litmus Edge.
- Remote Data Topic: Copy and paste the associated time series ID collected in the previous step.
- Enable: Select the toggle to enable the topic.
- Click Yes to add the topic.
- From the connector tile, ensure the connector is not disabled and still shows a CONNECTED status. Also verify the topic shows an Enabled status.
You have several options for verifying the connection in Litmus Edge. When subscribing to the data, you will need to use the Local Data Topic name configured in the previous step.
You can visualize the incoming data using one of the dedicated Applications such as Grafana.
You can also view the data in the Flows Manager and Analytics areas of Litmus Edge.
- If you are creating a flow from the Flows Manager, subscribe to the Local Data Topic name. See Subscribe to Topics with Flows to learn more.
- If you are using Analytics, select the DataHub Subscribe processor and use the Local Data Topic name. See Create an Analytics Flow and Add Processors and Processor Connections to learn more.