Analytic Templates are pairs of commands that originate in Command Templates. The command pairs are shown as Pre and Post on the app interface. Unlike Command Templates, the Analytic Templates do not run commands on devices at execution time, but instead utilize responses that have been collected at earlier automation stages by the Command Templates. The output of the Pre and Post commands in Analytic Templates is evaluated against each other according to a set of associated analytic rules.
- Working NSO instance.
- At least one device with a live-status capable NED. Netsim devices may not work.
itential_toolsNSO package pre-loaded.
For information on how to import, export and delete Analytic Templates, see the Automation Studio Overview.
Using Analytic Templates
The following steps outline how to view, create and use Analytic Templates:
- When prompted add a template name and click SAVE (required).
- Select the global pass flag (All/One commands must pass).
- Enter the device name in the search field (upper right) to select a device.
- Select the appropriate Pre Template and Post Template from the dropdown list.
- Select the appropriate command pair (Pre and Post Command) to test against the device.
- Click Add Command Pair to add a new command pair.
- Select the appropriate rule to apply to the command pair.
- Click Add Rule to add a new rule to a command.
- Select the severity.
- Click Test Run. After evaluating the response, the associated rules will be marked with either a green check mark (passed) or red minus sign (failed). The device response will appear at the bottom of the screen.
Defining Analytic Templates Rules
The following rules apply.
||Allows you to extract specific values (using parentheses) and compare them against each other with one of the following relationships. See below for operators.|
||Allows the extraction of key and values from the table dataset, and then compares if all keys and values are the same. It is useful for datasets that may change their order.|
||Compares the Pre and Post responses entirely. This rule passes when both responses are equivalent. Under the ignore pattern, it is possible (not mandatory) to specify a regular expression to be ignored during comparison (time stamp in the use case below).|
||Compares the Pre and Post responses entirely. This rule passes when the responses are different. Under the ignore pattern, it is possible (not mandatory) to specify a regular expression to be ignored during comparison.|
|=||String. Numbers are equal.|
|!=||String. Numbers are not equal.|
|<=||Pre-number is less than or equal to Post-number.|
|<||Pre-number is less than Post-number.|
|>=||Pre-number is greater than or equal to Post-number.|
|>||Pre-number is greater than Post-number.|
|%||Evaluates a percentage value calculation against a threshold. The percentage value is calculated by multiplying 100 times the Post-Regex value divided by the Pre-Regex value: 100 x (Post-Regex / Pre-Regex). The threshold is a static number typed in the Post/Pre % field. The rule returns true if the calculated percentage value is greater than or equal to the threshold; otherwise it returns false.|