Deploy asset-based Data Rules
About Data Policies
Data Policies define how data is sent from edge assets to a destination. There are two types of policies:
- Data Rules: Data is sent from Assets to a destination without transformation.
- Data Logic: Data is transformed before being sent to a destination. Data Logic scripts are developed using Microsoft VS Code.
Create a Data Rule
Data rules define the flow of data, from connected assets to data destinations, without transformation.
- From the left menu, click Data Policies > Data Rules.
- Click Create Data Rule, enter the following information and click Save.
Field | Description |
---|---|
Rule Name | Enter a meaningful name. |
Description | This is an optional field. |
Source | |
Asset Type | Data is sent for all assets of the selected Asset Type. Verify the following: * The Asset Type is correctly configured for the connection method. * The Asset instances are configured correctly in the Asset Inventory. * The Asset instances are mapped to an EI Agent. * The EI Agent is reachable. See Add Assets. |
Filter | Select a filter from the drop-down list. Attributes that will be sent to the destination can be filtered. If an attribute is not visible at the destination, check the Asset Type attribute definition. |
Destination | |
Data Destination Type | Select a supported destination type. See Add Data Destinations. |
Data Destination | Select a destination that was configured for the selected type. See Add Data Destinations. |
Data Sampling Interval (ms) | This defines how often data is sent to the destination. It helps to limit the bandwidth required. If the source receives data in a higher frequency only the last received value is sent and all others are discarded. The default value is Disabled. You can select some predefined values from the dropdown list. You can also define custom values by clicking the + icon in the upper right corner of the dropdown list. |
Rule Data Classification | The type of rule data classification. This can be one of the following: * Device Property * Telemetry Note: This option is shown only if you select the destination as Azure IoT. Note: EI currently supports the use of one data policy to send data from an asset to the same Azure IoT Hub destination. For example, if you create two data policies that send data from the same asset to the same Azure IoT Hub destination, only the first policy will work. |
Deploy Data Rules
Data Rules are deployed and run on the EI agent software installed on edge devices.
At least 1 Asset must be mapped to each EI Agent(s) where the data rule is deployed.
- From the left menu, click Data Policies > Data Rules.
- In the Data Rule entry, click Deploy / Undeploy.
- In the Data Rule section, select the EI agent(s) and click Deploy.
- Scroll down to Deployment Status:
- Deployment Pending (yellow): The Data Policy is in the process of being deployed.
- Deployed (green): Deployment is successful on all EI Agents. Data is flowing from all assets to the data destination as configured.
- Error (red): The policy deployment is unsuccessful. There is at least one EI Agent on which the deployment failed. The data flow from assets to data destination is not successful for some configured assets.
Undeploy Data Rules
- From the left menu, click Data Policies > Data Rules.
- In the Data Rule entry, click Deploy / Undeploy.
- Select the data policy and click Undeploy.
Manage Data Rules
View Data Rule policy status
- From the left menu, click Data Policies > Data Rules.
- In the Data Rule entry, click the Policy Status.
The status is shown for the EI Agents where the policy is deployed.
- Not Deployed: No data policies are deployed on the EI Agent.
- All Running: All data policies on EI Agent transferring data from assets to destinations.
- Some Running: Not all data policies are transferring data.
- Error: All data policies deployed on this EI Agent are in error state and data is not flowing for any configured assets.
- Unknown: The EI Agent is offline. The policy status cannot be retrieved.
Edit a Data Rule
Note: A rule cannot be edited if it is active on any EI agents. To edit a rule, undeploy it from all EI agents.
- From the left menu, click Data Policies > Data Rules.
- In the Data Rule entry, click the name of a Data Policy.
- Click Edit in the details page to change the policy. Click Save.
Delete a Data Rule
Note: A rule cannot be deleted if it is active on any EI agents. To delete a rule, undeploy it from all EI agents.
- From the left menu, click Data Policies > Data Rules.
- Select the checkbox for the Data Rule you want to delete.
- Click Delete.
- In the warning pop-up, click Yes.