Manage Rules
Read these topics to understand how to manage rules.
You can upload a custom rule in JSON format, download a rule, add tags to a rule, view specific rules, enable a rule for recommendation, enable auto mode for a rule, and delete a rule from the Observability > Health > Smart KPI Assistant > KPI Workspace > Rules > List of Rules tab.
Upload a Custom Rule
You use a custom rule to define key performance indicators (KPIs). You can organize these rules into rule instances and apply the rules to devices. You can upload a custom rule in the JSON format from the Rule List Tab.
To upload a custom rule:
Navigate to the List of Rules tab.
Click Upload Rule.
The Upload Rule page appears.
Note:Fields marked with an asterisk (*) are mandatory.
Select a name from the Topic Name drop-down list. Available options are: custom, custom.hardware, custom.interfaces, and custom.routing.
A topic helps to logically group similar custom rules and these rules are displayed under the corresponding accordion in the Device-Name page (Observability > Health > Troubleshoot Devices).
Click Rule File and navigate to location of the rules file on your local file system.
A rules file is a custom rule defined with the help of Juniper Networks Professional Services.
Click Open after you select the rules file.
The Upload Rule page appears.
Click Upload to upload the rule.
The List of Rules tab appears and displays the newly added custom rule.
Download a Rule
You can download an existing system or custom rule in the JSON format from the List of Rules Tab.
To download a rule:
Navigate to the List of Rules tab.
Select the rule that you want to download by clicking the check box next to the name of the rule, and click Download.
The rule is downloaded and saved in your local file system.
Add Tags to a Rule
You can add tags to both system and custom rules. A tag is a label (unique key/value pair) that you assign to a rule. You can use these labels to filter rules.
To add a tag to a rule:
Navigate to the List of Rules tab.
Select the rule that you want to add a tag to by selecting the check box next to the name of the rule.
Click More > Manage Tags.
The Manage Tag page appears.
Select the tags that you want to add to the rule from the Tags drop-down list.
Alternatively, you can also create a new tag. To create a new tag:
Click Create New Tag +.
The Create Tag page appears.
Enter a name for the tag in the Tag field.
You must add tags in the key:value format where both are text separated by a colon. A key must start with a letter and must be followed by letters, numbers, periods (.), hyphens (-), or underscores (_). A key must be between 1 to 200 characters long. A value can include alphanumeric characters, periods (.), hyphens (-), and underscores (_). A value must be between 1 to 200 characters long.
Click OK to create the new tag.
The new tag is automatically added to the Tags drop-down list on the Manage Tags page.
Click OK on the Manage Tags page to add the tag(s) to the rule.
The List of Rules tab appears and displays the newly added tags in the rule.
View Specific Rules
You can view specific rules from the List of Rules tab
To view a specific rules:
Navigate to the List of Rules tab.
- Select a rule type from the Rule Type drop-down
list—system or custom.Note: You can select system, custom, or both the options from the rule type drop-down list.
- Select one or more rule topics from the Rule Topic drop-down list—interfaces, routing, hardware, or miscellaneous.
Once both the rule type and rule topic are selected, click View to view the specific list of rules.
The list of rules is filtered and now displays only the specific list of rules as per your selection.
Click Clear to clear the selection.
Enable a Rule for Recommendation
You can enable a rule for recommendation from the List of Rules tab
You must be a user with Network Admin or Super User role to enable or disable a rule.
To enable a rule for recommendation:
Navigate to the List of Rules tab.
Select the rule that you want to enable for recommendation by clicking the check box next to the name of the rule.
Click More > Enable for Recommendation. The rule is now enabled for recommendation.
A message is displayed confirming that the rule is updated successfully.
(optional) If a rule is already enabled and if you do not want to recommend this rule, click More > Disable for Recommendation.
Notifications are generated when there are updates to recommendations or when there is a change in the detected interface role. Enabling or disabling a rule for recommendation may not result in a change of recommendation and hence does not generate a notification. The generated notifications are visible in the Notifications (Bell) icon visible in top-right corner of the GUI. Click the Notifications (Bell) icon to view the list of notifications that are generated. To clear all the notifications, click the Dismiss All option.
Enable Auto Mode for a Rule
You can enable auto mode for a rule in the List of Rules tab.
To enable auto mode for a rule:
Navigate to the List of Rules tab.
Select the rule that you want to enable for auto approval by clicking the check box next to the name of the rule.
Click More > Turn on Auto Mode.
Auto mode is now enabled for the rule. A message is displayed confirming that the rule is updated successfully.
(optional) If a rule already has auto mode enabled, click More > Turn off Auto Mode to disable the auto mode.
For the rules with auto mode enabled, the respective KPI recommendations generated are automatically approved by Routing Director and does not require any manual approval. The generated KPI recommendations for a device are listed in the KPI Recommendations tab. For more information, see About the KPI Recommendations Tab.
You can enable a rule for recommendation and auto mode only if the rule has an associated domain. If a domain is removed from the rule, then the rule will be disabled for recommendation.
Edit a Rule Variable
You can edit a rule variable (also referred to as threshold value) from the List of Rules tab.
If you edit a rule variable, then the updated rule variable value takes effect from the next data point that is received from the device.
To edit a rule variable:
Navigate to the List of Rules tab.
Select the rule that you want to edit by selecting the check box next to the name of the rule, and click the Edit (Pencil) icon.
The Edit Rule pop-up appears.
Update the required variables under the Rule Variables accordion and click Save to save the rule variable.
The List of Rules table appears.
Note: If you want to reset the values of the edited rule variables to the default values, then click Edit > Reset Value and click Save.
Delete a Custom Rule
You can delete a custom rule from the List of Rules tab. Before you delete a rule, you must ensure that the custom rule that you want to delete is not added to any rule instance. If the rule is enabled for recommendation, disable the rule so that the system can automatically remove all the instantiations that it has done.
To delete a custom rule:
Navigate to the List of Rules tab.
Select the custom rule that you want to delete by selecting the check box next to the name of the rule, and click the Delete (Dustbin) icon.
The Confirm Delete pop-up appears.
Click Yes to delete the rule.
The rule is deleted and removed from the List of Rules table.