Create a Rule¶
Rules can be created for an asset type. This means, you can create a rule one time and use the same rule definition for all instances of this asset type.
Rule can be created from the below two screens:
- Open "Rules" in "Configure" section and click Create, where you can also find all the rule definitions in the environment.
- Open "Assets" in the Explore section and select the "Rules" plugin, click "Create". Here you can create a rule directly for the selected asset. In this case the asset type and the asset instance is already preselected in the wizard.
The rule query enables you to create a new rule and enter the individual parameters.
The rule wizard guides you through the below steps to create a rule.
Parameter overview of rule query¶
The following table describes the parameters for defining rules:
In this step, you select the asset type, up to 3 Variables to be monitored, and the assets, the rule shall be activated. For Consumption data, one rule is calculated for each selected asset.
In this step, you can change the operators and thresholds and also configure hysteresis or debouncing time if needed. Follow the info pictures for more information.
- A description is mandatory for the event which will be triggered by the rule. Also the severity of this event can be configured (Information, Warning, Error).
- You can limit the events, that not every rule violation leads to an event.
- Also you can set actions to influence the asset status or send an email. Multiple emails can be inserted. Confirm each valid email-address with 'Enter'.
- Optional you can enable the "Notify by Simatic Notifier" button to receive the notifications in the Simatic Notifier application on mobile devices.
An additional SIMATIC Notifier license is required in order to receive the push notifications on mobile devices. To buy a notifier license, please refer to SIMATIC Notifier documentation.
Configure rule name:
In this step, you configure the name of the rule. It is also possible to automatically generate the Rule name based on the selected variables and the conditions. To automatically create a name, click Generate.
Click "Submit" to save the Rule.
If the rule query screen does not display the "Set asset state" selection under "Additional actions", this may have the following cause:
- The asset does not have an aspect with name "status" of type
core.assetstatus. For your own asset types you could add this status aspect by using Asset Manager.
Copy a Rule¶
Insights Hub Monitor will allow the users to save a copy of the existing rules and reuse them for their assets. When a rule is copied, all the information in the rule will be copied, the users can make the necessary changes as per their choice and use these rules.
To copy the rules, proceed as follows: 1. Select the rules of your choice from the "Rules" overview page.
2. Click and select "Copy".
"Copy a rule..." window opens. By default, the same variables, conditions and actions are applied on the copied rule, if you want to make any changes to these variables, conditions or actions, refer to the procedural steps 1 to 3 from the section "Parameter overview of rule query".
3. Configure the name of the rule as per your choice.
By default, the same name of the rule will be copied.
4. Click "Copy".
The copied rule will be available in the "Rules" overview page.