0% found this document useful (0 votes)
24 views275 pages

NetBrain R11.1b Automation Tutorial

The NetBrain® Next-Gen R11.1b Automation Tutorial provides comprehensive guidance on creating and managing Network Intents (NIs) for network automation and troubleshooting. It covers various topics including intent-based automation flows, data parsing, diagnosis definition, and continuous network assessment using Automation Data Tables (ADT). The tutorial is designed for users to efficiently define, execute, and replicate intents across their network to ensure operational compliance and performance monitoring.

Uploaded by

pccw.charles
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views275 pages

NetBrain R11.1b Automation Tutorial

The NetBrain® Next-Gen R11.1b Automation Tutorial provides comprehensive guidance on creating and managing Network Intents (NIs) for network automation and troubleshooting. It covers various topics including intent-based automation flows, data parsing, diagnosis definition, and continuous network assessment using Automation Data Tables (ADT). The tutorial is designed for users to efficiently define, execute, and replicate intents across their network to ensure operational compliance and performance monitoring.

Uploaded by

pccw.charles
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NetBrain® Next-Gen R11.

1b
Automation Tutorial

Version R11.1b | Last Updated 2025-03-27


Copyright ©2004-2025 NetBrain Technologies, Inc. All rights reserved.
Contents

1 Introduction ............................................................................................................................................................. 7

1.1 What is Network Intent? .................................................................................................................................... 7

1.2 Intent-Based Automation Flow....................................................................................................................... 10

1.2.1 Intent-Based Collaborative Troubleshooting ...................................................................................... 10

1.2.2 Continuous Network Assessment via ADT .......................................................................................... 12

1.3 How to Use This Tutorial? ............................................................................................................................... 14

2 Create Your First Network Intent (NI) ................................................................................................................. 15

2.1 Create an NI to Check NTP Server Configuration ........................................................................................ 15

2.1.1 Define Basic Info..................................................................................................................................... 15

2.1.2 Define Variable with Visual Parser ....................................................................................................... 16

2.1.3 Define Diagnosis .................................................................................................................................... 19

2.1.4 Execute NI ............................................................................................................................................... 21

2.2 Clone NI ............................................................................................................................................................. 22

2.2.1 Intent Replication Wizard ...................................................................................................................... 22

2.2.2 Clone and Run Intent on Map............................................................................................................... 28

3 Parse Data with No Code ..................................................................................................................................... 32

3.1 Auto Parser ....................................................................................................................................................... 35

3.1.1 Parse “show version” in Auto Parser mode ........................................................................................ 36

3.2 Single Variable Parser ...................................................................................................................................... 43

3.2.1 Parse "ping [Link]" .............................................................................................................................. 43

3.3 Variable Types .................................................................................................................................................. 45

3.3.1 Use of String Variable ............................................................................................................................ 46

3.3.2 Use of Multi-string Variable .................................................................................................................. 46

2 | NetBrain R11.1b
3.3.3 Use of Integer Variable .......................................................................................................................... 47

3.3.4 Use of Float/Double Variable ................................................................................................................ 47

3.3.5 Use of Boolean Variable ........................................................................................................................ 48

3.3.6 Use of Enumeration Variable ................................................................................................................ 48

3.3.7 Dummy Variable ..................................................................................................................................... 51

3.4 Paragraph Parser ............................................................................................................................................. 51

3.4.1 Parse “Show Interface” .......................................................................................................................... 51

3.4.2 Use Special Characters (^ and $) in Paragraph Parser ...................................................................... 54

3.4.3 Use the Start Line and End Line in Paragraph Parser........................................................................ 54

3.5 Table Parser ...................................................................................................................................................... 57

3.5.1 Parse “show ip route summary” ........................................................................................................... 57

3.6 Advance Parser................................................................................................................................................. 59

3.6.1 Collector Parser ...................................................................................................................................... 59

3.6.2 JSON Table............................................................................................................................................... 61

3.7 Variable Operators........................................................................................................................................... 66

3.7.1 Match LineByVariable ............................................................................................................................ 66

3.7.2 Match LinesByKeyword ......................................................................................................................... 69

3.8 Parse Configuration ......................................................................................................................................... 71

3.8.1 Parse OSPF Configuration ..................................................................................................................... 72

3.8.2 Parse Interface configuration ............................................................................................................... 74

3.8.3 Parse all routing configure (OSPF and BGP) in one table .................................................................. 77

3.8.4 Parse access-list configure (paragraph-in-paragraph) ...................................................................... 79

3.8.5 Parse all prefix-list config into a table.................................................................................................. 81

3.9 Use Existing Parser .......................................................................................................................................... 84

4 Define Diagnosis ................................................................................................................................................... 86

4.1 Define Diagnosis for a Single Variable .......................................................................................................... 86

NetBrain R11.1b | 3
4.1.1 Selecting the Device and Parser ........................................................................................................... 86

4.1.2 Define If Condition for a Single Variable ............................................................................................. 88

4.1.3 Define Intent Output.............................................................................................................................. 89

4.1.4 Run the intent and View the Result...................................................................................................... 92

4.2 Define Diagnosis for a Table........................................................................................................................... 94

4.2.1 Define Basic Info and Variables with parser ....................................................................................... 94

4.2.2 Define Diagnosis to compare Table Current data with Baseline data............................................. 98

4.2.3 Loop Through a Table .......................................................................................................................... 105

4.3 Compound Table and Other Table Operations.......................................................................................... 113

4.3.1 Define Basic Info and Variables with parser ..................................................................................... 113

4.3.2 Merge Tables ........................................................................................................................................ 117

4.3.3 Filter Table............................................................................................................................................. 120

4.3.4 Define the Intent Diagnosis using the merged table ....................................................................... 122

4.3.5 Execute the Intent Diagnosis: ............................................................................................................. 124

5 Replicate Intents Across Your Network ............................................................................................................ 126

5.1 Replicate Intents for Auto Intent .................................................................................................................. 126

5.1.1 Configure Auto Intent .......................................................................................................................... 126

5.1.2 Run the Auto intent: ............................................................................................................................. 137

5.1.3 View the diagnosis Results: ................................................................................................................. 140

5.2 Support Multi Vendors (Device Types) ........................................................................................................ 142

5.2.1 Define Basic Info................................................................................................................................... 142

5.2.2 Define CLI Command and Retrieve Data........................................................................................... 143

5.2.3 Define Diagnosis .................................................................................................................................. 146

5.2.4 Replicate NI for the auto intent: ......................................................................................................... 148

5.2.5 Cloning the Intent and Run ................................................................................................................. 157

6 Manage Network Automation with ADT .......................................................................................................... 161

4 | NetBrain R11.1b
6.1 ADT Overview ................................................................................................................................................. 161

6.2 Create Your First ADT .................................................................................................................................... 162

6.2.1 Build Base Table ................................................................................................................................... 162

6.2.2 Add the Automation Column by Intent Replication Wizard ............................................................ 168

6.2.3 Run and Pop Automation Results to ADT Table ............................................................................... 173

6.3 Build ADT from Intent Template .................................................................................................................. 175

6.3.1 Create Network Intent ......................................................................................................................... 176

6.3.2 Use Intent Replication Wizard to add Intent to the ADT Table ....................................................... 182

6.3.3 Open and Edit ADT Table .................................................................................................................... 186

6.4 Create ADT Base Table from CSV File .......................................................................................................... 189

6.5 ADT Dataset .................................................................................................................................................... 192

6.5.1 Why do you need this feature? ........................................................................................................... 192

6.5.2 Main User Flow ..................................................................................................................................... 193

7 Intent-Based Network Assessment .................................................................................................................. 194

7.1 Assess the Existence of a Specific Route. .................................................................................................... 194

7.1.1 Create a Device Group for All Cisco Routing Devices ...................................................................... 195

7.1.2 Create Map Intent to Check If Specific Route Exists in Route Table .............................................. 195

7.1.3 Run Map Intent ..................................................................................................................................... 204

7.1.4 Use Intent Replication Wizard to Replicate Intent in ADT ............................................................... 205

7.1.5 Run Once for the ADT Automation Column...................................................................................... 208

7.1.6 Create Intent Dashboard for ADT Automation Column .................................................................. 209

7.1.7 Export Diagnosis Result to CSV .......................................................................................................... 212

7.2 OSPF Neighbor Stability Check ..................................................................................................................... 213

7.2.1 Create Signature Variables of an Intent ............................................................................................ 214

7.2.2 Add Signature Variables to ADT Base Table...................................................................................... 221

7.2.3 Create Network Intent for OSPF Neighbor Stability Check ............................................................. 227

NetBrain R11.1b | 5
7.2.4 Populate the Automation column via Intent Replication Wizard ................................................... 236

7.2.5 Run Once Intents of an ADT Automation Column ........................................................................... 240

7.3 Built-in IBNA Library ...................................................................................................................................... 241

8 Follow-up Diagnosis............................................................................................................................................ 242

8.1 Follow-up Intent Template ............................................................................................................................ 242

8.1.1 Configure Follow-up Network Intent ................................................................................................. 242

8.1.2 View Follow-up Intent Results............................................................................................................. 245

8.2 Follow-up Self ................................................................................................................................................. 247

8.2.1 Configure Follow-up Self Intent .......................................................................................................... 247

8.2.2 View Follow-up Intent Results............................................................................................................. 249

9 Troubleshoot Application Path ......................................................................................................................... 251

9.1 Create ADT Base Table from Path Browser ................................................................................................ 252

9.1.1 Define and map a path from the path browser. .............................................................................. 252

9.1.2 Create the ADT base table from the path browser. ......................................................................... 254

9.2 Define a Path Intent (Path Next Hop Stability Check) ................................................................................ 256

9.2.1 Populate the Automation Column via Intent Replication Wizard .................................................. 263

9.2.2 Run Once for the ADT Automation Column...................................................................................... 265

9.3 Define Path Intent (Path Delay Stability Check).......................................................................................... 266

9.4 Dashboard ...................................................................................................................................................... 268

9.4.1 Intent Dashboard ................................................................................................................................. 268

9.4.2 Summary Dashboard........................................................................................................................... 271

9.5 Execute Path Intent with Intent Timer......................................................................................................... 273

6 | NetBrain R11.1b
1 Introduction

1.1 What is Network Intent?

Network Intent (NI) is an automation construct that allows users to define expected design and
operational state. It establishes a baseline configuration and operational state to validate the
network design. Further, users can run NIs to simply detect design and operational deviations
during the troubleshooting or set up the scheduled task to run a set of NIs to assess the whole
network.

A standard NI has the following key components:

• Device(s): An intent is specific to a device or a set of devices. The intent is designed this way
so that it can include the current, last, and baseline data.

• Raw data: The data can be retrieved from devices by the CLI, SNMP, and API.

• Parser: The Visual Parser transforms the raw data into structured datasets. These datasets
serve as the input for the diagnosis. Visual Parser is the UI-based for users without any
programming language to create one.

• Diagnosis: The diagnosis defines rules or conditions to evaluate different aspects of the
network and the status code (the output) for different conditions. Users can then specify the
appropriate actions or recommendations to be executed based on the status codes.

So, an NI takes a device and a command (CLI/SNMP/API) as the input, retrieves data from the live
network or database, parses the data into the structured datasets (variables), runs the diagnosis
on these variables, and outputs the network status (error/warning/info).

The following are some examples of NI:

• Enforce configuration compliance and prevent configuration drift. For example, you can
create an NI to ensure that an access list is configured in all Cisco firewalls.

NetBrain R11.1b | 7
• Continuously monitor the operational status. For example, you can create an NI to monitor
the CRC errors of interfaces and issue a warning if the CRC error increases by a certain
number.

• Check the compatibility of network neighbor devices. For example, you can create an NI to
ensure that the duplex modes of the neighbor interfaces are the same.

Multiple NIs can be grouped to form a diagnosis flow. Users can define follow-up NIs in the
Diagnosis so that these NIs can be executed under certain conditions. For example, users can
add Check duplicate router ID and Check EIGRP neighbors as the follow-up NI if the EIGRP routes
change. An Intent can also call itself as a follow-up intent (follow-up self), so the system will jump
into other devices to execute the same defined logic as the original intent. For example, users
can create an intent to check the BGP neighbor status and call itself for its BGP neighbors. This
follow-up intent can be recursively called till no neighbor is found or it reaches a user-defined
depth.

The execution results of a parent NI and its follow-up NIs are displayed in a diagnosis tree:

8 | NetBrain R11.1b
An intent (seed NI) can be cloned for all qualified devices through the whole network or as a set
of network devices via an Intent Replication Wizard. An Intent Template (NIT) will be defined
for this purpose, including the definition of the target devices, rules to replace the Macro
Variables, etc.

NetBrain R11.1b | 9
1.2 Intent-Based Automation Flow

1.2.1 Intent-Based Collaborative Troubleshooting

The collaborative troubleshooting workflow starts with mapping the problem area. Different
levels of users can create intents via the Quick Intent tab within the map and run intents to
troubleshoot the same problem. The active diagnosis results and the relevant triggered event
results can be shared in a Summary Dashboard, which summarizes the results of groups of
intents.

After mapping out the problem area, a user can leverage the Quick Intent tab inside the map to
quickly define an intent for a map device by following three steps: collect the data, define the
logic, and run the intent. Users can repeat these three steps till they are satisfied with the results.
An intent can be scheduled to run (e.g., run every minute for 20 times) to troubleshoot a
transient problem.

10 | NetBrain R11.1b
The final quick intent can then be replicated for all devices on the map. The cloned intent can be
saved as a map intent or path intent, and the result can be displayed on the map or in the
Intent Dashboard.

Different users at different levels can create many intents with Quick intents to troubleshoot the
same problem. The Intent Dashboards from these intents can be added to a Summary
Dashboard with other intent results triggered by a ticket system.

The final output of the collaborative workflow is the Summary Dashboard, with each row as a
diagnosis activity and each column as a device.

NetBrain R11.1b | 11
1.2.2 Continuous Network Assessment via ADT

The Automation Data Table (ADT) is a key component of the continuous network assessment
across your whole network. ADT includes the critical assets (such as critical Application and
Path, WAN Link, Device Failover, and Subnet) and associated intents and results, which can be
scheduled to run in the network assessment. Further, ADT can store the dataset, which can be
used to replicate, decode, and execute the intents without touching the network network.

ADT base table, which includes the assets, can be built from the device group, sites, application
table, intent template, imported files, etc. The Column group, which is associated with the intent
and results, can be created primarily from the intent template.

In the continuous assessment workflow, the data is collected through the benchmark and saved
in the ADT dataset. The ADT dataset is used to decode, replicate and run intents.

12 | NetBrain R11.1b
The results of the continuous assessment are presented in the Summary Dashboard. The
dashboard displays the key metrics, the top devices with the most alerts, and the detail charts,
with each row as an assessment point and each column as the alert counts for a device group or
site.

NetBrain R11.1b | 13
1.3 How to Use This Tutorial?

In this tutorial, you will learn the key concepts of NetBrain Intent-Based Automation with
simple and useful examples. As you progress through the tutorial, you will understand concepts
of parsing, creating diagnosis logic, replicating the intent to other devices and so on listed below:

1. Searching for and Mapping Devices.


2. Creating a Quick Intent.
3. Building a Visual Parser (Table) to parse CLI Command Response.
4. Creating Diagnosis logic based on parsed variables.
5. Saving a Quick Intent as a Map Intent.
6. Scheduling an Intent to execute automatically using Schedule Run.
7. Monitoring Intent Execution with a Dashboard.
8. Creating a Network Intent with multiple vendor seed devices.

9. Replicating the intent to different vendors with different CLI commands by using the Intent
Parser Qualification function and filtering Intent Parsers as per different Vendor Devices.

10. Viewing the results on a dashboard and setting an email notification when an alert is
generated without creating reports.

The best way for you to learn is to follow the examples step by step. You can practice using your
own NetBrain system.

NOTE: This automation tutorial is designed for version R11.1b. If your NetBrain system has been
upgraded to a later version, refer to Netbrain Automation Cookbook for the
corresponding documentation.

14 | NetBrain R11.1b
2 Create Your First Network Intent (NI)

2.1 Create an NI to Check NTP Server Configuration

In this session, you will create your first Network Intent, which will retrieve and parse the
configuration file to find out whether an NTP server is configured in a device. The steps to define
an intent:

1. Define the basic information such as name, description, target device, and command.

2. Define the variables from the command results.

3. Define the diagnosis of the variables.

4. Execution of the Intent.

2.1.1 Define Basic Info

Start with choosing a device and retrieving the CLI/Configuration information before going ahead
to configure the intent as follows:
1. On the Netbrain desktop, search the device hostname, PE-3600X-02 in the search bar.
2. In the results device section, click Map to draw the device to the current map (the system
automatically creates a new map if no map is opened).
3. Close the search results window.

NetBrain R11.1b | 15
4. Open the Intent pane in the map and go to the Quick Intent tab in the Intent Section.

5. Select the Configuration file from the drop-down menu to collect data.

6. Click Retrieve to parse the data.

2.1.2 Define Variable with Visual Parser

Defining variables is simple with Quick Intent using the auto-parser feature. Entry-level users
can quickly learn and utilize the parser. The system will automatically select the appropriate
parser mode (single or multiple) based on input words. Once the auto-parser completes the
parser definition task, you can add additional variables or make small adjustments to the line
pattern to achieve the desired result. You can define a variable with the following steps:

1. In the Data and Parser pane, add a New Parser using the option available in the Parser
field drop-down menu.

16 | NetBrain R11.1b
2. A window New Parser will appear for creating a parser with the retrieved data under the
Format1 tab.

NOTE: You can edit this sample data depending on the use case using the option Edit
Sample under the Format1 drop-down menu.

3. In the Sample Data, from the ntp server line (you can search the word ntp to find the line),
select the text [Link] and click Parse Variable in the tip window. You can also double-
click the text to get the same result.

NetBrain R11.1b | 17
4. Change the Type to Single.

NOTE: A device can have multiple NTP servers. To make our first intent simple, we make this
variable single, which is good enough for the purpose of this intent since the intent
ensures that any ntp server is configured. The system will match the first line.

5. Modify the line variable pattern to “ntp server $mstring:ntpserver”

NOTE: The created variables will appear under the Parsed Result section. The variable
name is defined as $<type>:<variable_name>. The default variable type is string,
and the type mstring is a string with spaces.

6. Click OK to save and close the window.

18 | NetBrain R11.1b
2.1.3 Define Diagnosis

After configuring the variables, the most important part is to define the diagnosis logic with
success and failure results as detailed below:

1. Under the Quick Intent pane, click the Add to Intent>> button.

NetBrain R11.1b | 19
2. Go to the Define Logic section to start defining the diagnosis logic.

3. Enter the diagnosis name ntp_check.

4. Anchor: Select the variable $ntpserver from the drop-down menu.

NOTE: Anchor helps when viewing the resulting diagnosis. It will draw a line from the
diagnosis message to the variable you select as the anchor.

5. If condition: Write a condition as what if variable ntpserver is empty.

6. Then: Define a color (red), message and status (Error) in case If condition is satisfied as
$this_device is not configured with NTP. Check both checkboxes, Set Status for Device
and Set Status for Intent.

Note: type the special character $ and select the variable available from the popup window.
The system will replace the variable with the value when the intent is executed.

7. Else: Define a color, message and status in case If condition is not satisfied as $this_device
is configured with NTP.

8. Click on Create to save and create the intent.

20 | NetBrain R11.1b
2.1.4 Execute NI

With the successful collection of data and logic defined, the very next and easy step is to run the
intent created and save it. To execute the intent:

1. Go to the Run Intent pane and click Run to execute the diagnosis.
2. Upon completing the diagnosis by the system, the following result will appear:
• Intent execution date and time.
• Success/Failure message and status as defined in Then and Else conditions.
3. Save the map before proceeding to save the intent to Map.
4. Save this temporary intent as Map Intent using the option Save to Map Intent located
under the Save to drop-down menu.

5. Save to Map Intent interface appears. Choose an appropriate location and click OK to save
and close the window.

Congratulations! You just created your first intent. Let us summarize the key steps to create an
intent:
• Created the parser with the Visual Parser.
• Defined logic and output for the intent diagnosis
• Executed the intent and saved it as a map intent.

NetBrain R11.1b | 21
2.2 Clone NI

Now, clone the created intent to a set of devices using Auto Intent Wizard. This process involves
the following steps:

1. Define the qualification of devices for cloning the Intent

2. Decode the intent

3. Executing the intent on Map

2.2.1 Intent Replication Wizard

To replicate the intent to other selected devices, go to the Map Intent tab and do as follows:

1. From the menu, Select Auto Intent Wizard to open the interface.

22 | NetBrain R11.1b
[Link] Intent Template Settings

The most important step in replicating the intent is to choose seed intent, target devices and
replication settings. These can be configured under the Intent Template section as follows:

1. Seed Intent: By default, the map intent is chosen to be the seed intent. You can change the
seed intent by clicking Select and choosing a seed intent.

2. Intent Template for: Enable Device-based Replication as we want to replicate the intents
on Cisco Switches and routers.

3. Intent Qualification: Define the criteria to qualify the devices for replicating the intent.

a. Define the Intent qualification via Dynamic Search: click Undefined to open the
Qualified Device selection window. Filter the options in A as Device Type Matches any
Cisco Router/Cisco IOS Switch.

NetBrain R11.1b | 23
Note: If too many devices are listed under the device list, use the search option to filter
out the Cisco devices and check in the items.

b. Fill A in the Boolean Expression field.

c. Click Search to see the total count of qualified devices.

d. Click OK to save the selected qualified devices.

24 | NetBrain R11.1b
4. Click and open Full Settings for Intent Template to set the critical variables.

a. To match the qualified devices with the seed device parsers, you can select either
Automatically Select All Diagnosis Variables (you can use this option for most NIs) or
manually select certain critical variables and CLI commands.

b. Select the Manually Select option.

c. Click 2 Variables Selected available under the Critical Variables column and uncheck
the ntpserver variable.

NOTE: If the ntpserver variable is selected, the devices without the ntp server
configuration will not be qualified for diagnosis. We do not want this option since
we want the intent to create an error if no ntp is configured.

d. Click OK to save and close the window.

5. Click Next to go to the Pre-Decode tab.

NetBrain R11.1b | 25
[Link] Decode Intent

For every NIT, you need to choose a location for saving and then proceed to decode into the
devices as follows:

1. Select the Group to which you want to add the intent and click Decoding Settings to open
the data source selection.

2. Choose the data source Current Baseline, and click OK.

3. Click Decode Now to decode the seed intent for all the qualified devices.

CAUTION: Decoding will take a few seconds to a long time, depending on the number of
devices to be decoded. Use the refresh option and make sure decoding is
completed. Upon completion, the decoding Status will be indicated as last
decoded at 05:08 PM 10/04/2023.

NOTE: The output field will indicate the number of devices decoded for this intent.

4. Click Next to go to the Auto Intent tab.

26 | NetBrain R11.1b
[Link] Auto Intent Settings:

Choose a location folder to save the replicated intent as Auto Intent as detailed below:

1. Enable the radio button of Enable for Auto Intent.

2. Select a folder to save the Auto Intent.

3. Add a description of the Auto Intent.

4. Click Select Profile and choose a profile to categorize this intent.

5. Click Finish to close the Intent Replication Wizard.

6. A confirmation window will appear to save the Auto Intent Settings. Click Yes to save and
close the window.

NetBrain R11.1b | 27
2.2.2 Clone and Run Intent on Map

[Link] Cloning the Intent and Run

To clone the intent on the neighboring devices of a map, do it as follows:


1. Left-click on the located on the device drawn to the map.
2. Check-in all the neighbor devices to which you need to clone the intent.
3. Click Add to Map, and all the selected devices will be drawn on the map.
NOTE: All the qualified selected devices will appear in the Auto Intent pane in the
order of intents.

4. Select the check box of the intent NTP Server Configuration Check and the devices listed
underneath.
5. Click Replicate to copy the intent to the selected devices.

28 | NetBrain R11.1b
6. A new section, Preview Intent, will appear on the right side with the devices and intent
diagnosis successfully replicated.

7. Click Run to execute the intent diagnosis on all the devices.

8. The result for each device will be displayed as you have programmed in the Section Define
Diagnosis.

NetBrain R11.1b | 29
[Link] Diagnosis Tree

Click in the Temporary Intent section to view the diagnosis tree. It includes the following
details as shown in the figure:

• Current NI medium,

• Execution date and time,

• Displays the diagnosis tree in Pre-Execution and Post-Execution mode,

• Displays the status of execution in each device with color legends.

30 | NetBrain R11.1b
[Link] View on Context Map

The result of the intent execution can be visualized in a map by selecting the button located
under the Run option in the Temporary Intent section. The device status codes defined in the
intent diagnosis will be displayed under the device.

Kudos! You have successfully cloned and executed the intents on a set of devices using Auto
Intent Wizard. To recap the procedure, you completed the following:

1. Created a quick intent using an auto parser.

2. Defined the logic and output in the intent diagnosis.

3. Executed the intent and saved it to MAP.

4. Define the qualification of devices for cloning the Intent using Auto Intent Wizard.

5. Decoded the intent to the target devices and executed the intent on Map.

6. Viewed the intent results on the map and diagnosis tree.

NetBrain R11.1b | 31
3 Parse Data with No Code
In the last chapter you learned how to create your first NI from the map via Quick Intent. The
creation of NI has two key steps:

1. Define the variables from the command results.


2. Define the diagnosis of the variables.

In this chapter, you will learn how to define the variables from the command results in detail.
The next chapter will cover how to define the diagnosis of the variables.

The Visual Parser converts plain text (such as device CLI command output, SNMP output,
configuration file text, or the data results from API) into programable variables, enabling "What
you see is what you can get" with no or little code. It allows network engineers without
programming experience to parse the configuration file, CLI command output, and SNMP/API
output.

Depending on the type of plain text and the purpose of an NI, you may define the following types
of Parsers:

Parser Usage Variable Output Example


Single Use Single Parse the output
variable of the CLI
Variable Line
Parser Command “ping
Pattern to
[Link]”. Define
parse a
a variable for the
variable within
success rate with
the full-text
round trip.
range or
multiple
variables in
one line of
text.

32 | NetBrain R11.1b
Table A Table Parser Parse the output
Parser transforms the of “show ip route
table-style text summary” of a
into a table router.
data structure.

Paragraph A Paragraph Parse the output


Parser Parser of “show
converts interface” to
variables define the line
across multiple protocol,
sections of the strategy, Input
raw text into a errors, and CRC
table data errors for each
structure. interface.
Collector A collector Parse the output
Parser Parser groups of “show log” to
variables by extract the alert
certain time for each
keywords and interface.
parses those
variables
based on the
grouping
results.
Json Table Json Table Parser the API
parser is used output to extract
to parse the cpu and
standard Json memory.
format text,
usually for the
output of an
API call.

Instead of the Quick Intent used in Chapter 2, we will use the Visual Parser editor to define the
Parser in this chapter.

Visual Parser is integrated into both Quick Intent and Full Intent Editor to define the variables
from the command results. Though you can access all the Parsers from the Parser Library by
default in the Quick Intent, you can access only verified parsers from the Parser Library in the
Full Intent Editor. If you want to access all the Parsers in the Full Intent Editor, you need to import
all the Parsers from the Parser Library.

NetBrain R11.1b | 33
Note: Creating new variables from both Quick Intent and Full Intent Editor are the same.

34 | NetBrain R11.1b
3.1 Auto Parser

When defining a new parser via the auto parser function, you do not have to create or select a
parser pattern first. The system will guess a suitable parser mode (single or multiple mode)
based on the words selected from the parser input. After most of the parser definition tasks
have been done by the auto parser, you can continue to add other variables or make
modifications to the line pattern to get the expected results. Auto Parser function can be used by
entry-level users to quickly learn and use the parser function without hinder.

When you select one or more words in one line and click Parse Variable to start auto parser.
You will observe whether the parser is in single or multiple mode depending on the number of
variable values matched.

Note: You have the choice to either select the Pattern manually or opt for the Auto Pattern
(default selection).

NetBrain R11.1b | 35
3.1.1 Parse “show version” in Auto Parser mode

Let us create an Auto Parser to extract device information, such as version numbers, from the
command “show version”. Follow the step-by-step instructions below:

1. On the NetBrain UI portal, click the icon.

2. Click the three-dotted menu and select New Parser from the dropdown menu. The Parser
Edit window opens with the default Parser name, Parser1.

3. Select a network device.

a. Click Select Device and the Select Device window appears.

b. In the search field, type the device name, e.g., US-BOS-R1, and then press Enter. You can
search the devices by Device Group and Site.

c. From the list, select the US-BOS-R1 device.

d. Click OK.

36 | NetBrain R11.1b
4. Retrieve the sample CLI data.

a. In the Select Data Source dropdown, select CLI Command.

b. In the Input or select a command textbox, enter the command, show version.

c. Click Retrieve to retrieve the data from the source that you have selected. By default,
Live Data is selected as the data source.

NetBrain R11.1b | 37
5. Parse the single variable.

The sample data:

US-BOS-R1#show version
Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.4(2)T4,
DEVELOPMENT TEST SOFTWARE
Technical Support: [Link]
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Thu 08-Oct-15 21:21 by prod_rel_team
ROM: Bootstrap program is Linux
US-BOS-R1 uptime is 3 weeks, 4 days, 11 hours, 15 minutes
System returned to ROM by reload at 0
System image file is "unix:/opt/unetlab/addons/iol/bin/L3_ADVENTERPRISEK9_M_15.4_2T.bin"

a. In the Sample Data, from line 2, select the software version 15.4(2)T4 and click Parse
Variable in the tip window. You can also double-click the version number to get the same
result.

The Var Line 1 is automatically parsed based on the selected text.

38 | NetBrain R11.1b
b. In line 9, select “3 weeks, 4 days, 11 hours, 15 minutes”, and then click Parse Variable in
the tip window.

The Var Line 2 is parsed based on the selected text.

c. Click the variable in the output pane to modify the variable names.

For example:
$Version -> version
$var1 -> uptime

NetBrain R11.1b | 39
d. Click Apply to create a pattern. The final output will be:

6. Define the parser qualification device type.

The Cisco Router has already been specified in the Parser Qualification due to the
selection of US-BOS-R1 during the retrieval process. You can define more device types using
the Device Type dropdown, for example, Cisco IOS Switch.

40 | NetBrain R11.1b
7. Save the Parser.
a. Click . The Save Parser window appears.
b. Save the Parser under the My Parser folder with the name show version.

NetBrain R11.1b | 41
How to access the Parser Library?

Follow the following steps to find the Parser Library to access the parser you just saved:

1. In the NetBrain UI portal, click the app menu.


2. In the Misc section, select the Parser Library, or you can search the Parser Library using a
keyword (e.g., par or parse).

In the All Parsers window, you can see Built-in Parser, Shared Parser, and My Parser. In the
My Parser folder, you can see the Parser you just created, show version.

Note: You can move a parser from folder My Parser to Shared Parsers in Tenant so that it
can be accessed by other users.

Congratulations! You just defined your first single variable parser. Let us summarize the key
steps to define the single variable Parser:

1. In the New Parser window, enter the CLI command, select Device and Retrieve Data.
2. From the Sample Data, select a specific text that you want to define Variable.
3. Modify the auto-created line pattern if necessary.
4. Verify the Parsed Result and save the Parser to the Parser Library.

42 | NetBrain R11.1b
3.2 Single Variable Parser

This section teaches how to define a single-value variable (such as ping [Link], etc.) via Variable
Parser by anchoring keywords before and after the Variable. Each Variable Line Pattern in a
Variable Parser can parse a variable within the full-text range or multiple variables in one line of
text.

Let us define single variables using the following examples.

3.2.1 Parse "ping [Link]"

Let us create a Single Variable Parser to parse the variable for system success rate and its round-
trip time in the form of min, avg, and max format.

1. Right-click the My Parser folder and select New Parser to create a new parser for command
ping [Link].

NOTE: Avoid using the New Advanced Parser, as it is outdated. This parser is retained
solely to be compatible with the old versions.

2. Select the device US-BOS-R1, enter the command ping [Link], and then click Retrieve Live
Data.

3. Click + New Pattern and select Single Variable from the dropdown menu. You can see that
the Var Line 1 appears in the Variable Definition Area.
4. Define a variable for the system success rate.

In the Sample Data, select the percentage figure (e.g., 40) and click Parse Variables.

5. Define a variable for the round-trip time.

NetBrain R11.1b | 43
In the Sample Data, select the text for round-trip time (e.g., 5/6/7), right-click, and then
click Add Variables.
You need to edit the variable line to create a valid variable reflecting the round-trip time. For example, replace
it with min/avg/max = $int:min/$int:avg/$int:max ms$. Here, $int:min, $int:avg and $int:max correspond to
the min, average, and max round trip time.

6. Verify the Parsed Result. The variable value corresponds to your sample data.
7. Click the variable in the output pane to modify the variable name.

For example: $percent -> success_rate

8. Click Apply to create the pattern.

9. Click to save the Parser under the My Parser folder with the name ping [Cisco IOS].

44 | NetBrain R11.1b
3.3 Variable Types

A variable is the most fundamental element of the visual parser, the value of which is the visual
parser aiming to parse.

The following table introduces the available data types of parser variables and their formats.
General Format: $variable_type:variable_name (exception: Enumeration).

Variable Description Variable Format


Type

String Match any string text. The default variable type. $string:var1 or $var1

Note: Space characters cannot be applied to a


string-type variable.

Multi-string Match one or multiple strings. $mstring:var2

Note: A multi-string variable cannot be followed


by another multi-string variable.

Intege Match any integer number. $int:var3

Float/Double Match any double-precision IEEE 64-bit (8-byte) $float:var4


floating-point number.

Boolean A variable with possible value options including $bool:var5


“true”, “false”, 1, or 0.

Note: Both "true" and "false" are case-insensitive.

Enumeration Match one of the listed options of a variable. $var6(value1|value2)

Note: Only the listed values can be successfully


parsed.

Dummy A placeholder for uninterested variables that will $type:_dummy


be ignored. You can use this special variable to
skip any variable you are not interested in.

Note: A variable name can only contain letters, numbers, and underlines and can only start with
a letter or underline.

Note: The variable types (Multi-string and Enumeration) are variants of string-type variables and
will be treated as a string in further automation.

NetBrain R11.1b | 45
3.3.1 Use of String Variable

A string variable is used to match any single word.

Let us use an example to check the configuration register value of a Cisco device. In the sample
data (show version), the configuration register value is represented as 0x2102, which is a string.
To replace this value, use the variable $string:register_value (or $ register_value since the default
variable type is the string).

3.3.2 Use of Multi-string Variable

A multi-string variable is used to match one or multiple words. A multi-string variable cannot be
followed by another multi-string variable.

Let us use an example of device uptime, where the uptime can include multiple words like “1
week, 9 hours, 55 minutes”. To define the uptime,

In the sample data (show version), select the device uptime line and then click the Parse
variable.

1. The Variable line Pattern will be created.

2. Change the variable name to $uptime in the Output area.

46 | NetBrain R11.1b
3.3.3 Use of Integer Variable

An Integer Variable is used to match any whole number. Let us define the system success rate as
an integer variable:

1. In the sample data (ping [Link]), select the percentage figure (e.g., 100), and then click
Parse Variable.

2. The Variable line Pattern will be created as the rate is $int: percent percent.

3. Change the variable name to $success_rate in the Output area.

3.3.4 Use of Float/Double Variable

A Float/Double Variable is used to match any double-precision IEEE 64-bit (8-byte) floating-point
number.

For example: The version number contains the float number, which can be parsed by the float
type variable “$float:ver_float” and “$double:ver_double” to the var line.

NetBrain R11.1b | 47
3.3.5 Use of Boolean Variable

A boolean type of variable is for parsing variables having possible values, including true, false, 1
or 0.

For example, the default cost value (from the command, show mls qos interface) can be defined as
the bool type variable since the default cost value is either 0 or 1.

• Retrieve the data of the command “show mls qos interface” on device BJ_L2_Core_3.
• Add a variable line to parse the default cost value (COS: $bool:bool_cos).

Note: Both "true" and "false" are case-insensitive.

3.3.6 Use of Enumeration Variable

Enumeration is a user-defined data type where you can specify a set of values for a variable, and
the variable can only take one out of the set of possible values. When there are no constant
keywords before or after a target variable, but the values of the variable are predictably
controlled, you can use Enumeration to define the variable. All the possible values must be
included in a pair of parentheses after the variable name, and a vertical line (|) can be used to
separate two possible values, e.g., $var1(value1|value2|value3). Note that even if there is only
one possible value, the vertical line (|) must be added, e.g., $var1(value1|).

You can use Enumeration to parse all variable types, such as:

• $var1(value1|value2) indicates to parse the value of a string-type variable.

Note: Space is allowed in the value of a string, e.g., $duplex(Full Duplex|Auto Duplex).

• $int:var1(value1|value2) indicates to parse the value of an integer-type variable.


• $float:var1(value1|value2) indicates to parse the value of a float-type variable.

48 | NetBrain R11.1b
Note:

• Only the values listed in the line pattern can be successfully extracted.
• Possible values cannot contain special characters | and ).

For example, to parse enumeration-type variables like $duplex, you can use “$duplex(Full-
duplex|Auto-duplex)”:

1. Parse the variables $FastEthernet (change the variable name to “Fa”) and $MTU.

2. Continue to parse $duplex and $speed.

3. Modify $duplex by defining the Enumeration “Full-duplex|Auto-duplex”.

a. In the Output pane, click Duplex.

b. In the dialog, check the Enumeration checkbox.

c. In the Enumeration textbox, type “Full-duplex|Auto-duplex”.

d. Click Apply.

NetBrain R11.1b | 49
4. Click Apply and verify the Output and Var Line2: the variable $duplex has two options “Full-
duplex and “Auto-duplex”.

50 | NetBrain R11.1b
3.3.7 Dummy Variable

A Dummy variable is a virtual variable in the shape of $type:_dummy in a line pattern and will not
be extracted as a Parser variable.

Use a dummy variable to skip a specific type of variable you are not interested in, like a
placeholder. For example:

• $mstring:_dummy indicates skipping multiple lines of string.


• $string:_dummy($_dummy) indicates to skip a string.
• $int:_dummy indicates to skip an integer.
• $float:_dummy indicates to skip a float number.

Take the BGP router as an example: If you want to parse its IP address and are not interested in
the string "local AS," then you can skip using the dummy variable.

3.4 Paragraph Parser

In the last section, you learned the types of Variables. This section teaches how to create the
Paragraph Parser, which converts multiple text sections of an identical pattern into a table
variable.

3.4.1 Parse “Show Interface”

Let us take an example of parsing the show interface command.

1. Right-click the My Parser folder and select New Parser to create a new parser for the
command show interface.

2. Select the device US-BOS-R1, enter the command show interface, and then click Retrieve.

3. Click + New Pattern and select Paragraph from the dropdown menu. You can see that the
ID Line appears in the Variable Definition Area.

NetBrain R11.1b | 51
4. Define the ID Line.

In the Sample Data, select a line related to the interface name and its status, and click Parse
Variable. The ID line identifies a paragraph and is usually the first line of the paragraph.

For example, select Ethernet0/0 and click Parse Variable. Similarly, select up and click Parse
Variable. You can also double-click on the selected text.

All the lines in the source data with an interface and its status will be highlighted
automatically and will reflect in the Output pane.

5. Define a variable for MTU.

In the sample data, select “1500” and click Parse Variable. The Var Line 1 of the Variable
Line Pattern shows the $int:MTU Variable.

All the lines of the sample Data with MTU values are automatically selected and reflected in
the Output pane.

6. Define a variable for the strategy.

In the Sample Data, select the strategy value and click Parse Variable. The Var Line 2 of the
Variable Line Pattern shows the strategy: $strategy$ Variable.

All the lines with strategy values are selected automatically and reflected in the Output
pane.

52 | NetBrain R11.1b
7. Define variables for CRC errors.
In the sample data, select “0” before the text CRC and click Parse Variable. The Var Line 3
of the Variable Line Pattern shows the $int:CRC Variable.

All the lines of the sample Data with CRC errors will be automatically selected and reflected
in the Output pane.

8. Verify the Output for all the parsed variables.


9. Click $var1 and $var2 in the output pane to modify the variable names.

For example:
$var1 > Interface
$var2 > Status

10. Click Apply to create a pattern. The final Output will be:

11. Click to save the Parser under the My Parser folder with the name show interface [Cisco
IOS].

NetBrain R11.1b | 53
3.4.2 Use Special Characters (^ and $) in Paragraph Parser

The following two characters can be used in a simple line pattern to match the start/end of a
string or a line:

Character Description Sample Line Pattern


^ Match the start of a line. ^$intf is $mstring:state, line protocol is
$status
$ Match the end of a line. Neighbor priority is $priority, State is
$state, $int:changes state changes$

When there is no keyword before or after a target variable in a single line of raw text, that is, the
variable is the only string in that line, you can define the line pattern by using the character ^ to
represent the start of a line and the character $ to represent the end of a line.

3.4.3 Use the Start Line and End Line in Paragraph Parser

Setting a start line, end line, or both helps to narrow down the range of lines of text to apply a
Parser and get more accurate results. When no start/end line is configured in a Parser, the
matching scope includes the full-text range.

Let us take an example: add Start Line/End Line in a paragraph parser to parse the trunk port
and its allowed vLAN.

1. Right-click the My Parser folder and select New Parser to create a new parser for the
command show interface trunk.

2. Select the device BJ-L2-CoreB, enter the command show interface trunk, and then click
Retrieve.

3. Click + New Pattern and select Paragraph from the dropdown menu. You can see that the
ID Line appears in the Variable Definition Area.

54 | NetBrain R11.1b
4. Define the ID Line.

In the Sample Data, select the port name “Fa0/5” and the vlans “10,700” to parse variables
“$port” and “$vlan”.

All ports are selected and parsed. But if you want to parse only a specific paragraph, you can
utilize the Start Line and End Line to target only the paragraph you want.

5. Define the Start Line and End line as below:

a. In the top-right corner, click menu and select Add Start Line.
b. From the sample data, copy the first line of the paragraph you want to parse. For
example, “Port Vlans allowed on trunk”.
c. Click menu and select Add End Line.
d. In the End Line checkbox, enter a special character such as “^$”

6. To exclude the first line of the paragraph to be passed in the Output:

a. Click the icon of the Start Line and uncheck the Include the Strat Line Itself
checkbox.

b. Click OK.

NetBrain R11.1b | 55
7. Verify the Output pane.

8. Click $var1 and $var2 in the output pane to modify the variable names.

For example:

$var1 > port


$var2 > vlan

9. Click Apply to create a pattern.

The final Output will be:

10. Click to save the Parser under the My Parser folder with the name show interface trunk
[BJ-L2-corB].

56 | NetBrain R11.1b
3.5 Table Parser

This section teaches how to create a Table Parser. Table Parser parses table-formatted text, such
as NDP table, VRF table, OSPF neighbors, etc. With the Table Parser, users can address the line of
table headers in the raw text and then leverage the column separator to adjust the table's width
manually.

3.5.1 Parse “show ip route summary”

Let us take an example of parsing the show ip route summary command.

1. Right-click the My Parser folder and select New Parser to create a new parser for the
command show ip route summary.

2. Select the device US-BOS-R1, enter the command show ip route summary, and then click
Retrieve.

3. Click + New Pattern and select Table from the dropdown menu. The Header line appears in
the Variable Definition Area.

4. In the Sample Data, select several lines in a row from the sample text and click Parse Table
(the first line must be a header).

In the Header line, all the selected table headers are now parsed.

In the Set Table Column section, all the column variables and Variable Type are created.

5. Verify the Parsed Result.

Three rows in the table, starting with Intra-area, NASA and External, do not look right. You
can use the Advanced Setting to filter these lines.

NetBrain R11.1b | 57
6. Click Advanced Settings to filter the unwanted lines.

7. Check the Exclude Lines checkbox and enter text for the line you wish to exclude from the
table. For example, the words Intra, NSSA, and External are added to the textbox.

Now, verify that all the lines starting with Intra-area, NASA and External are excluded.

8. Click Apply to create a pattern.

9. Click to save the Parser under the My Parser folder with the name show ip route
summary [Cisco IOS].

58 | NetBrain R11.1b
3.6 Advance Parser

3.6.1 Collector Parser

This section teaches how to create a Collector Parser. A Collector Parser parses variables based
on specified keywords or grouping criteria. Its purpose is to extract relevant information from a
given input source and categorize that information by determining the keywords that will be
used to group the recurring lines into variables. These keywords are specific patterns that define
the desired grouping.

Let us take an example of parsing the show log command.

1. Right-click the My Parser folder and select New Parser to create a new parser for the
command show log.

2. Select the device US-BOS-R2, enter the command show log, and then click Retrieve.

3. Click + New Pattern and select Add Collector from the Advanced dropdown.

4. In the Sample Data, select the Interface (e.g., Ethernet0/0), and then click Parse Variable.

The ID Line identifies the recurring groups. In the ID Line, replace the $var1 with
$interface_name.

NetBrain R11.1b | 59
5. In the Sample Data, select the time stamp (e.g., *Apr 1 10:28:53.65), and click Parse
Variable. The system automatically creates Var Line 1.

6. Verify the Output for all the parsed variables.

7. Click $var1 and $var2 in the output pane to modify the variable names.

For example:
$var1 > Interface_name
$var2 > alert_time

8. Click Apply to create a pattern. The final Output will be:

9. Click to save the Parser under the My Parser folder with the name show log collector
parser [Cisco IOS].

60 | NetBrain R11.1b
3.6.2 JSON Table

JSON Table parser is used to parse standard Json format text, such as Cisco ACI, AWS, and more.
It requires certain coding know-how to use this type of parser. In the parsing process, the
standard Json text is parsed into a tree structure with nodes, and json paths (connections
between the root node and the current node) are established. The parsed results in table form
are generated based on path mapping (the path scope is defined by the user) and the key
mapping variables selected.

Note: JSON Table type is primarily used for API parser (which uses API command as parser input
data source).

The following example shows how to retrieve JSON text via API and parse useful data (e.g., CPU
data) from the Json text.

1. Right-click the My Parser folder and select New Parser to create a new parser for JSON
Table.
2. Define the basic settings for retrieving standard Json format text.

a. Define the settings to retrieve API command data from the API adapter Cisco ACI on the
device apic1.

NOTE: When the API parser is selected, make sure the selected device has a front server
configured. If the front server for this device is not defined, you have to do this
before you proceed.

NetBrain R11.1b | 61
b. Click Function to create a Python script, which defines how to get data from the API
server.

The sample Python script is shown below:

Copy Code

Python

'''
Begin Declare Input Parameters
[
]
End Declare
'''

def BuildParameters(context, device_name, params):


get_dn = GetDeviceProperties(context, device_name, {'techName': 'Cisco ACI',
'paramType': 'SDN', 'params' : ['dn','role'] })
dn = get_dn['params']['dn']
role = get_dn['params']['role']
rtn_params = [{ 'devName' : device_name, 'dn' : dn, 'role': role }]

62 | NetBrain R11.1b
return rtn_params
def RetrieveData(rtn_params):
dn = rtn_params['dn']
role = rtn_params['role']
url = '/api/mo/' + dn + '/sys/[Link]'
rtn_params['url'] = url
data = getData(rtn_params)

return [Link](data,indent=4)

3. Click the Retrieve button to retrieve Json format text. Alternatively, you can manually input
Json format text in the left Sample Data pane.

4. After the input text is ready, click the + New Pattern and select Json Table from the
Advanced dropdown.

NetBrain R11.1b | 63
5. In the By Path block, select a path from the By Path tree structure to determine which table
section in the Json format text will be parsed. The Json keys selected in the next step come
from the table section determined in the Json format text.

6. In the Define Variable by Selecting Json Key block, select Json key as the parser variable,
and then you can change the variable type.

64 | NetBrain R11.1b
7. View the parsed results.

For a Json Table type parser, the parsed results are in a table format, which are displayed in
the Output area.

8. Click to save the Parser under the My Parser folder with the name, API_Sample.

In this section, you have learned to use Collector Parser to parse variables based on specified
keywords or grouping criteria and Json Table parser to get API Sample data.

In the next section you will learn to use Variable operation in configuration parser.

NetBrain R11.1b | 65
3.7 Variable Operators

3.7.1 Match LineByVariable

The system provides a pattern of matching lines by variable (LineByVariable) and parses multiple
lines of raw CLI text for specified variables.

Format LinesByVariable[$var]: $var1


Sample of
Raw Text

Sample of
Definition

Let us take an example of parsing configure lines “access-list” via The line of variable
option. (using Auto-Pattern (which is the default), you can also use Paragraph as a pattern).

1. Right-click the My Parser folder and select New Parser to create a new parser for
Configuration.

66 | NetBrain R11.1b
2. Select the Data as Configuration from the dropdown menu, select device US-BOS-R2, and
then click Retrieve.

3. Define the ID Line pattern for the Access list.

a. In the Sample Data, search the keyword access-list.

b. Select the access list number 1, and click Parse Variable.

You can see all the access-list numbers are parsed in the Output.

4. Define a Variable Line Pattern for access list configuration.

a. Click + Parse Lines in the output pane. The Parser Lines window appears.

b. Set variable name as acl_config.

c. In The line of variable dropdown, check the $sccess_list checkbox.

d. Click Apply to close the Parser Lines window.

NetBrain R11.1b | 67
You can see the pattern LinesByVariable[$acl_config]:$access_list is created.

5. Verify the Output.


6. Click Apply to create a pattern.

The final Output will be:

7. Click to save the Parser under the My Parser folder with the name, access-list config
LinesByVariable.

68 | NetBrain R11.1b
3.7.2 Match LinesByKeyword

The system provides a pattern of matching lines by keyword (LinesByKeyword) to parse


multiple lines of raw CLI text for a specified keyword.

Format LinesByKeyword[$var]: simple line pattern


Sample of
Raw Text

Sample of
Definition

Let us take an example of parsing the configure lines starting with “snmp” via The line of variable
option. (using Auto-Pattern (which is the default), you can also use Paragraph as a pattern).

1. Right-click the My Parser folder and select New Parser to create a new parser for
Configuration.
2. Select the Data as Configuration from the dropdown menu, select device US-BOS-R2, and
then click Retrieve.

NetBrain R11.1b | 69
3. Define the ID Line pattern for the Access list.
a. In the Sample Data, select US-BOS-R2 device and click Parse Variable. And all the
access-list numbers are parsed in the Output pane.

4. Define Variable for multiple lines of SNMP configuration

a. Click + Parse Lines in the Output pane, and the Parser Lines window appears.

b. Set variable name as snmp_config.

c. Select The line contains keyword option, and enter the keyword, snmp.

d. Click Apply to close the Parser Lines window.

You can see the pattern LinesByKeyword[$snmp_config]:snmp is created.

5. Verify the Output.

6. Click Apply to create a pattern. The final Output is:

70 | NetBrain R11.1b
7. Click to save the Parser under the My Parser folder with the name snmp config
LinesByKeyword.

3.8 Parse Configuration

In previous sessions, you learned how to use the different types of Parsers to parse the
variables. In this session, you will use what you learned to create a complex configuration parser,
which can be used for compliance check and other purpose.

First, create a configuration parser:

1. Right-click the My Parser folder and select New Parser to create a Configuration parser.

2. In the Select Data Source dropdown, select Configuration.

3. Select the device US-BOS-R2, and then click Retrieve.

NetBrain R11.1b | 71
3.8.1 Parse OSPF Configuration

1. Click + New Pattern, and select Single Variables.

2. Define the Start Line and End Line of the router configuration.

a. In the Search field, search for router ospf.

b. In the upper right corner of the Variable Definition area, click menu and select Add
Start Line to add the first line of the router configuration. In the scenario, router ospf is
the first line.

c. In the Start Line checkbox, type ospf router, the first line of the ospf configuration.

d. Click the menu and select Add End Line to add the last line of the router configuration.
In this scenario, “!” (Exclamation mark) is the end line.

3. Define a Variable for the router id number.

a. In the Sample Data, select a router id (1 in this sample data) and click Parse Variable.

b. The Var Line 1 will be ospf $int:ospf. Edit the line to ospf $int:ospf_id.

4. Define a Variable for the multiple lines of the router configuration.

a. Click + Parse Lines in the Output pane, and the Parser Lines window appears.

b. Set variable name as ospf_config.

c. Select The line between option and $ospf_id and End from the dropdown of the
texboxes.

72 | NetBrain R11.1b
d. Click Apply to close the Parser Lines window.

The pattern LinesByVariable[$lines1]:$ospf_id- is created.

5. Verify the Output.

6. Click Apply to create a pattern. And the final Output will be:

7. Click the pen icon of Paragraph1 and rename it as ospf_config_multipleLines.

NetBrain R11.1b | 73
3.8.2 Parse Interface configuration

1. Click + New Pattern and select Paragraph.

2. Define a Variable for the interface.

a. In the Sample Data, search for Interface.

b. Select interface Loopback0 and click Parse Variable.

All the interfaces available in the sample data will be parsed.

3. Define a Variable to identify all the interfaces' IP and Mac numbers.

a. In the Sample Data, select the ip address line and click Parse Variable.

b. Similarly, select Mac address and click Parse Variable.

Change the variable names:

$address > $ip_address


$var1 > $mac

74 | NetBrain R11.1b
4. Define a Variable to collect all the IP Address paragraphs.

a. Click + Parse Lines in the Output pane. The Parser Lines window appears.

b. Set variable name as config.

c. Select The line of variable option and $ip_address from the dropdown.

d. Click Apply to close the Parser Lines window.

The pattern LinesByVariable[$config]:$ip_address is created.

5. Parse the IP address of the interface until the last line of the interface configurations.

a. Click the menu and select End of Paragraph


b. In the End of Paragraph textbox, enter the Exclamation mark (!).

NetBrain R11.1b | 75
6. Verify the Output.

7. Click Apply to create a pattern. The final Output will be:

8. Click the pen icon of Paragraph1 and rename it as interface_config.

76 | NetBrain R11.1b
3.8.3 Parse all routing configure (OSPF and BGP) in one table

1. Click + New Pattern and select Paragraph.

2. Define a Variable to identify all the routers.

a. In the Sample Data, select router ospf 1 and click Parse Variable.

All the routers available in the sample data will be parsed.

b. Replace the Variable $mstring:router with $mstring:protocol to reflect all the protocols
available source data.

3. Define a variable to collect all the router configurations in one table.


a. Click + Parse Lines in the Output pane. And the Parser Lines window appears.

b. Set variable name as config.

c. Select The line of variable option and $ip_address from the dropdown.

d. Click Apply to close the Parser Lines window.

The pattern LinesByVariable[$config]:$protocol- is created.

NetBrain R11.1b | 77
4. Parse all the routing configurations until the last line of the router configurations.

a. Click the menu and select End of Paragraph

b. In the End of Paragraph textbox, enter the Exclamation mark (!).

5. Verify the Output.

6. Click Apply to create a pattern. And the final Output will be:

7. Click the pen icon of Paragraph1 and rename it as all_routing_config.

78 | NetBrain R11.1b
3.8.4 Parse access-list configure (paragraph-in-paragraph)

1. Click + New Pattern and select Paragraph.

2. Define ID line pattern.

a. In the Sample Data, search for ip-access-list, select OUTSIDE, and then click Parse Variable.
The ID Line A shows the variable extended $extended.

b. Replace the variable $extended with the value $acl_name.

3. Click Apply to save the Paragraph1. Now, you have created the ID line A under Paragraph1,
create another Paragraph pattern, Paragraph2, and add Paragraph1 as its parent, which will
combine both paragraphs and parse the result for matching access-list standards.

4. Click + New Pattern and select Paragraph once again.

5. In the Paragraph2 section, click the menu and select Add Parent.

6. In the Parent dropdown, select Paragraph1. And Paragraph1 appears in the Output pane.

NetBrain R11.1b | 79
7. In the Sample Data, select the permit ip address (e.g., [Link]) and click Parse Variable.

ID Line A is created as ip $ip $_dummy $_dummy $_dummy. You need to define the ID line
pattern for permit ip to extract all the source and destination IP Addresses with their
masking IP addresses.

8. Replace the variable ip $ip $_dummy $_dummy $_dummy with permit ip $srx $mask1 $dest
$mask2.

9. Verify the Output.

10. Click Apply to create a pattern. And the final Output will be:

80 | NetBrain R11.1b
11. Click the pen icon of the Paragraph and enter the name acl_configure_(para-in-para).

3.8.5 Parse all prefix-list config into a table

1. Next to the Define Variables section, click the Hamburger menu, and then select Add
Collector.
2. Define a Variable to identify recurring groups.

a. In the Sample Data, search for BOS-TOR-Traffic, select it and click Parse Variable.

In the ID Line, the Variable prefix-list $prefix_list seq is created.

For example, "BOS-TOR-Traffic" recurs multiple times in the Sample Data.

3. Define a Variable to collect all recurring groups.

b. Click + Parse Lines in the Output pane. And the Parser Lines window appears.

c. Set variable name as config.

d. Select The line between option and $prefix_list and End from the dropdown of the text
boxes.

e. Click Apply to close the Parser Lines window.

NetBrain R11.1b | 81
You can see the pattern LinesByVariable[$config]:$prefix_list- is created.

4. Verify the Output.


5. Click Apply to create a pattern. And the final Output will be:

6. Click the pen icon of the Collector1 and enter the name prefix_list_config.

82 | NetBrain R11.1b
You need to save all the created configuration lines in the My Parser folder.

You can use the All Output option to see all the configurations output on one screen.

7. Click to save the Parser under the My Parser folder with the name Configuration Parser.

You just created a configuration Parser to parse the following configurations:

• Parse OSPF Configuration.


• Parse Interface Configuration.
• Parse all routing configurations (OSPF and BGP) in one Table.
• Parse access-list configuration (paragraph-in-paragraph).
• Parse all prefix-list configurations into a table.

Note: You can also create the parsing configure lines access-list and snmp, which are already
created in the Section Variable Operators.

NetBrain R11.1b | 83
3.9 Use Existing Parser

In the previous sections, you learned how to create different parsers. This chapter teaches you
how to use an existing parser, which may be created by NetBrain, yourself or other users. When
creating a new parser or an intent, you can use the pre-existing visual parsers in the system,
which speeds up your automation tasks by building on existing parsing capabilities instead of
starting from scratch.

The following example teaches how to use an existing parser during Quick Intent creation:

1. On the NetBrain desktop, search the device US-BOS-R2 in the search bar.

2. Move the mouse cursor over the result and click Map to draw the device to the map.

3. Go to the Intent tab, and then click the Quick Intent tab.

4. Select <configurationfile> from the drop-down menu to collect data.

5. Click Retrieve to parse the data.

84 | NetBrain R11.1b
6. In the Parser dropdown, you can select the existing Parser from either the 'From Parser
Library' or the 'From Verified Intent Parser' folder.

After selecting the existing Parser, you can see the message “Successfully parsed all
<number of> variable.” You can proceed with Defining Logic.

Congratulations! you just learned how to define Parser. Let's recap what you have learned:

• Auto Pattern: How to parse variables for various patterns without much modifying the
variable line.
• Single Variable Parser using commands “Ping [Link]”.
• Basics of the Variable Types: Explored different types of variables.
• Paragraph Parser and use of special characters for parsing.
• Table Parser: Parses table-formatted text.
• Advanced Parser:
o Collector Parser: parse variables based on specified keywords or grouping criteria.
o Json Tbale: parse an API sample data for the Cisco device.
• Complete configuration parser with various examples.
• Use of existing parser.

In the next chapter, you will learn how to define the diagnosis using these variables.

NetBrain R11.1b | 85
4 Define Diagnosis
In the last chapter, you learned how to define the variables from the command output by Visual
Parser. In this chapter, you will learn how to define the diagnosis for these variables. There are
two types of variables: single-value and table. In this section, we will cover how to define the
diagnosis for these two types.

1. Define Diagnosis for a Single Variable

2. Define Diagnosis for a Table

4.1 Define Diagnosis for a Single Variable

We shall use Quick Intent to create a seed Intent for checking Ping [Link] success rate and
average round trip time on Cisco devices. The main steps to define an intent are:

1. Selecting the Device and Parser

2. Define If Condition for a Single Variable

3. Define Intent Output

4. Run the intent and View the Result

4.1.1 Selecting the Device and Parser

The first step is to select a device from the Netbrain desktop:

1. Search the device US-BOS-R1 in the search bar.

2. In the results device section, click Map to draw the device to the map.

3. Close the search results window and open the Intent pane.

86 | NetBrain R11.1b
4. Go to the Quick Intent tab in the Intent Section.

5. Enter the command Ping [Link] in Input or Select a command… field to collect data.

6. Click Retrieve to parse the data.

7. Select the parser from the drop down menu under the Data and Parser section that has
been created earlier in the Section 3.2 Parse "ping [Link]".

8. Click Add to Intent.

NetBrain R11.1b | 87
4.1.2 Define If Condition for a Single Variable

9. Go to the Define Logic section to define the diagnosis logic as follows:

10. Enter the diagnosis name Ping Cisco.

11. Define a condition as what IF:

a. Variable percent does not equal 100.

b. Variable avg is Greater than 60.

c. Boolean Expression: A or B.

88 | NetBrain R11.1b
4.1.3 Define Intent Output

Enter a message under the Then and Else output areas to appear as the result of the diagnosis.
1. Then: Define a color, message and status in case If condition is satisfied, as shown in the
figure.
Message: $this_device ping failed, and the average round trip time is $avg.
NOTE: By typing $, you can get the variable selection pop up.
2. Click the checkbox of the Set Status Code for Device and Set Status Code for Intent to
duplicate the message to the Device Status Code.
3. Else: Define a color, message and status in case If condition is not satisfied, as shown in the
figure.
Message: $this_device ping Succes and average round trip time is $avg.
NOTE: By typing $, you can get the variable selection pop up.
4. Click the checkbox of the Set Status Code for Device and Set Status Code for Intent to
duplicate the message to the Device Status Code.
5. Click on Create to save and create the intent.

NetBrain R11.1b | 89
6. Go to the Run Intent pane and click Run to execute the diagnosis.

7. Upon completing the diagnosis by the system, the following result will appear:

• Intent execution date and time.

• Success/Failure message and status as defined in Then and Else conditions.

8. Click Save to save the map in the desired folder before proceeding to save the intent to Map.

9. Choose either a Desktop or another location to save the map.

10. Add a name to the map and click OK to save and close the window.

90 | NetBrain R11.1b
11. Save the created intent to Map Intent using the option Save to Map Intent located under
the Save to drop-down menu.

Send Email:

You can add a Send Email block in NI diagnosis and define the email settings, such as subject,
body, and intent link. With the following steps, you can notify users of the error message, for
example, Ping failed, and the average round trip is XXX.

1. Click Add Logic and select Send Email to add a Send Email block.

NetBrain R11.1b | 91
2. Specify the user to send the email to and the email subject. Click the icon to define more
email settings, such as CC, Bcc, and Email Body.

NOTE: The two check boxes at the bottom can be used to:

• Create alert notifications via Net Brain System: Set whether to send the email
content as an alert notification to the NetBrain user.

• Merge emails to the same recipients from this intent into one: If the settings of
To/Cc/Bcc are the same, in the same intent, you can set whether to merge the email
content before sending it to the user.

3. Click OK.

4.1.4 Run the intent and View the Result

Upon defining the diagnosis, Click Run to execute the intent. The result will be displayed as you
have programmed in Section 4.1.3.

92 | NetBrain R11.1b
[Link] Diagnosis Tree

Click to view the diagnosis tree. It includes the following details as shown in the figure:

• Current NI medium,

• Execution date and time,

• Displays the diagnosis tree in Pre-Execution and Post-Execution mode,

• Displays the status of execution in each device with color legends.

[Link] Default Data View on Map

The result of the intent execution can be visualized in a map by selecting the Show in Map
button as the result is displayed as follows:

NetBrain R11.1b | 93
4.2 Define Diagnosis for a Table

In this section, we shall create a diagnosis to check the OSPF neighbor state using the command
show ip OSPF neighbor and:

1. Define Basic Info and Variables with Parser

2. Compare Current table data with Baseline data

3. Enable the diagnosis to loop through the table of data.

4.2.1 Define Basic Info and Variables with parser

Let us create an intent using the Full Intent and Visual Parser Editor to explore more
functionalities of the intent diagnosis as follows:

1. Click icon from your desktop.

2. Select New Intent. A window Network Intent in edit mode will pop up on the screen.

3. Enter the title and a brief description (optional) of the intent.

4. Add the target device(s) using the option + Device.

5. Click +Add CLI Diagnosis to the selected device to open the CLI Command Diagnosis
window.

94 | NetBrain R11.1b
6. Parse the Show ip ospf neighbor command data as follows:

a. In the command field, enter the command Show ip ospf neighbor.

b. Click Retrieve Live Data to retrieve the data from the live network/historical
data/importing text. The retrieved data is displayed under the Define Variable section.

c. In the Sample Data, from line 3 onwards, select all the data and click Parse Table in the
tip window. The data is copied to the right pane in the desired output with variables
defined.

NetBrain R11.1b | 95
The complete parsed data will be transformed into a table output.

Scroll down the Set Table Column Section and delete the Dead Time Column.

NOTE: Dead Time column removed from the Output table can be seen when it is deleted in
the Set Table Column section.

96 | NetBrain R11.1b
7. Set the interface column as Interface Key by selecting it from the column drop-down menu.

8. Change the parser table default name Table 1 to ospf_nbr for better reference later.

9. Click Apply to save the table.

10. Go to the Define Diagnosis Section 4.2.2 or 4.2.3, depending on whether you want to
compare the entire table or table entries (loop through the table).

NetBrain R11.1b | 97
4.2.2 Define Diagnosis to compare Table Current data with Baseline data

To check the changes of the entire table, skip the Loop Table Rows and go to the IF condition.
Let us compare the current data with baseline data and see the changes. Upon adding the
parsed data, We have to define a Diagnosis as follows to diagnose the changes:

[Link] Configure If, Then and Else Conditions:

1. Name: Enter a name such as Check OSPF Neighbor change.


2. Anchor: Select the variable neighbor id under the ospf_nbr table from the drop-down
menu.
NOTE: Anchor helps when viewing the resulting diagnosis. It will draw a line from the
diagnosis message to the variable you select as the anchor.
3. Description: Add a description (e.g., check OSPF neighbor) for the diagnosis to help anyone
who executes the intent in the future.
4. Select the table ospf_nbr as variable input from the dropdown menu and choose the
baseline as the data point.
5. Select the operation Does not equal.
6. In the third box, Select the table ospf_nbr as comparison data variable input with Current as
the data point.
NOTE: When selecting a variable in the diagnosis, the data source menu appears above each
variable. This helps to compare separate data points as part of the diagnosis.

98 | NetBrain R11.1b
Then: Add a message to display when the condition is matched.

7. Select the diagnosis color. In this use case, the errors indicate a problem, so we shall
highlight the message in red.

8. Enter a message OSPF neighbor is not same as baseline in the field.

9. Replicate the message to the Device and Intent by clicking the checkbox beside Set Status
Code for Device: and Set Status Code for Intent:.

Else: Add a message to display when the condition is not matched.

10. Select the diagnosis color. In this use case, the success indicates everything is good, so we
shall highlight the message in green.

11. Enter a message OSPF neighbor is same as baseline in the field.

12. Replicate the message to the Device and Intent by clicking the ox beside Set Status Code for
Device: and Set Status Code for Intent:.

NetBrain R11.1b | 99
[Link] Table Compare Settings:

Define the changes to be listed in the Table Compare Settings dialog as follows.

1. Click on the burger menu and select Table Compare Settings to pop up a window.

2. Check the selection boxes for the number of Changed, Added and Removed Entries as per
the requirement.

3. Click OK to save and close the window.

100 | NetBrain R11.1b


[Link] Embedded Incident

You can use the Save to incident functionality to document the critical findings in the intent and
review them. Check the checkbox Save to Incident.

The created incident will embedded into the result after executing the intent.

NetBrain R11.1b | 101


[Link] Run the Intent and View Results:

Upon defining the diagnosis, embedding the incident, and saving the result to an incident, we
shall execute the intent and see the results as follows:

1. Click the Save button to save the Network Intent (Edit Mode) window.

2. Click Run to start executing the intent.

The result will appear in View Mode with the details as shown below:

102 | NetBrain R11.1b


3. View Table Comparison Results:

a. Click 1 Diagnosis appearing next to the CLI command to open the comparision results. A
new window, Diagnosis Details and Compare, will pop up.

b. Go to the compare tab. All unchanged, added, removed, and modified data in the current
data in comparison to the baseline will be displayed with different color legends.

NetBrain R11.1b | 103


4. View Embedded Incident:

a. Click Embedded Incident in intent View Mode to view all the recorded incidents.

b. Select the Incident number (e.g., 102DWZ) to open the incident in a new window.

104 | NetBrain R11.1b


4.2.3 Loop Through a Table

In this sub-section, we shall create the diagnosis enabling the diagnosis to loop through the table
of data. The diagnosis logic of each neighbor will check if the FULL state is abnormal since the
last execution.
In continuation to the Section 4.2.1, configure the diagnosis looping through the table as follows:
1. Name: Enter a name such as Check OSPF Neighbor change.
2. Anchor: Select the variable neighbor id under the ospf_nbr table from the drop-down
menu.
3. Description: Add a description (e.g., check neighbor state) for the diagnosis to help anyone
who executes the intent in the future.
4. Check the Loop Table Rows selection box to enable the diagnosis to loop through the table
of data that is the result of parsing.
5. Click Select Table Variable to select the table to loop through and choose ospf_nbr.
6. The Table Key will be auto selected if it was set as part of the parser. If it hasn't been, select
neighbor_id from the Table Key drop-down menu.
NOTE: The Table Key is a way to set the unique identifier for each table row (Table Key) and
the column that maps to the device interface, it is typically set while creating the
parser.

NetBrain R11.1b | 105


Defining diagnosis IF condition:

1. Select the variable state from the dropdown menu to perform a check in each table row.

2. Select the operation Does not Contain to perform.

3. Enter the text FULL in the third box.

4. Boolean Expression: In this use case, we do not need it as we have only one logical
condition.

THEN: Add a status message for the condition in IF matched.

5. Select the diagnosis color: In this use case, the abnormal state indicates a problem, so we
shall highlight the message in red.

6. Create a message in the message field “The state of OSPF Neighbor $neighbor_id is
abnormal”.

Note: When you type $, the variable selection window will pop up. Select $neighbor_id.

7. Replicate the message to the Device and Intent by clicking the checkbox beside Set Status
Code for Device: and Set Status Code for Intent:

106 | NetBrain R11.1b


Add an Else Condition: Add a message to display if no errors are found on the interface.

8. Click +Add Else to add an Else condition to the Intent.

9. Select the diagnosis color: Click the color dropdown menu in the Else block and select green
color.

10. Type in the message: “The state of OSPF Neighbor $neighbor_id is abnormal.

Note: When you type $, the variable selection window will pop up. Select $neighbor_id.
11. Replicate the message to the Device and Intent by clicking the checkbox beside Set Status
Code for Device: and Set Status Code for Intent:

12. Click Apply.

NetBrain R11.1b | 107


[Link] Add an Intent Data View

An intent data view can be used to display data on the map, which allows a user to see the
variable values on the map when the diagnosis is matched.

1. Click the Add Logic menu under the diagnosis block and select Intent Data View.

2. In the Intent Data View window, add a device level variable by clicking the dropdown on
Position 1 under the device.

3. Click ospf_nbr from the dropdown.

4. Add interface level data by selecting the Position 1 dropdown on the interface side. Select
the neighbor variable from the list.

5. Add the state variable to the interface by selecting the Position 3 dropdown menu.

108 | NetBrain R11.1b


6. To further modify the display of the device or interface data on the map, select the variable
and configure a condition to highlight the data with a specific color, as shown in the
following image:

7. Click OK to save the Data View settings.

NetBrain R11.1b | 109


[Link] Add Draw Map Logic

To display the neighbor devices and their interfaces on the map, add the Draw Map logic in the
diagnosis definition as follows:

1. Click the Add Logic menu under the diagnosis block and select Draw Map > Draw Device.

2. Select Device: Choose this_device from the drop-down menu to draw the US-BOS-R1 device
on the map.

3. Check the Include box to draw the neighbor devices and their interface variables on the
map.

4. Include neighbor device: Draw the selected device and its neighbor with the variable state if
they are connected with the selected topology.

110 | NetBrain R11.1b


5. If you select Auto for the neighbor, it means all neighbors will be drawn, and the topology
type is applicable to all the neighbors.

NetBrain R11.1b | 111


[Link] Run the Intent and View Results

Upon defining the diagnosis and closing the window CLI Command Diagnosis:

1. Click the Save button to save and close the Network Intent (Edit Mode) window.

2. Click Run, and the Network Intent (View Mode) window will appear with the diagnosis
executed:

3. Click to view the neighbor devices added to the map and intent data view with neighbor
id and state.

112 | NetBrain R11.1b


4.3 Compound Table and Other Table Operations

Let us merge the table OSPF neighbor with the interface table and create an alert if the
interface of an OSPF neighbor is down. To do so, we have to create an intent with two CLI
commands, show ip OSPF neighbor and Show interface. Then, merge the two parser tables
from these commands to get the interface status of an OSPF neighbor. The sequence to do so is:

1. Define Basic Info and Variables with parser

2. Merge Tables

3. Filter Table

4. Define the Intent Diagnosis:

5. Execute the Intent Diagnosis:

4.3.1 Define Basic Info and Variables with parser

Let us create an intent using the Full Intent and Visual Parser Editor to explore more
functionalities of the intent diagnosis as follows:

1. Click icon from your desktop.

2. Select New Intent. A window Network Intent in edit mode will pop up on the screen.

3. Enter the title and a brief description (optional) of the intent.

4. To add the target device(s), select the option + Device and a window Select Devices will
appear.

NetBrain R11.1b | 113


5. Add the following two diagnoses using +Add CLI Diagnosis to the selected device:

a. Show ip ospf neighbor

b. Show interface

6. Parse the Show ip ospf neighbor command data as follows:

a. In the command field, enter the command Show ip ospf neighbor.


b. Click Retrieve Live Data to retrieve the data from the live network/historical
data/importing text. The retrieved data is displayed under the Define Variable section.
c. In the Sample Data, from line 3 onwards, select all the data and click Parse Table in the
tip window, and data is copied to the right pane in the desired output with variables
defined.

114 | NetBrain R11.1b


d. The complete parsed data will be transformed into a table output.
e. Click Apply to save the table and close the window.

7. Parse the Show interface command data as follows:

a. In the command field, enter the command Show interface for parsing data.
b. Click Retrieve Live Data to retrieve the data from the live network/historical
data/importing text. The retrieved data is displayed under the Define Variable section.
c. Go to the +New Pattern drop-down menu and select Paragraph.
d. Select and copy the interface status line from the sample data.
e. Paste the copied line in ID Line A.

NetBrain R11.1b | 115


f. To define the variables, modify the copied status line to “$interface is $mstring:L1status,
line protocol is $mstring:L2status”.
g. Click +Field to add the error variables, and select the Variable Line.
h. Select and copy the input and CRC errors from the sample data.
i. Paste the copied text in the Var Line 1 field.
j. Click Apply to save the table.

116 | NetBrain R11.1b


4.3.2 Merge Tables

Let us merge the table OSPF neighbor with the interface table and create an alert if the interface
of an OSPF neighbor is down.

1. Click the link All Intent Variable to open the options to merge the tables created in the
above two steps.

2. Merge the tables using the option available under the +Add Compound Table drop-down
menu.

3. In the Add Merged Table window, fill out all the fields appropriately.

a. Table Name: Add a name for the merged table.

b. Input Tables: Select the show interface parsed table under the Table 1 and Show ip
ospf neighbor table under Table 2 from the drop-down menu.

c. Paired Keys: Select the column Interface in both tables. The data will be displayed under
the Output tab with merged data.

NetBrain R11.1b | 117


4. The layout of displayed data can be changed using the Advanced Settings option. Click
for the options:

• Full join: Keeps all rows from the Left and right side table individually.

• Inner Join: Keeps all rows that have matching key values in both tables.

• Outer Join: Keeps all rows that have no matching key values in both tables, which is
opposite to the Inner join function.

• Left Join: Keeps all rows from the left table and the matching key rows from the right
table.

• Right join: Keeps all rows from the right table and the matching rows from the left table.

118 | NetBrain R11.1b


5. Click OK and the merged table data will be displayed as per the Table Merging Rule.

6. Click OK to save and close the Add Merged Table.

NetBrain R11.1b | 119


4.3.3 Filter Table

To show the increase in input error count in the Intent Data View, let us add a sub table with
filtering by Condition.

1. Click All Intent Variable to open the options to merge the tables created in the above two
steps.

2. Under the +Add Compound Table drop-down menu, select the Sub Table (Filtered by
Condition).

3. In the pop-up window, fill out the fields appropriately:


a. Table Name: Add a name for the sub table.

b. Base Table: Select table Paragraph 1 from the drop-down menu as the input error
information is available in the show interface parsed data.

120 | NetBrain R11.1b


c. Filtering Logic: Select the option Only Keep to display the table rows if values match the
following condition:

A: Variable Inputerror Greater than 0.

Boolean Expression: A

The final information will be displayed under the New Table tab.

4. Click OK to save and close the window.

NetBrain R11.1b | 121


4.3.4 Define the Intent Diagnosis using the merged table

After configuring the variables, the most important part is to define the diagnosis logic with
success and failure results as detailed below:

1. Go to the Define Diagnosis section to define the diagnosis logic.

2. Enter the diagnosis name OSPF Interface Status check.

3. Check in the Loop Table Rows and select the merged table Interface_OSPF_table.

4. Select the variable $interface for the anchor.

5. If condition: Write a condition:

a. A: L1status is up.

b. B: L2status is up.

c. Boolean Expression: A or B.

122 | NetBrain R11.1b


6. Then: Define a color, message and status in case If condition is satisfied as $this_device
OSPF interface $interface status is down.

7. Else: Define a color, message and status in case If condition is not satisfied as $this_device
OSPF interface $interface status is up.

8. Click Apply to save and create the intent.

NetBrain R11.1b | 123


4.3.5 Execute the Intent Diagnosis:

Upon defining the diagnosis and closing the window CLI Command Diagnosis:

1. Click the Save button to save and close the Network Intent (Edit Mode) window.

2. Click Run, and the Network Intent (View Mode) window will appear with the diagnosis
executed:

124 | NetBrain R11.1b


By the end of In this Section 4, you have successfully learned to:

• Create a diagnosis using a Single Variable

• Procedure to merge tables and

• Define the diagnosis using the merge table and filtered table

Also, you should get familiar with adding different logic to the diagnosis, which makes it easy to
view the results from the map, such as:

• Draw Map,

• Intent DataView,

• Save to Incident.

NetBrain R11.1b | 125


5 Replicate Intents Across Your Network
In this section, you will replicate the intent Ping 10.8.11 (NI created in Section 4.1) and learn to
configure and execute using Auto Intent Wizard. In addition, you shall also see the procedure to
define support for multiple vendors.

5.1 Replicate Intents for Auto Intent

Configure and execute the auto intent using the Auto Intent Wizard involves the following
sequence:

1. Configure Auto Intent

2. Run the Auto intent

3. View the diagnosis Results

5.1.1 Configure Auto Intent

The Auto Intent Wizard is a user-friendly way to replicate the Intent, starting with the Auto Intent
wizard as follows:

1. Click the Intents menu on the desktop sidebar and select Auto Intent Wizard.

126 | NetBrain R11.1b


2. You need to input the data in the following three sections of the Auto Intent Wizard:
• Intent Template
• Pre Decode
• Auto Intent

NetBrain R11.1b | 127


[Link] Intent Template

1. Seed Intent: Click Select and choose the intent Ping Cisco from the intent manager.

2. Intent Template for: Choose the Device-based Replication.

3. Intent Qualification: Set the Target Devices of the replication by clicking the Select drop down
menu beside Define via Device Group/Sites.

4. Click Select Device Groups and choose a group from the window that you have created
earlier (refer to Section 6 for more details).

NOTE: The above steps set Cisco IOS Switches and Cisco IOS Routers as the replication target
for the Intent.

128 | NetBrain R11.1b


Now, set the option to pass an interface using Full Settings for Template located at the top
right corner.

5. Click Full Settings for Template, and the corresponding window will appear.
6. A prompt will appear to save the intent modifications before proceeding further, Click Save.

7. Toggle the Intent Template on by clicking on the Serve as Template for.


8. Go to the Macro Variable tab and click + Command Variable to select the command to
customize.
9. Select the ping [Link] command and click OK.

NetBrain R11.1b | 129


10. In the Variable Pattern dialog, replace Ping [Link] with Ping $server_ip to define which
part of the command is replaced by a variable.

11. Add the Description and set the Default Value to [Link].
12. Click OK to save your settings.

130 | NetBrain R11.1b


13. Set the Used Default Value option in the Look up Data for Device column from the
dropdown menu.

14. Click OK to save and close the window.

15. Click Next in the Intent Replication Wizard to move to the decode step.

NetBrain R11.1b | 131


16. Click the Preview button to see the list of target devices configured with Macro Variables.

132 | NetBrain R11.1b


[Link] Pre Decode

1. Install Intent Template to: Select a group from the dropdown menu to add the intent in
the IBA center.

2. Click the Install & Decode button to install the intent to the target devices.

NOTE: The status of the intent installation is displayed next to the Install & Decode button.

3. Click Decode Now to start decoding the intent to the target devices.

NOTE: Click the Refresh icon after a minute to see the updated decode status. The updated
decoded devices can be seen at the bottom of the Decode Now button.

4. Check in the Update Intent Baseline to update the seed intent baseline information before
replicating it to target devices and click OK.

NOTE: At this step, wait for the decode to complete by refreshing the status until you see a
number of devices have been decoded.

NOTE: If the netbrain system fails to capture the critical variable of the target devices, then
the device will not be qualified for intent replication.

NetBrain R11.1b | 133


View decoded results from Intent Based Automation Center:
5. Click Intent Based Automation Center at the top right corner to open it in a new window.

a. In the Intent Based Automation Center, you can see the NIT under your chosen group
while replicating the intent.

b. Select the NIT Ping Cisco, and its corresponding results can be seen on the Left side
of the screen.

134 | NetBrain R11.1b


c. Click 4 Devices decoded to view the detailed report and the log of the decoded devices.

6. Click Next to move on to the Auto Intent section.

NetBrain R11.1b | 135


[Link] Auto Intent

The Auto Intent section is the final step of this process. Input the following details to complete:
1. Enable for Auto Intent: Enable the option by clicking the radio button.
2. Select Folder: Choose a folder location for the Auto Intent by clicking on Select.
3. Auto Intent Description: Add a description, e.g., Latency Check.
4. Choose a profile from Select Profiles, or create a new profile using +Add Profile and click
OK.
5. Click Finish to save and close the Auto Intent Wizard for NIT Ping Cisco.

136 | NetBrain R11.1b


5.1.2 Run the Auto intent:

Execute the intent by drawing the targeted device group to a new map as follows:

1. Go to Device Group from the start menu .


2. In the device group pane, select the predefined group and click the drop-down menu.
3. Click Draw Devices on Map to add the devices to a new map.
4. Close the Device group pane.

5. Open the Auto Intent pane under the Intent tab and Select Profile (Ping) that you have
created in Section [Link].

6. Tick in the check boxes of Intent Ping Cisco and the devices listed underneath.

NetBrain R11.1b | 137


7. Select each device and the Input field appears at the bottom of the intent pane.

NOTE: The default value for the destination server_ip will appear for every device, which can
be modified as required and click Set Input if it is modified.

8. Click Replicate, and all the devices will appear under the new Preview Intent section.

138 | NetBrain R11.1b


9. Click Run to execute the intent diagnosis on all the devices. The result for each device will be
displayed as you have programmed in Section 4.1.2.

10. Save the Map with all the devices and results for future reference.
11. Save to Map Intent to view and run the intent (apart from schedule) as and when needed.

NetBrain R11.1b | 139


5.1.3 View the diagnosis Results:

Click the 1 Diagnosis that appears under each device to open the window Diagnosis Details
and Compare, as shown in the following figure:

The Diagnosis Details and Compare window will provide the following information:

1. Detailed information of the diagnosis:

140 | NetBrain R11.1b


2. Comparison of the diagnosis with last/baseline data.

NetBrain R11.1b | 141


5.2 Support Multi Vendors (Device Types)

Create a Network Intent to monitor CPU (if cpu > 10%, create an alert) with multiple vendor
seed devices (ASA firewall and Cisco IOS Switch) and replicate intent to multiple vendors or device
types with different command or command outputs. There are three main steps to define an
intent:

1. Define the basic information such as name, description, target device, and command.
2. Define the variables from the command results.
3. Define the diagnosis of the variables.

5.2.1 Define Basic Info


Start creating the intent using the full intent editor as follows:

1. Click icon from your desktop.


2. Select New Intent. A window Network Intent in edit mode will appear on the screen.
3. Enter the title “Check CPU” and a brief description (optional) of the intent.
4. Add the seed devices by selecting the option +Device, and a window Select Devices will
appear.

142 | NetBrain R11.1b


5. Select multiple device types and click OK.
e.g., ASA firewall (AWS-NB-ASA) and Cisco IOS Switch (US-BOS-R2).

5.2.2 Define CLI Command and Retrieve Data

You have to parse data and create variables for both the devices Cisco ASA Firewall (AWS-NB-
ASA) and Cisco Router (US-BOS-R2) as follows:

1. Click Add CLI Diagnosis of each added device to open the diagnosis window:

NetBrain R11.1b | 143


2. Parse the Show CPU command data for the Cisco ASA Firewall (AWS-NB-ASA) as follows:
a. In the command field, enter the command Show cpu.

b. Click Retrieve to retrieve the data from the live network/historical data/importing text.
The retrieved data is displayed under the Define Variable section.

c. In the sample data, from the CPU utilization line (you can search the word CPU
utilization to find the line), select the text 0% next to 5 minutes and click Parse Variable
in the tip window.

NOTE: You can also double-click the text to get the same result.

d. Change the type to Single.

e. Modify the variable to 5 minutes: $int:cpu.

NOTE: The created variables will appear under the Parsed Result section. The variable
name is defined as $<type>:<variable_name>.

f. Click Apply to save and go to Define Diagnosis.

144 | NetBrain R11.1b


3. Parse the Show Process CPU command data for the Cisco Router (US-BOS-R2) as follows:
a. In the command field, enter the command Show Process CPU.

b. Click Retrieve to retrieve the data from the live network/historical data/importing text.
The retrieved data is displayed under the Define Variable section.

c. In the sample data, from the CPU utilization line (you can search the word CPU utilization
to find the line), select the text 0% next to five minutes and click Parse Variable in the
tip window.

Note: You can also double-click the text to get the same result.

d. Change the type to Single.

e. Modify the variable to five minutes: $int:cpu.

Note: The created variables will appear under the Parsed Result section. The variable
name is defined as $<type>:<variable_name>.

f. Click Apply to save and go to the Define Diagnosis.

NetBrain R11.1b | 145


5.2.3 Define Diagnosis

Define the diagnosis for both the devices Cisco ASA Firewall (AWS-NB-ASA) and Cisco Router (US-
BOS-R2) same as follows:

146 | NetBrain R11.1b


1. Go to the Define Diagnosis tab and click on Add Diagnosis.
2. Enter the diagnosis name Check CPU Usage and select the variable $CPU for the anchor.
NOTE: Anchor helps when viewing the resulting diagnosis. It will draw a line from the
diagnosis message to the variable you select as the anchor.

3. If condition: Write the condition as what if variable cpu is Greater than 10.
NOTE: in the product environment, you should set the condition as cpu is Greater than 80
(or any number you think implies the high CPU in your network).
4. Then: Define a color (red), message and status (Error) in case If condition is satisfied as CPU
Utilization is high. Check both checkboxes, Set Status for Device and Set Status for
Intent.
5. Else: Define a color (green), message and status in case If condition is not satisfied as CPU
Utilization is OK.
6. Click on Apply to save the settings and close the window.
7. Click Save to save the intent to the Intent Manager.

NetBrain R11.1b | 147


5.2.4 Replicate NI for the auto intent:

Replicate the created NI Check CPU to multiple devices (device types same as seed devices):
1. Click the Intents menu on the desktop sidebar and select Auto Intent Wizard.

2. You need to input the data in the following three sections of the Auto Intent Wizard:
• Intent Template
• Pre Decode
• Auto Intent

148 | NetBrain R11.1b


[Link] Intent Template

1. Seed Intent: Click Select and choose the intent Check CPU from the intent manager.
2. Intent Template for: Choose the Device-based Replication.
3. Intent Qualification: Set the Target Devices of the replication by clicking the Select drop
down menu beside Define via Device Group/Sites.
4. Click Select Device Groups to choose the predefined group.

NetBrain R11.1b | 149


5. Choose the group in the popup window and click OK to save and close the window.

In order to reduce the testing of unnecessary commands, add the function of Intent
Parser Qualification in the intent template settings. In this way, the incoming devices will be
filtered according to the contents in the Intent Parser Qualification and achieve the ability to
filter Intent Parsers as per different Vendor Devices.

6. Click the Full Settings for Template link in the top right and do as follows:
a. Click Save when prompted to Save the Intent

b. Toggle the Intent Template on by clicking on the Serve as Template for.


c. Under the Device Qualification tab, select your Device Group.

150 | NetBrain R11.1b


d. Click and open the 0/2 that is next to the Define Via Command Parser Qualification to
define the qualification:

e. Click UnDefined under each seed device and choose its appropriate vendor type.
f. Click OK to save and close the window.

g. Go to the Critical Variable Tab and uncheck the variables except for the CLI command.
NOTE: Choose the variables as Critical Variables to qualify devices that can match with
seed device parsers.
h. Uncheck the variables and check in CLI commands to match the qualified devices with
the seed device parsers.
i. Click OK to save and close the window.

NetBrain R11.1b | 151


7. Click Next in the Intent Replication Wizard to move to the decode step.

152 | NetBrain R11.1b


[Link] Pre-Decode

1. Install Intent Template to: Select a group from the dropdown menu to add the intent in
the IBA center.

2. Click the Install & Decode button to install the intent to the target devices.

NOTE: The status of the intent installation is displayed next to the Install & Decode button.

3. Click Decode Now to start decoding the intent to the target devices.

NOTE: Click the Refresh icon after a minute to see the updated decode status. The updated
decoded devices can be seen at the bottom of the Decode Now button.

4. Check the Update Intent Baseline to update the seed intent baseline information before
replicating it to target devices and click OK.

NOTE: At this step, wait for the decode to complete by refreshing the status until you see a
number of devices have been decoded.

NOTE: If the netbrain system fails to capture the critical variable of the target devices, then
the device will not be qualified for intent replication.

NetBrain R11.1b | 153


5. Click the Refresh icon after a minute to see the updated decode status. The updated
decoded devices can be seen at the bottom of the Decode Now button.

6. Click Next to move to the next section Auto Intent.

154 | NetBrain R11.1b


View decoded results from Intent Based Automation Center:
7. Click Intent Based Automation Center at the top right corner to open it in a new window.
a. In the Intent Based Automation Center, you can see the NIT under your chosen group
while replicating the intent.

b. Select the NIT Check CPU and its corresponding results can be seen on the Left side
of the screen.

c. Click 6 Devices decoded to view the detailed report and the log of the decoded devices.

NetBrain R11.1b | 155


[Link] Auto Intent

The Auto Intent section is the final step of this process. Input the following details to complete:
1. Enable for Auto Intent: Enable the option by clicking the radio button.
2. Select Folder: Choose a folder location for the Auto Intent by clicking on Select.
3. Auto Intent Description: Add a description, e.g., CPU Memory utilization check.
4. Choose a profile from Select Profiles, or create a new profile CPU Check using +Add Profile
and click OK.
5. Click Finish to save and close the Auto Intent Wizard.

156 | NetBrain R11.1b


5.2.5 Cloning the Intent and Run

Execute the intent by drawing the targeted device group to a new map as follows:

1. Go to Device Group from the start menu .

2. In the device group pane, select the predefined group and click the drop-down menu.

3. Click Draw Devices on Map to add the devices to a new map.

4. Close the Device group pane.

5. Open the Auto Intent pane under the Intent tab and Select Profile (Check CPU) that you
have created in Section [Link].

NetBrain R11.1b | 157


6. Tick in the check boxes of Intent Check CPU and the devices listed underneath.

7. Click Replicate. All the devices will appear under the new Preview Intent section.

158 | NetBrain R11.1b


8. Click Run to execute the intent diagnosis on all the devices. The result for each device will be
displayed as you have programmed in Section 5.2.3.

9. Save the Map with all the devices and results for future reference.

10. Save to Map Intent to view and run the intent (apart from schedule) as and when needed.

NetBrain R11.1b | 159


In this chapter, you have learned:

• Creating a Network Intent with multiple vendor seed devices.

• Replicating the intent to different vendors with different CLI commands by using the

function Intent Parser Qualification and filter Intent Parsers as per different Vendor

Devices.

160 | NetBrain R11.1b


6 Manage Network Automation with ADT
In the last three chapters, you learned how to create and replicate an intent. In this chapter, you
will learn how to manage the intents with the Automation Data Table using multiple scenarios.

6.1 ADT Overview

An Automation Data Table (ADT) is an extended global data table for managing the critical
network assets and network intents associated with those network assets.

ADT is designed to provide users with two capabilities:


• Use ADT to build, organize and share intents across the network: Customize more network
automation assets in Automation Data Table Manager, such as critical Application and Path,
critical WAN Link, critical Device Failover, critical Subnet, and critical Route, then associate
intents and diagnosis result for troubleshooting network problem.
• ADT is a database for intents, supporting intent creation and replication. The system
provides two methods (Base Table and Column Group) in Automation Data Table Builder
to build the basic table data and create or bind the intent for each automation asset.
The ADT provides a foundation for creating tables. You can customize the table by adding
columns through the Table Builder in ADT. The Table Builder offers different methods to
construct tables. Additionally, you can use the Intent Replication Wizard to add an Automation
column (NI) in ADT.
The following is a Base Group Table Using the method Devices of Device Group:

NetBrain R11.1b | 161


Here is an example of a final ADT comprising the Base Group Table, Automation Column, and
Intent Group Columns:

The following sections will guide you through creating a basic table and incorporating the NI
using different methods.

6.2 Create Your First ADT

This chapter teaches how to create your first ADT for critical devices. You will also learn how to
use the Intent Replication Wizard to add an Automation column in the ADT table.

The creation of ADT comprises three main steps:

1. Build Base Table: Build the base table using the devices of this device group.
2. Add the Automation Column by Intent Replication Wizard in the base table.
3. Run and Pop Automation Results to ADT Table.

The final ADT table will be like:

6.2.1 Build Base Table

Let us create a simple ADT to include all critical devices and intents to monitor the operation status
such as CPU and memory for these devices.

162 | NetBrain R11.1b


[Link] Prerequisites

Create a Device Group before creating an ADT for the base table using the method Devices of
Device Group. If the device group already exists, you can skip these steps.

You can create your own folder and create a Device Group in your folder:

1. Click the start menu and click Device Group from the Network tab.

2. In the Device Group pane, right-click the My Device Groups node or the Shared Device
Groups node and then select New Device Group from the drop-down menu.

Note: The device groups in the My Device Groups category are only accessible to you; the
device groups in the Shared category are accessible to all domain users.

3. In the Device Group Properties dialog, enter the name and short description for the device
group.

4. Click + Static and select Static Device or Interfaces from the dropdown.

Note: You can also use the method Dynamic Search to add the device to the Device Droup
list.

5. Specify the device scope by selecting Device Type, Device Group, or Site.

6. Select the device you wish to add to the device group and then click to add the device to
the list.

NetBrain R11.1b | 163


You can select multiple devices and use to add all devices to the list.

7. Click OK. The Device Group Check CPU Group is now created under the Shared Devices
Group Folder.

164 | NetBrain R11.1b


[Link] Build ADT

To build the base table with the data in devices, follow the steps below:

1. Click the start menu and go to the Intent-Based Automation tab.

2. Click Automation Data Table to open the Automation Data Table Manager.

3. In the Automation Data Table Manager screen, Click the Shared Tables dropdown and
then click New Table.

4. Enter the ADT table name, e.g., Check CPU and then click Save.

5. Open the newly created Check CPU table from Shared Tables.

6. Click Table Builder to open Automation Data Table Builder to define the Base Group.

NetBrain R11.1b | 165


7. Under the Base tab of Automation Data Table Builder, define the following settings:

a. Input descriptions for the base table to describe its use and function.

b. Select Method Devices of Device Group from the dropdown to Build Base Table.

c. Click the Select link to select the created device group (Check CPU) for building the base
table with the devices in the device group and then click OK.

166 | NetBrain R11.1b


d. Within the Built-in Fields section, choose each column and move it into the Column
Group (Base) pane.
You are going to build an ADT table with the following columns: Device, Hostname,
Device Type, Vendor, Model, and Management IP.

e. Click Save and Build. The Build Table dialog appears, define the settings as per your
preferences and then click Build to save all the settings.

Now, the ADT Base table has been successfully created for the selected Device Group.

NetBrain R11.1b | 167


6.2.2 Add the Automation Column by Intent Replication Wizard

In this section, you will use the Intent Replication Wizard to add the Automation Column in the
Check CPU ADT table.

Note: Make sure you have created the NI Check CPU in the section 5.2. You may utilize that NI or
any comparable NI in this instance to incorporate that Intent as a column in the ADT table.

1. Click the start menu and go to the Intent-Based Automation tab.

2. Click Intent Manager to open the Network Intent Manager.

3. Hover over the NI check cpu or any other intent, click dropdown and open the Intent
Replication Wizard.

168 | NetBrain R11.1b


4. In the Seed Intent tab, check for your NI (check cpu) and then click Next to go to the Define
ADT tab.

5. Define ADT:
The Define ADT tab allows you to select either an existing ADT or create a new ADT. Select
the Check CPU ADT created in the last section.

a. Click the Use an Existing ADT option and select the Check CPU. In the Automation Data
Table section, the Check CPU ADT will be added.

b. In the Replication Intent to section, enter Check CPU as an Intent column group name.

c. Click Next to go to the Replicate Intent tab.

NetBrain R11.1b | 169


6. Replication Settings

a. In the Intent Qualification section, click the Select link to add Device Groups/Sites.
Add the device group you created earlier, Check CPU Group. For more information
about other setting, refer to the Chapter 5.

b. Click Next to go to the Replicate Intent tab.

7. Replicate Intent:

a. In the ADT Columns section, you can see the default Column Name, Replicated Intent.
You should modify this name to be more intuitive.

b. Add more columns by ticking the checkboxes in the Additional Columns dropdown.

c. Click Save and Replicate to save all the settings.

You can see the Open Ouput ADT option after the successful submission of the
replication request.

d. Click Open Output ADT to check the replicated Intent column in the ADT Manager.

170 | NetBrain R11.1b


The table will now be populated with devices, replicated Intent, and Intent columns.

8. Review the new Intent column. The Replicated Intent should be filled, and other columns,
such as Intent status Code, are empty since intents have not been executed yet.

9. Add Tags to the Intnet Column, which are useful for triggered automation and other
functions.

a. In the Check CPU intent column, click menu and open Tag Current Column.

b. In the Tag Current Column, click and add new tag, such as CPU and CPU utilization.

NetBrain R11.1b | 171


c. In the Automation Tag Manager, click + Add Tag and add your tags, and close the
dialog.

d. In the Tag Cuttent Column, click +Add and add the newly added tags.

e. Click OK to save the tags for intent column.

172 | NetBrain R11.1b


6.2.3 Run and Pop Automation Results to ADT Table
Run Intent and Rebuild Table:

a. Hover over the Intent column, click menu and then click Run Intents Once to
execute all the Intents.

b. In the Run Intents Once dialog, various options are available for specifying the data
source and filtering the intents to be executed.

Select Data Source: Any one of the three Data Sources can be selected; Live Data,
Current Baseline, ADT Dataset. In this example, we will use Live Data as a Data Source.

c. Click OK to run the Intent once.

The notification message will notify that the task is submitted. The Intents will be
executed.

NetBrain R11.1b | 173


d. In the Notification window, click OK.

e. Click Rebuild Table to open the Rebuilt Table dialog.

f. Select the Column Group from the dropdown and tick the Log mode per your
preference.

g. Click Build.

Wait for a few minutes for the intents to be executed and check the Status Code and
Execution Time.

174 | NetBrain R11.1b


6.3 Build ADT from Intent Template

In the last chapter, you learned how to create your first ADT for base groups and populate the
automation column in the ADT via the Intent Replication Wizard.

This section teaches how to build ADT (base table + Intent group table) from Intent Template.
You will create an ADT to include Cisco Router devices and intents to monitor the Golden ACL
configuration status for these devices.

This section comprises three main steps:

1. Create Network Intent for Device CA-TOR-R1 and create Variables to define Diagnosis.

2. Use Intent Replication Wizard to add Intent to the ADT Table

3. Open and Edit ADT Table: Add base group in the ADT.

The final ADT will be like:

NetBrain R11.1b | 175


6.3.1 Create Network Intent
In this section, you will create an Intent (Golden ACL Config Check) from the Intent Manager.
You will use this NI in the Intent Replication Wizard to replicate the Intent in the ADT table.

1. Click the start menu and go to the Intent-Based Automation tab.

2. Click Intent Manager to open the Network Intent Manager.

3. Hover over the folder you wish to create a new NI. Click dropdown and select New
Network Intent to open the Network Intent (Edit mode) window.

4. Provide a title, “Golden ACL Config Check,” and a brief description (optional) of the Intent.

5. To add the target device(s), select the option + Device to open the Select Devices window.
Search and add a device (e.g., device CA-TOR-R1) as follows:

a. In the search field, type the device name, e.g., CA-TOR, and then press Enter.

b. From the list, choose the device CA-TOR-R1 and then click .

c. Click OK to save and close the window.

176 | NetBrain R11.1b


[Link] Define CLI Command and Retrieve Data

1. Click + Add CLI Diagnosis to open the diagnosis window.

2. In the CLI Command Diagnosis window command field, enter the command, show run.

3. Click Retrieve Live Data to retrieve the data from the live network.

4. The retrieved data is displayed in the Define Variable pane. You can edit this data depending
on the use case.

NetBrain R11.1b | 177


[Link] Define Variable with Visual Parser

1. Click + New Pattern and select Paragraph to start defining the variables.
2. Define the ID Line pattern for the Access list.
a. In the Sample Data, search for the access-list.
b. Select the access list number 101 and click Parse Variable.
The ID Line A shows the variable ^access-list $_dummy $ip ip.
Change the Variable pattern to ^access-list $int:acl_number to identify all access list
numbers.

3. Define a Variable Line Pattern for Access list configuration.


a. Click + Parse Lines in the Output pane to open the Parser Lines window.
b. Set variable name as acl_config.
c. In The line of variable dropdown, check the $acl_number checkbox.
d. Click Apply to close the Parser Lines window.

178 | NetBrain R11.1b


You can see the pattern LinesByVariable[$acl_config]:$acl_number is created.

4. Verify the Output.


5. Click Apply to create a pattern. And the final Output will be:

NetBrain R11.1b | 179


6. Click the pen icon of Paragraph1 and rename it as acl_list_config.

[Link] Define Diagnosis

Follow the steps to define diagnosis:

180 | NetBrain R11.1b


1. Go to the Define Diagnosis tab and click Add Diagnosis.

2. Enter the diagnosis Name (Golden ACL check) and select the Variable $acl_config for the
Anchor.

3. Define a condition as what IF:

a. Select condition A for variables acl_list_config: if the status does not Equal acl_list_config.

b. Select condition B for variables acl_list_config: if the status Is empty.

c. Boolean Expression: A or B.

4. Define Intnet Ouput

Enter a message under the Then and Else output areas to appear as the result of the
diagnosis.

a. Then: Define a color, message and status in case If condition is satisfied, as shown in the
figure.

b. Click the checkbox of the Set Status Code for Device and Set Status Code for Intent to
duplicate the message to the Device Status Code.

c. Else: Define a color, message and status in case If condition is not satisfied, as shown in
the figure.

d. Click the checkbox of the Set Status Code for Device and Set Status Code for Intent to
duplicate the message to the Device Status Code.

5. Click on Apply to save the settings and then close the window.

6. Click Run to execute Intent and then close the window.

NetBrain R11.1b | 181


6.3.2 Use Intent Replication Wizard to add Intent to the ADT Table
In this section, you will use the Intent Replication Wizard to add the Automation Column
(Golden ACL Config Check) in the ADT table. The New ADT will be created.

1. Click the start menu and go to the Intent-Based Automation tab.

2. Click Intent Manager to open the Network Intent Manager.

3. Hover over the NI (Golden ACL Config Check), click dropdown, and open the Intent
Replication Wizard.

4. In the Seed Intent tab, check for your NI (Golden ACL Config Check) and then click Next to
go to the Define ADT tab.

182 | NetBrain R11.1b


5. Define ADT.

In the Define ADT tab, you will use the Create a New ADT option to create a new ADT.

a. Create a New ADT.

i. Click Create a New ADT to create ADT by device group.

ii. Specify the ADT table name as Golden ACL Config Check. The description is optional.

iii. Select the Location where you want to save the table.

iv. From the Device Groups dropdown, click Select Device Group and then select a
device group from your specific folder.

v. Click Save.

b. In the Replicate Intent to section, enter Intent Group as an Intent column group name.

c. Click Next to go to the Replicate Intent tab.

6. Replication Settings

a. In the Intent Qualification section, click the Select link to add Device Groups/Sites.
Add the device group Check CPU Group.
b. Click Next to go to the Replicate Intent tab.

NetBrain R11.1b | 183


7. Replicate Intent:
a. In the ADT Columns section, you can see the Column Name as Replicated Intent. You can
change this name to Golden ACL Config Check.

b. Add more columns by ticking the checkboxes in the Additional Columns dropdown. Add
columns, Intent Message, Intent Status Code, Device Status Code, Intent Devices, and
Last Execution Time as Intent Group.

c. Click Save and Replicate to save all the settings.

You can see the Open Output ADT option after the successful submission of the
replication request.

d. Click Open Output ADT to check the replicated Intent column in the ADT Manager.

184 | NetBrain R11.1b


The table will now be populated with devices and the replicated Intents (Golden ACL
Config Check).

8. Review the new Intent columns.

NOTE: All columns related to the intent results are empty because the Intents are not
executed.

NetBrain R11.1b | 185


6.3.3 Open and Edit ADT Table
In this section, you will add the base table and run the Intents to populate results.

1. Click Table Builder to add columns in the Base table and Group table.

There are two groups: the Base group and the Intent group. You will add a few columns to
the Base group using the Devices of Device Group method.

2. In the Base group, choose each column (Hostname, Mgmt IP, and Vendor) and move it into
the Column Group (Base) pane.

3. Click Save and Build.

In the Build Table dialog, select the column groups to be built and select a log model, then
click Build to save the changes.

186 | NetBrain R11.1b


The table will now be populated with added base group columns.

[Link] Run Intents and Rebuild Table

Follow the step-by-step instructions to Run Intent Once and Rebuild Table.

1. Hover over the Intent column, click menu and then click Run Intents Once to execute all
the Intents.

2. In the Run Intents Once dialog, various options are available for specifying the data source
and filtering the intents to be executed.

Select Data Source: Any one of the three Data Sources can be selected; Live Data, Current
Baseline, ADT Dataset. In this example, we will use Live Data as a Data Source.

3. Click OK to run the Intent once.

The notification message will notify that the task is submitted. Filter Intents to be executed.

NetBrain R11.1b | 187


4. In the Notification window, click OK.

5. Click Rebuild Table to open the Rebuilt Table dialog.

6. Select the Columm Group from the dropdown and tick the Log mode as per your
preference.

7. Click Build.

Wait for a few minutes for the intents to be executed and check the Status Code and
Execution Time.

188 | NetBrain R11.1b


6.4 Create ADT Base Table from CSV File

In the last chapter, you learned how to create NI for Golden ACL Config Check and populate
that NI into an ADT via Intent Replication Wizard.

This section teaches how to create the ADT base table by importing a CSV file.

NOTE: Make sure you have a CSV file available on your local computer. Once imported, the
contents of the CSV file will be loaded into the ADT.

Sample of CSV file content:

Critical Route Description


[Link]/30 Server Farm
[Link]/22 North America Lab
[Link]/30 Boston Data Center
[Link]/24 Toronto Data Center
[Link]/16 Beijing Voice Server
[Link]/30 DMZ Zone
[Link]/24 Enterprise Zone
[Link]/28 Production Zone
[Link]/30 Lab Zone

1. Click the start menu and go to the Intent-Based Automation tab.

2. Click Automation Data Table to open the Automation Data Table Manager.

3. In the Automation Data Table Manager screen, Click the Shared Tables dropdown and
then click New Table.

4. Enter the ADT table name, e.g., Critical Routes <your_name> and then click Save.

NetBrain R11.1b | 189


5. Open the newly created Critical Routes table from Shared Tables.

6. Click Table Builder to open the Automation Data Table Builder of the created ADT.

7. Under the Base tab of Automation Data Table Builder, define the following settings:

a. Input descriptions for the base table to describe its use and function.

b. Select Method Imported CSV from the dropdown to Build Base Table.

c. Click the Select link to import the CSV file.

d. Click Browser and select the Critical [Link] from your local computer.

e. Click OK.

Under Built-in Fields, you can see Critical Routes and Description fields.

f. Within the Built-in Fields section, choose both fields and move them into the Column
Group (Base) pane.

g. Under the Define Table Key dropdown, tick the Critical Route and Description
checkboxes.

h. Click Save and Build. The Build Table dialog appears, define the settings as per your
preferences and then click Build to save all the settings.

190 | NetBrain R11.1b


The ADT Base table is successfully built from the imported CSV file, which contains the
Critical Routes and Description columns.

You just learned and create a base ADT table, create NI and populate NI in ADT via Intent
Replication Wizard. Congratulations! Let's recap what you have learned:

• Create Network Intent and create variables using Visual Parser and Define Diagnosis.
• Add Automation column in ADT via Intent Replication Wizard.
• Add base group in ADT.
• Create an ADT Base table by importing the CSV file for critical routes.

In the next chapter, you will learn how to use ADT to create a Network Assessment to check if a
specific Route exists in the Route Table and to check OSPF Neighbor Stability.

NetBrain R11.1b | 191


6.5 ADT Dataset

ADT dataset is a data source designed to include the device and command data (including device
configuration files and CLI commands). ADT dataset, embedded in ADT, can be repetitively used
and shared with users in the same domain.

There are four methods of building an ADT Dataset to add device configuration files and CLI
commands as links into the dataset column, serving as data sources for intent creation,
decoding, replication, and execution. The following diagram illustrates the workflow of Dataset.

6.5.1 Why do you need this feature?


ADT dataset is developed to achieve the following goals:

• ADT dataset and Benchmark data can be repetitively used for building and debugging intent-
base automation even when the live network is not accessible or is only accessible in a
certain period, increasing the scalability. This will benefit the following workflow:

o Continuous network assessment with network-wide summary dashboard (auto-


updating).

o Build a baseline for the entire network.

• By using ADT Dataset, you can not only analyze current network status via automation
features such as auto intent, but also analyze the network status based on historical data or
known-good data. For example, you can view the diagnosis results of the known-good
application path.

192 | NetBrain R11.1b


• For detecting network change, the previous network data can be stored in the dataset, and
then be compared with the data obtained later to determine whether network change
occurs.

6.5.2 Main User Flow

1. For the consultants who do not have network access, the workflow includes the following
main steps:

a. Consultants provide useful CLI command files to NetBrain Engineers.

b. Import the CLI command files to the system via Import File Wizard, then create the ADT
dataset using the imported files as data source.

c. Carry out intent replication using the ADT Dataset in step b as the data source.

d. Run intents using the same ADT dataset.

2. For consultants who only have network access for a certain period, they can work on cached
data with the following main steps:

a. Create an ADT and decode intent to create the intents by NIT when the network is
available.

b. Create an ADT dataset using the manually retrieved data by selecting the intent column
of the ADT.

c. Manually retrieve the command data in the ADT dataset when the network can be
accessed.

d. Run intents via dataset when they do not have live network access.

NetBrain R11.1b | 193


7 Intent-Based Network Assessment

In the last chapter, you learned how to use the Automation Data Table (ADT) to manage
network automation, including how to build an ADT from different types of methods. A well-
designed ADT is the foundation of the network assessment across your whole network. In this
chapter, you will learn two examples of Network Assessment using the ADT: one checks whether
a critical route exists in all routers; the other checks the stability of OSPF neighbors. The key
steps of network assessment with ADT are:

1. Create a device group to include all devices you want to run the assessment.

2. Select a device from the device group and create the intent for this device.

3. Use Intent Replication Wizard to replicate Intent in ADT to all devices of the device group.

4. Run the intents of the ADT column once or via Intent Timers.

5. Create the Intent Dashboard or Summary Dashboard to view the results.

7.1 Assess the Existence of a Specific Route.

In the last chapter, you learned how to create a base ADT table, create NI, and populate NI in
ADT via the Intent Replication Wizard. Also, you learned how to create ADT from a CSV File.

In this section, you will learn how to use the system route table from the Built-in Data Table in NI
to check if a device has access to a server farm IP [Link]. This section covers three new
concepts with a simple example: built-in table (system route table), Intent Dashboard, and
exported the results to CSV file.

There are five main steps:

1. Create a Device Group for All Cisco Routing Devices (you can use any existing group that has
all Cisco Routing devices).

2. Create Map Intent to Check If Specific Route Exists in Route Table

3. Use Intent Replication Wizard to Replicate Intent in ADT

4. Create Intent Dashboard for ADT Automation Column

5. Export Diagnosis Result to CSV

194 | NetBrain R11.1b


The final ADT will be like:

The Intent Dashboard for Server Farm Route Check:

7.1.1 Create a Device Group for All Cisco Routing Devices


You will use the device group that is created in the Section Build Base Table.

7.1.2 Create Map Intent to Check If Specific Route Exists in Route Table
1. In the search bar, type US-BOS-R1 and then click Search.

2. Hover over the search result, click Map and then close the Search Results window.

NetBrain R11.1b | 195


3. Save the Map Intent:
a. On the Map page, click save button or press Ctrl+S.

b. On the Save Map window, select the Private folder, provide name, Specific Destination
Check-<your name> and then click OK.

196 | NetBrain R11.1b


4. Edit Network Intent.

a. Under the Intent tab, click Map Intent. We are not using Quick Intent because Quick
Intent does not support the built-in system Route Table.

b. Click the edit icon to open the Network Intent edit mode.

c. In the Network Intent (Edit Mode) window, click +Device.

d. In the Select Devices window, Select US-BOS-R1, click to add a device to the list, and
then click OK.

5. Select System Route Table.

a. Click the Intent Variables: Manager to open the Intent Variables for Seed Logic
window.

b. In the Intent Variable tab, click +Add Built-in Data Table to add a data table.

c. In the Select Built-in Data Table window, tick the Global Route table checkbox and then
click OK.

NetBrain R11.1b | 197


d. The Global Route Table is imported into the Intent. Click Close.

198 | NetBrain R11.1b


[Link] Define Diagnosis

In this example, no Visual Parser is required because the System Route Table is used explicitly.
We are leveraging the Device Diagnosis Block here.

1. In the Network Intent (Edit Mode), click menu and then select Add Device Diagnosis
Block.

2. Define Diagnosis 1.

a. Change the Diagnosis 1 name to Route Server Farm Check.

b. You need to select the Loop Table Rows checkbox to loop the Route Table.

c. From the Table Key dropdown, select Dest_Addr and Mask.

d. Set the If condition as Dest_Addr equals to [Link]. Then set the diagnosis message
color and text.

e. Click OK.

Because you are iterating through the System Built-in Route Table, which may contain
numerous entries, any entry matching [Link] signifies that the device has access to
the Server Farm. Therefore, you cannot write an alert statement in this case. Instead, you
can utilize the Intent Variable for this purpose.

NetBrain R11.1b | 199


3. Add Intent Variable

a. Click Intent Variables: Manager to add Intent Variable.

b. Click Intent and then click + Add Intent Variable.

c. In the Add Intent Variable window, set the Variable Name to


HAS_ACCESS_TO_SERVER_FARM, Set its Initial Value to NO, and then click OK.

This Intent Variable will work as a flag in your diagnosis.

d. Click Close.

200 | NetBrain R11.1b


4. Edit Diagnosis to Add Logic.

We can Add Logic to set the Intent variable as long as any entry in the route table during the
loop equals [Link].

a. Click Edit Diagnosis to open the Device Diagnosis Block window.

b. From the Add Logic dropdown, click Advanced > Set Intent Variable.

NetBrain R11.1b | 201


c. Under the Set Intent or Task Variable section, set the Intent Variable
HAS_ACCESS_TO_SERVER_FARM from its default value of NO to YES.

202 | NetBrain R11.1b


5. Define Diagnosis 2.

a. Click to add Diagnosis 2 and change the Diagnosis 2 name to Overall Check.

b. In the Overall Check Diagnosis, we will use HAS ACCESS TO SERVER FARM to define the
diagnosis. If the HAS ACCESS TO SERVER FARM equals NO. Then, set the diagnosis
message (color as red) and set the status code for the device.

c. ElseIf HAS ACCESS TO SERVER FARM equals YES. Then, set the diagnosis message (color
as green) and set the status code for the device.

Since you have diagnosed whether or not the device has access to the serve farm in
Diagnosis 2, you can delete the diagnosis message in Diagnosis 1.

d. Go to the Diagnosis 1 tab and Delete the Diagnosis Message.

e. Click OK.

NetBrain R11.1b | 203


The execution order for multiple diagnoses is the same as the creation order, which
means Diagnosis 2 will always be done after Diagnosis 1, ensuring that the HAS ACCESS
TO SERVER FARM Intent variable is accurate.

6. Click Save to save the Map Intent and then close the window.

7.1.3 Run Map Intent


In this section, click the Run button to view the Map Intent result.

204 | NetBrain R11.1b


7.1.4 Use Intent Replication Wizard to Replicate Intent in ADT
In this step, you will use the Intent Replication Wizard to create a new ADT and replicate the
created Map Intent into the ADT to check how many devices in this domain have access to the
server.

1. From menu , click Intent Replication Wizard.

2. In the Seed Intent tab, check for your NI (Specific Destination Check_SP) and then click Next
to go to the Define ADT tab.

3. Define ADT.

In the Define ADT tab, you will use the Create a New ADT option to create a new ADT.

a. Create a New ADT.

i. Click Create a New ADT to create ADT by device group.

ii. Specify the ADT table name as Specific Destination Check. The description is
optional.

iii. Select the Location where you wish to save the table.

iv. From the Device Groups dropdown, click Select Device Group and then select a
device group from your specific folder.

v. Click Save.

NetBrain R11.1b | 205


b. In the Replicate Intent to section, type Intent Group as an Intent column group name.

c. Click Next to go to the Replicate Intent tab.

4. Replication Settings

a. In the Intent Qualification section, click the Select link to add Device Groups/Sites.
For example, select the device group Check CPU Group.

b. Click Next to go to the Replicate Intent tab.

206 | NetBrain R11.1b


5. Replicate Intent

a. In the ADT Columns section, you can change the column name to Server Farm Route
Check to populate in the ADT column. You can change this name as as per your
preference.

b. Click Save and Replicate to save all the settings.

You can see the Open Output ADT option after the successful submition of the
replication request.

c. Click Open Output ADT to check the replicated Intent column in the ADT Manager. The
ADT will open in a new tab of your web browser.

The table will now be populated with devices, replicated Intent, and Intent columns.

NetBrain R11.1b | 207


7.1.5 Run Once for the ADT Automation Column

1. Hover over the Server Farm Route Check column, click menu and then click Run Intents
Once to execute all Intents of this column.

2. In the Run Intents Once dialog, various options are available for specifying the data source
and filtering the intents to be executed.

Select Data Source: Any one of the three Data Sources can be selected; Live Data, Current
Baseline, ADT Dataset. In this example, you will use Live Data as a Data Source.

3. Click OK to run the Intent once.

The notification message will notify that the task is submitted and intents will be executed.

4. In the Notification window, click OK.

208 | NetBrain R11.1b


5. Click Rebuild Table. The Rebuilt Table dialog appears.

6. Select the column group from the dropdown and tick the Log mode as per your preference.

7. Click Build.

Wait a few minutes for the Intents to be executed and verify the ADT.

7.1.6 Create Intent Dashboard for ADT Automation Column


1. Click the icon and open the New Intent Dashboard.

2. In the Create Intent Dashboard window, define the following:

a. Enter the Dashboard Name, Server Farm Route Check <your name>.

b. Select the Location where you wish to save the Intent Dashboard.

c. In the Data Source dropdown, select Automation Data Table.

d. In the Automation Data Table section, click the Select ADT Table link and then select
the ADT Table, Server Farm Route Check.

e. Click Create.

NetBrain R11.1b | 209


3. In the Create Intent Dashboard dialog, click Open Intent Dashboard.

NOTE: The Intent Dashboard observes specific network issues with details, while the
summary dashboard provides an overall view by displaying intent results from
multiple Intent dashboards. With Summary Dashboard, you can group Intent
Dashboards into widgets based on diagnosis purposes and display intent results
by device, site or device groups. You can use the summary dashboard to monitor
critical information across thousands of devices and discover the root cause for
issues in one view. For more information, refer to chapter 9.4 Dashboard.

210 | NetBrain R11.1b


[Link] Edit Intent Dashboard

You can modify the Intent Dashboard in edit mode by selecting Edit Dashboard from menu
located at the top-right corner of the dashboard window:

1. Click the Intent Result History section to view the dashboard data to be edited.

2. Change the Historical Result to the Last Result.

3. Click Edit Data and select Intent Device Result

4. Change Measure to Times of Alerts Detected on Devices.

From the Dashboard you can observe that 7 devices out of 11 Cisco Routing devices do not
have access to the Server Farm.

5. Use the Alert Notifications feature to enable Alert Notification to send alerts to the
recipient's email address.

6. Click Save to save the Intent Dashboard and close the Dashboard.

NetBrain R11.1b | 211


7.1.7 Export Diagnosis Result to CSV
You can export the diagnosis message as a CSV report to check the diagnosis messages of all
related intents based on the dashboard or ADT column to quickly analyze whether there is a
problem with the network.

1. Click menu and then select Export Diagnosis Result to CSV from dropdown.
2. Click Export to export the CSV file to the local disk.

You can do more settings like Filter Diagnosis Message by Intent Status Code, Filter Diagnosis
Message by Device Status Code, and Define Columns.

Example: Sample of the exported CSV.

212 | NetBrain R11.1b


7.2 OSPF Neighbor Stability Check

In the last chapter, you learned how to create a Map Intent to check whether specific routes
exist in the Route table. Also, you learned how to create an Intent dashboard and export CSV
for Automation.

This chapter teaches how to create an NI to check OSPF Neighbor Stability, covering one new
concept: the signature variable.

There are three main steps:

• Define a parser from the CLI command, show ip ospf interface and define the signature
variables, OSPF PID, Area Number, and OSPF router ID.

• Build the ADT base table from the intent template to populate the Signature Variables to
the ADT table.

• Create Network Intent for OSPF Neighbor Stability Check: Build the automation column.
Create an Intent and add a column OSPF Neighbor Stability Check.

The final ADT will be like:

NetBrain R11.1b | 213


7.2.1 Create Signature Variables of an Intent
In this section, you will create a Network Intent to specify the CLI command for the Parser and
subsequently define the Signature Variable for OSPF Interface.

1. Click Intents from the quick access toolbar, and then click Intent Manager.
2. Move the cursor over the folder you want to create an Intent and then click dropdown.
You can also create a new folder and create a new Intent.
3. From the dropdown menu, click New Network Intent to open Network Intent (Edit
mode).

4. Create an NI by entering the title OSPF Base-PID Area RID and a brief description (optional)
of the intent.
5. To add the target device(s), select the option + Device and a window Select Devices will
appear.
6. You can select the devices by map, device type, device group, or site.
(Or)
If you can search and add a device (e.g., device US-BOS-R1) as follows:
a. In the search field, type the device name, e.g., US-BOS, and then press Enter.

b. From the list, choose the device US-BOS-R1 and then click to add the device to
the list.

214 | NetBrain R11.1b


c. Click OK to save and close the window.

NetBrain R11.1b | 215


[Link] Define CLI Command and Retrieve Data

1. Click + Add CLI Diagnosis to open the diagnosis window.


2. In the CLI Command Diagnosis window command field, enter the command show ip
ospf interface.
3. Click Retrieve to retrieve the data from the Live Data.
4. The source data is displayed in the Define Variable pane. You can edit this data
depending on the use case.

216 | NetBrain R11.1b


[Link] Define Variable with Visual Parser

1. Click + New Pattern and select Paragraph from the dropdown to start defining the
variables.

2. In the sample data, select the text and create the following variables:

a. Double-click Loopback0 in line 2. The variable $var1 is created in the ID Line A to parse
all available ospf interfaces in the sample data.

Change the default name $var1 to $ospf_int.

b. Double-click up in line 2. The variable $var2 is created in the ID Line A to parse the
status for all the ospf interfaces.

Change the $var2 with $int_state.

c. Double-click the address, “[Link]/32” in line 3. The variable $Address is created in


the Var Line 1 to parse all the IP addresses for the ospf interfaces.

d. Double-click the Area, “0” in the line 3. The variable $int:Area is created in the Var Line
1 to parse all the areas for ospf interfaces.

e. Double the Process ID “1” in the line 4. The variable $int:ID is created in the Var Line 2
to parse all the process ids for ospf interfaces.

NetBrain R11.1b | 217


f. Double the Router ID “[Link]” in the line 4. The variable $ID1 is created in the Var
Line 2 to parse all the router ids for ospf interfaces.

Change the Var Line 2 with valid variable ID $int:ospf_pid, Router ID $int:ospf_rid.

3. Verify the Output for all the parsed variables.

4. Click Apply to create a pattern.

5. Click the pen icon and rename the parser, ospf_inteface.

6. Click Apply and then close the window.

218 | NetBrain R11.1b


[Link] Create Signature Variable

1. From the menu, click Full Settings for Template to define device qualification and
critical variables.
2. Enable the toggle button, Serve as Template for, and ensure that Device-based
Replication is selected.
3. Under the Intent Qualification tab, click Undefined to define the devices via Dynamic
Search.
a. Set the Device Type to be Cisco IOS Switch and Cisco Router.
b. Set that the Config file contains the ospf config.
c. Click OK to save the configuration and close the window.

4. Define Critical Variable manually.


a. Under the Critical Variable tab, select Manullay Select.
b. Under the Critical Variable column, select the variable ospf_inferface.

NetBrain R11.1b | 219


5. Create Signature Variables in Advance Settings.
a. Under the Signature Variables section of the Advanced Settings tab, click + Add via
Table Columns.
b. From the Select Table Columns window, check the area, ospf_pid, and ospf_rid
checkboxes.
c. Click OK to open the Add Signature Variable window.
d. In the Add Signature Variables window, provide the name ospf_pid_area_rid.
e. Click OK to save the table columns.

6. Click OK to save the Intent Template settings.


7. Click Save to save the NI and then close the window.

220 | NetBrain R11.1b


7.2.2 Add Signature Variables to ADT Base Table
In this section, you will create a new base table in ADT using a pre-replicated Network Intent
Template for the inclusion of Signature Variables.

[Link] Prerequisites

The following conditions must be met before creating a base table.


1. Create Device Group for Cisco IOS SW and Cisco Router devices. For more information,
refer to the Section Prerequisites.
2. Install the Intent Template into the IBA Center and decode it before building base ADT.
Decode Network Intent
Add an NI to the IBA center and decode it as follows:

1. Click the start menu and select Intent Based Automation Center from the Intent-Based
Automation tab.

2. Click + Add Intent Template.

3. From the Add Intent Template dialog, click Browse to select Intent Template from All Intent.

4. Search for your Intent Template, select it, and then click OK. Your Intent Template is installed
in the IBA center.

5. Decode Intent Template.

NetBrain R11.1b | 221


a. Select your Intent Template.

b. In the right pane, click Decode Now. From the Decode Now dialog, tick the Update
Intent Baseline checkbox and then click OK.

The message “Intent decoding request has been sent successfully.” is displayed.

c. Click Decoding Settings, check the Use config files from Current Baseline checkbox,
and click OK.

d. Click Apply to apply the settings.

It will take some time to decode the devices. The final results show that 143 devices are
decoded.

222 | NetBrain R11.1b


[Link] Build Base Table

Follow the step-by-step instructions to build the base table with the Signature Variables:

1. Click the start menu and go to the Intent-Based Automation tab.

2. Click Automation Data Table to open the Automation Data Table Manager.

3. In the Automation Data Table Manager screen, Click the Shared Tables dropdown and
then click New Table.

4. Enter the ADT table name, OSPF Neighbor Stability Check, and click Save.

5. Open the newly created OSPF Neighbor Stability Check table from the Shared Tables
folder.

6. Click Table Builder to open Automation Data Table Builder to define the Base Group.

7. Under the Base tab of Automation Data Table Builder, define the following settings:

a. Input descriptions for the base table to describe its use and function.

b. Make sure the method, Pre-replicated Intent Template, is selected.

c. Click the Select link to select the created NI (OSPF Base-PID Area RID) for building the
base table with signature variables.

d. Click All Intents to see your Intent.

e. Select your Intent and OK.

NetBrain R11.1b | 223


8. From the Built-in Fields section, drag the Device and Intent column into the Column
Group (Base) pane.

9. From the Device Signature Variable section, drag all the Signature variables one by one
into the Column Group (Base) pane.

10. In the Filter Row pane, click Select to add a device group.

11. Click Save and Build to save all the base table settings.

In the Build Table dialog, select the column groups to be built and select a log model, then
click Build to save the changes.

224 | NetBrain R11.1b


You will see the columns are populated with the data.

12. You can edit the Table Column to display the specific name of the Signature Variables.
Repeat the same step to rename another two Signature Variables column names with OSPD
Process ID and OSPF Router ID.

NetBrain R11.1b | 225


[Link] Add Device Property Column in ADT

Use the function call method to show Device Property, including Device Type in ADT.

1. Click Table Builder to open the Automation Data Table Builder.

2. Click + to add a new tab, Device Type.

3. From the Select Method to Build Group Table dropdown, select the Function Call method.

4. From the Source Column dropdown, select Device.

5. From the Built-in Fields section, move Device Type into the Column Group (Device Type)
pane.

6. Click Save and Build to add the Device Type column in ADT.

The Device Type column is now added to the ADT.

226 | NetBrain R11.1b


7.2.3 Create Network Intent for OSPF Neighbor Stability Check
In this section, you will create Intent (OSPF Neighbor Stability Check) from the Network Intent
Manager. We will use this NI during Intent Replication to populate the Automation column in the
ADT table.

1. Click Intents from the quick access toolbar, and then click Intent Manager.

2. Move the cursor over the folder you want to create an Intent and then click dropdown.
You can also create a new folder and create a new Intent.

3. From the dropdown menu, click New Network Intent to open Network Intent (Edit
mode).

NetBrain R11.1b | 227


4. Create an NI by entering the title OSPF Neighbor Stability Check and a brief description
(optional) of the intent.

5. To add the target device(s), select the option + Device and a window Select Devices will
appear. Search and add a device (e.g., device US-BOS-R1) as follows:

a. In the search field, type the device name, e.g., US-BOS, and then press Enter.

b. From the list, choose the device US-BOS-R1 and then click to add a device to the list.

c. Click OK to save and close the window.

228 | NetBrain R11.1b


[Link] Define CLI Command and Retrieve Data

1. Click + Add CLI Diagnosis to open the diagnosis window.

2. In the CLI Command Diagnosis window command field, enter the command show ip ospf
neighbor.

3. Click Retrieve to retrieve the Live data from the network.

4. The sample data appears in the Define Variable pane. You can edit this data depending on
the use case.

5. Click + New Pattern and select Table from the dropdown.

6. In the Sample Data section, select the whole table header and click Parse Table.

7. Verify the Output.

8. Click Apply to create a pattern.

9. Click the pen icon, rename the parser, ospf_neighbor, and close the parser window.

NetBrain R11.1b | 229


230 | NetBrain R11.1b
[Link] Define Compound Table

NI supports a Compound Table, which merges two table variables in the same NI into one table
variable. Define a merged table using Full Join to get the mismatched OSPF neighbor entries:

1. Click the Menu and open Intent Variables to define compound variables.

2. In the Intent Variables for Seed Logic window, select US-BOS-R1.

3. From the + Add Compound Table dropdown, select Merged Table.

4. In the Add Merged Table dialog, define the Table Name.

5. In the Input Tables section, from the dropdown menu, select the table variables for Table 1
and Table 2.

6. For Table 2, change Current to Last.

NetBrain R11.1b | 231


7. Add Paired Keys: Click Add Paired Keys to define the Paired Keys for Tables 1 and Table 2.
The Paired Keys define the column pairs to be merged, and you can have multiple Paired
Keys.

8. Specify the Table Merging Rule.

a. Click the Settings icon.

b. From the Table Merging Rule dropdown, select Full Join (Only all rows in both tables),
and then click OK.

232 | NetBrain R11.1b


c. Click Calculate and then click OK.

The columns in the output table are marked with different colors to distinguish the
columns from Table 1 and Table 2.

You can view the added compound table in the Intent as a table variable.

NetBrain R11.1b | 233


[Link] Define Diagnosis

Define the diagnosis by clicking the Edit Diagnosis option:

1. Click the Define Diagnosis tab, and then click Add Diagnosis.

2. Change the Diagnosis 1 name to OSPF Neighbors Check.

3. Select Anchor as neighbor_id from the dropdown. The anchor defines where the diagnosis
is displayed on the input text.

4. Select the Loop Table Rows checkbox to loop the neighbors_current_last table.

5. From the Table Key dropdown, select neighbor_id, address, and address. Columns set as
table keys will be displayed on the interface and synchronized to the table definition.

234 | NetBrain R11.1b


6. Set the If conditions A as neighbor_id (neighbor id 1) does not equal to neighbor_id
(neighbor id 2) and condition B as neighbor_id ( neighbor 1) is empty. Then set the
diagnosis message color and text. Select the Current to compare with current data.

You can set multiple conditions based on your requirements.

7. Else set the diagnosis message and status code for the device to Success.

8. Click Apply to save the Diagnosis settings and close the window.

NetBrain R11.1b | 235


[Link] Run the Network Intent

Click the Run button to check the Intent result defined in the diagnosis.

7.2.4 Populate the Automation column via Intent Replication Wizard


In this section, you will use the Intent Replication Wizard to populate the Automation column
(NI - OSPF Neighbor Stability Check) that you created in the last section.

1. From the hamburger menu, select Intent Replication Wizard.

236 | NetBrain R11.1b


2. In the Seed Intent tab, check for the Intent and click Next to go to the Define ADT tab.

3. Define ADT
The Define ADT tab uses an Existing ADT option. Select the OSPF Neighbor Stability Check
ADT.
a. Click the Use an Existing ADT option and select the OSPF Neighbor Stability Check that
you have created in the last section.
You can see in the Automation Data Table section, the selected ATD is added.
b. In the Replication Intent to section, enter Intent Group as an Intent column group
name.
c. Click Next to go to the Replicate Intent tab.

NetBrain R11.1b | 237


4. Define Replication Settings
a. In the Intent Qualification section, click Defined to define a device via Dynamic
Search.
b. Condition A: Config File Contains the router ospf.
c. Condition B: Device Type Matches any Cisco IOS Switch and Cisco Router.
d. Click OK.
e. Click Next to go to the Replicate Intent tab.

5. Replicate Intent
a. In the ADT Columns section, you can see the Column Name as Replicated Intent.
Change this name to OSPF Neighbor Stability Check.
b. Click Save and Replicate to save all the settings.
You can see the Open Output ADT option after the successful submition of the
replication request.

238 | NetBrain R11.1b


c. Click Open Output ADT to check the replicated Intent column in the ADT Manager. The
ADT will be open in the new tab of your browser.

d. Click Finish. And you can see the Replicated Intents are added to the ADT:

NetBrain R11.1b | 239


7.2.5 Run Once Intents of an ADT Automation Column

1. Hover over the OSPF Neighbor Stability Check column, click the menu, and then click
Run Intents Once to execute all the Intents.

2. In the Run Intents Once dialog, various options are available for specifying the data source
and filtering the intents to be executed. Use the Live Data option as default, and then click
OK to run the Intent.

The notification message will notify that the task is submitted.

3. In the Notification window, click OK.

4. Click Rebuild Table. The Rebuilt Table dialog appears.

5. Select the column group from the dropdown and tick the Log mode as per your preference.

6. Click Build.

240 | NetBrain R11.1b


Wait for a few minutes for the Intents to be executed and verify the ADT.

7.3 Built-in IBNA Library

Intent-Based Network Assessment (IBNA) library helps customers find hidden network issues
such as network design faults, best practices, and configuration drift. It builds the baseline for
network operations to help continuous assessment and troubleshooting.

Refer to the NetBrain IBNA installation guide on how to install and deploy the IBNA in your
NetBrain system.

Refer to the NetBrain IBNA Reference [Link] to see the list of assessments.

You just learned about Intent-Based Network Assessment. Let us recap what you have learned:

• Create a Device Group for all Cisco Routing Devices (you can use any existing group that has
all Cisco Routing devices).

• Create Map Intent to check if a specific route exists in the Route Table.

• Use Intent Replication Wizard to replicate Intent in ADT.

• Create Intent Dashboard for ADT Automation Column.

• Export Diagnosis results to CSV.

• Define a parser from the CLI command “show ip ospf interface” and define the signature
variable: OSPF PID, area number, and OSPF router ID.

• Build an ADT base table from the intent template. Use the Intent Replication Wizard to
replicate the intent. And populate the signature variables in the ADT table.

• Build the automation column. Create an intent and add a column OSPF Neighbor Stability
Check.

NetBrain R11.1b | 241


8 Follow-up Diagnosis
This chapter covers how to combine NIs to solve a network problem from the beginning to the end.

8.1 Follow-up Intent Template

The home intent can call a specific intent template to run the follow-up diagnosis, under which the
diagnosis logic in the follow-up template can be applied to downstream devices of the home intent.
The home intent can also transfer other variables to the macro variables of the follow-up intent
templates, e.g., an IP address is used in the follow-up intent template as the parameter of the 'show
ip ospf neighbor' CLI command.

For example, an NI for the device US-BOS-R1 finds a bgp neighbor is down. The follow-up NI can
ping/trace this neighbor from device US-BOS-R1.

8.1.1 Configure Follow-up Network Intent

Add the follow-up intent to the diagnosis explained in Section 4.3 and pass the variable
neighbor_id to the follow-up intent to ping:

1. Click the Add Logic menu under the diagnosis block and select Follow-up Intent.

242 | NetBrain R11.1b


2. Select the Network Intent as the Follow-up Intent to pop up the Follow-up Intents window
to configure.

3. Choose the Select Intent Template from the +Follow-up drop-down menu.

4. Choose the intent Ping Cisco and click OK.

NetBrain R11.1b | 243


5. Replicate the current intent to Device by Variable and select the variable this_device.

6. Assign a value to the macro variable (neighbor_id) defined in the follow-up NIT.

7. Annotation for Diagnosis Tree: These are displayed on the lines of the Diagnosis Tree.

8. Click Save to save and close the window.

244 | NetBrain R11.1b


8.1.2 View Follow-up Intent Results
Upon defining the diagnosis and closing the window CLI Command Diagnosis:

1. Click the Save button to save and close the Network Intent (Edit Mode) window.

2. Click Run in the Network Intent (View/Edit Mode) window to execute the diagnosis.

3. Upon running the diagnosis, click 5 Follow-up NI, as shown in the figure below, to open the
Diagnosis tree.

4. The follow-up intent executed on neighbor devices can be clearly noted as per the depth set
during follow-up intent configuring.

NetBrain R11.1b | 245


5. Click on the Network Intent (View Mode) window to view the results on the map.

246 | NetBrain R11.1b


8.2 Follow-up Self

An Intent (home intent) can call itself as the follow-up intent template, under which the same
logic will be applied to downstream devices calculated from the home intent. The logic is
recursively called upon until it hits a boundary defined by logic or maximum depth.

8.2.1 Configure Follow-up Self Intent

Consider the NI created in Section 4.3.1 with command Show ip ospf neighbor and configure the
Follow-up Self intent to its neighbors. Upon defining the diagnosis, if the L1status and L2 status
of the neighbor is up, call the follow-up Self intent to check other neighbor devices.

1. Click the Add Logic menu under the diagnosis block and select Follow-up Intent.

NetBrain R11.1b | 247


2. Check the Current Intent (Self) to pop up the Follow-up Intents window to configure.

3. Write a description referring to the reason for follow-up intent: When the neighbor
interface status is up.

4. Replicate current intent to Device by Variable and select the variable neighbor_id.

5. Set the max depth for follow-up self-intent execution: 2.

6. Check in the option Draw Arrow from This Device to Next, depending on the use case.

7. Annotation for Diagnosis Tree: These are displayed on the lines of the Diagnosis Tree.

8. Click Save to save and close the window.

248 | NetBrain R11.1b


8.2.2 View Follow-up Intent Results

Upon defining the diagnosis and closing the window CLI Command Diagnosis:

1. Click the Save button to save and close the Network Intent (Edit Mode) window.

2. Click Run in the Network Intent (View/Edit Mode) window to execute the diagnosis.

3. Upon running the diagnosis, click 2 Follow-up NI, as shown in the figure below, to open the
Diagnosis tree.

NetBrain R11.1b | 249


4. The follow-up intent executed on neighbor devices can be clearly noted as per the depth set
during follow-up intent configuring.

5. Click to view the results on the map.

250 | NetBrain R11.1b


9 Troubleshoot Application Path
In the last Chapter, you learned how to combine NIs to solve a network problem from the
beginning to the end.

This chapter covers how to use Intents to troubleshoot path-related network issues. You will
create the intents and an ADT for the critical applications and learn a couple of new concepts:
path intents and path-based replication logic.

The main steps are:.

1. Create ADT Base Table from Path Browser

2. Define a Path Intent (Path Next Hop Stability Check and Path Delay Stability Check)

3. Dashboard (Intent Dashboard and Summary Dashboard)

4. Execute Path Intent with Intent Timer

The Final ADT will be like:

The Dashboard for Automation Columns will be like:

NetBrain R11.1b | 251


9.1 Create ADT Base Table from Path Browser

Note: To use the full functions of the Path Browser, you need to purchase an AAM license.
Otherwise, you cannot create a new application and only can save the path in "Untitled
Application".

9.1.1 Define and map a path from the path browser.


This section teaches how to define a map path for an application using Path Browser. You can
manage this path based on the Application in the Path Browser.

Follow the step-by-step instructions to add paths in the Path Browser.

1. In the quick access toolbar, click Path to open the Path Browser window.

2. Create an Application to add paths in the application.

a. Click New Application to open the Application details window.

b. Enter application Name, i.e., Application Demo. The Description is optional.

c. Click OK to close the window. Your Application Demo will be created in the Application
Manager. You can create a path under this Application.

252 | NetBrain R11.1b


3. Click New Path to define the path in the Path Details window.

a. Enter Path Name, i.e., Path_TS (you can provide any name per your use case).

b. Select an application for the path using the Browse button.

c. Enter Source and Destination IP Addresses. The related gateways will be auto-identified
per your input. You can select the target one from the Gateway list if a device has
multiple gateways.

d. Select a Protocol from the dropdown list.

e. Click OK to create a path. You can view your created path (Path_TS) under
Application_Demo.

4. Right-click on the created Path and click Calculate Live Path from the menu.

NetBrain R11.1b | 253


You can wait to load the path until you see the Succeeded status in the Last Result column.

9.1.2 Create the ADT base table from the path browser.
The system provides the method Application Path for you to import the application and path

data into the ADT base table. Follow the step-by-step instructions to build the base table with the

data in devices:

1. Build the new base table

§ Click and open the New Automation Data Table from the menu.

§ In the New Automation Data Table dialog, enter Name, e.g., Path Stability Check and
select the Location as per your preference.

§ Click Save to save the new ADT. The newly created ADT will be open in the new tab.

2. Click Table Builder to open Automation Data Table Builder.

3. Under the Base tab of Automation Data Table Builder, define the following settings:

254 | NetBrain R11.1b


a. Input descriptions for the base table to describe its use and function.

b. Select Method, Application Path from the dropdown to Build Base Table.

c. Enable the Specified Applications and then click the Select link to select the Applications
for building the base table and then click OK.

d. Within the Built-in Fields section, choose each column and move it into the Column
Group (Base) pane. You can build an ADT table with the following columns: Application
Name, Path, Path Name, Source, Destination, Path Status, and Path Hops.

e. Click Save and Build to save all the base table settings.

In the Build Table dialog, select the column groups to be built, select a log mode and
then click Build to save the changes.

Now, the ADT Base table has been successfully created for the selected Application Path.

NetBrain R11.1b | 255


9.2 Define a Path Intent (Path Next Hop Stability Check)

This section teaches how to Define a simple intent (using the command show route [Link])
from the Quick Intent tab in the map and save it as the Path Intent. You will use two seed
devices of the different types to support the multi-vendor.

1. Go to the Path Browser, right-click on the Path and select the Draw Latest Path on Map to
open the map to define Quick Intent.

The Map will be like:

256 | NetBrain R11.1b


2. Go to Intent and click Quick Intent to define Variables and Diagnosis.

You can see two types of network devices - an ASA Firewall, Cisco Router and IOS Switch
along the path. You will be examining routing information on the ASA Firewall and other
Cisco IOS Devices in the network path to diagnose any issues related to the Path Next
Hope Stability.

3. Define Variable for Cisco ASA Firewall.

a. Click the Devices dropdown and uncheck all the devices except US-BOS-FW/act.

b. Enter the command show route [Link] and click Retrieve to get sample data.

c. Click New to open the New Parser window and define the Variable to parse the routing
entry.

In the sample data, double-click routing entry [Link] to parse the variable. Change the
$var1 with $routing_entry. Verify the Output and then click Apply and OK

d. Click Add Intent >> to add Parser1 in the Define Logic pane.

NetBrain R11.1b | 257


4. Define Variable for Cisco IOS Devices.

a. From the Devices dropdown, check all the devices and uncheck the device US-BOS-
FW/act.

b. Enter the command show ip route [Link] and click Retrieve to get sample data.

c. Click the New to open Parser Window to define the Variable to parse routing entry for
the Cisco IOS Devices, and then click Apply and OK.

d. Click Add Intent >> to add Parser2 in the Define Logic pane.

In the Define Logic pane, you can see both Parsers you just created.

Now, define Diagnosis to check the Next Hop Stability of each hop on a path.

258 | NetBrain R11.1b


5. Define Diagnosis for Parser 1, US-BOS-FW Parser.

a. Click Parser1 to define the diagnosis.

b. Enter the Diagnosis Name and select Variable $routing_entry for an Anchor.

c. Set the If condition: the Current $routing_entry Does not Equal the Last
$routing_entry. Add a failed diagnosis message for this condition.

d. For Else (Current routing entry equals the Last routing entry), add a Success Diagnosis
Message for the following condition.

e. Click Create to create a Path Stability1 Diagnosis.

NetBrain R11.1b | 259


6. Define Diagnosis for Parser 2 for the other Cisco IOS Devices.
a. Click Parser 2 to define the diagnosis.

b. Enter the Diagnosis Name and select Variable $routing_entry for an Anchor.

c. Set the If condition: the Current $routing_entry Does not Equal the Last
$routing_entry. Add a failed diagnosis message for this condition.

d. For Else (Current routing entry equals the Last routing entry), add a Success Diagnosis
Message for the following condition.

e. Click Recreate to recreate Diagnosis.

260 | NetBrain R11.1b


7. Run the Diagnosis and verify that it works properly for both the Parsers.

8. Save this Quick Intent as a Path Intent.

a. Click Save to. The Save to Path Intent window opens.

b. Enter the Intent Name and then click OK to save the Intent as Path Intent.

c. In the Success message, click the Open Intent link to open the Path Intent.

NetBrain R11.1b | 261


9. Run the Intent. From the newly created Path Intnet, click Run to execute the Intent to view
results.

262 | NetBrain R11.1b


9.2.1 Populate the Automation Column via Intent Replication Wizard
In this section, you will use the Intent Replication Wizard to populate the Automation column
(Path Next Hop Stability Check) in the ADT.

1. From the hamburger menu, select Intent Replication Wizard.

2. In the Seed Intnet tab, select the Intent Template for Path-based Replication, and then
click Next to go to the Define ADT tab.

3. Define ADT

In the Define ADT tab, populate the ADT automation column via the existing path intents:

a. Click the Use an Existing ADT option and select the Path Stability Check.

In the Automation Data Table section, the selected ATD is added.

b. In the Replication Intent to section, enter Intent Group as an Intent column group
name.

c. Click Next to go to the Replication Settings tab.

NetBrain R11.1b | 263


4. Define Replication Settings

a. Click Undefined and define the device type as Cisco ASA Firewall.

b. Click Undefined in the US-BOS-R2 row and define the device type as Cisco Router and
Cisco IOS Switches.

c. Click Next to go to the Replicate Intent tab.

5. Replicate Intents

a. In the ADT Columns section, enter Column Name as Path Next Hop Stability Check.

b. Click Save and Replicate to save all the settings.

You can see the Open Output ADT option after the successful submition of the
replication request.

c. Click Open Output ADT to check the replicated Intent column in the ADT Manager. The
ADT will be open in the new tab of your browser.

d. Click Finish.

You can see the ADT with Automation column (Path Next Hop Stability Check) like:

264 | NetBrain R11.1b


9.2.2 Run Once for the ADT Automation Column

1. Hover over the Path Next Hop Stability Check column, click menu and then click Run
Intents Once to execute all the Intents.

2. In the Run Intents Once dialog, various options are available for specifying the data source
and filtering the intents to be executed. Use the Live Data option as default, and then click
OK to run the Intent.

The notification message will notify that the task is submitted. Filter Intents to be executed.

3. In the Notification window, click OK.


Click Rebuild Table. The Rebuilt Table dialog appears.

4. Select the column group from the dropdown and tick the Log mode as per your preference.

5. Click Build.

Wait for a few minutes for the Intents to be executed and verify the ADT.

NetBrain R11.1b | 265


9.3 Define Path Intent (Path Delay Stability Check)

Similarly, create another path intent (using the command ping <path_destination_ip>, and
Repeat the steps described in the Section 9.2.

1. Follow the Snapshot to create Path Intent using Quick Intent. You need to go to the Path
you created and open Map and then Define Variable Parser and Diagnosis.

You need to define a parser like this. For more information, see Section 3.2.1.

266 | NetBrain R11.1b


2. Save Intent as Map Intent with the name Path Delay Stability Check.

3. Define Intent Template using Intent Replication Wizard. In the Automation Data Table
tab, select the ADT table (Path Stability) and then Provide a new Column Name as Path
Delay Stability Check.

4. Check the ADT table for the Automation column (Path Delay Stability Check), Run intent
once and then Rebuild the table.

NetBrain R11.1b | 267


9.4 Dashboard

You have the option to view Intent results through two different dashboards: Intent Dashboard
to view the individual Intent results and Summary Dashboard to view the consolidated Intent
results in a single view.

9.4.1 Intent Dashboard


Intent Dashboard allows users to create a dashboard to display the intent results through the
wizard, and users can save those frequently used dashboards as templates to reuse them. Intent
Dashboard can be created directly from an Intent column of an ADT, a map, or an Intent.

This section teaches how to create an Intent Dashboard for both the Automation columns of the
Path Stability CheckADT table.

1. Click the icon and open the New Intent Dashboard.

2. In the Create Intent Dashboard window, define the following:

a. Enter the Dashboard Name, Server Farm Route Check.

b. Select the Location to save the Intent Dashboard.

c. In the Data Source dropdown, select Automation Data Table.

268 | NetBrain R11.1b


d. In the Automation Data Table section, click the Select ADT Table link and then select the
ADT Table, Server Farm Route Check.

e. Click Create.

3. In the Create Intent Dashboard dialog, click Open Intent Dashboard.

NetBrain R11.1b | 269


The Dashboard will be created. Wait till the data is loaded.

[Link] Edit Intent Dashboard

You can modify the Intent Dashboard in edit mode by selecting Edit Dashboard from menu
located at the top-right corner of the dashboard window:

1. Click the Intent Result History section to view the dashboard data to be edited.

2. Change the Historical Result to the Last Result.

3. Click Edit Data and select Intent Device Result

4. Change Measure to Times of Alerts Detected on Devices.

5. Use the Alert Notifications feature to enable Alert Notification to send alerts to the
recipient's email address.

6. Click Save to save the Intent Dashboard.

270 | NetBrain R11.1b


9.4.2 Summary Dashboard
Summary Dashboard offers a comprehensive overview of the automation results for the entire
network or a set of network devices.

While the Intent Dashboard observes specific network issues with details, the summary
dashboard provides an overall view by displaying intent results from multiple Intent dashboards.
With Summary Dashboard, you can group Intent Dashboards into widgets based on diagnosis
purposes and display intent results by device, site or device groups. You can use the summary
dashboard to monitor critical information across thousands of devices and discover the root
cause for issues in one view.

Let us create a Summary Dashboard. You can add your created Intent Dashboards here. You
have created one Intent Dashboard, Server Farm Route Check in Section 7.1.6 and another
Intent Dashboard, Path Stability and Performance Check in Section 9.4.1.

Follow the step-by-step instructions to create a summary dashboard:

1. From the quick access toolbar, click Dashboard.

2. Switch to the Summary tab and right-click on the Shared Dashboard folder.

3. Click New Summary Dashboard.

4. Click the pen icon, provide the Summary Dashboard name, and click OK.

NetBrain R11.1b | 271


5. In the left pane, click +Select to select the Intent Dashboards that you have created.

6. Click Apply to see the dashboard for both the Intent dashboards.

272 | NetBrain R11.1b


Your Summary Dashboard will be:

You can add more Intent Dashboards based on your requirements.

7. Click Save to save the Summary Dashboard.

9.5 Execute Path Intent with Intent Timer

This section teaches how to use the intent timer to run the intents of the ADT table periodically.
There are different ways to trigger the execution of ADT intents. To ensure the critical assets
defined within ADTs are functioning properly, the intents of ADT are executed by Preventive
Automation.

Follow the step-by-step instructions to configure the ADT execution by the Intent timer:

1. Go to the Start menu and select Preventive Automation Manager from the Intent-
Based Automation tab.

NetBrain R11.1b | 273


2. Go to the Preventive Automation via ADT tab to install Intent and configure Intent Timer.

3. Click + Install Automation to add the Trigger Method and Install ADT.

a. In the Trigger Method tab, select Intent Timer, and then click Next.

b. In the Automation Data Table tab, select ADT (Path Stability Check), and then click
Install.

You can see your ADT is now added to the list to configure the Intent Timer.

274 | NetBrain R11.1b


4. Configure Intent Timer.

a. From the Schedule dropdown, select the time you want to schedule to execute Intent.

b. From the Intent options, select Execute All Intents. The system will execute both the
Path Intents we added.

c. In the Data Source, keep Live Data by default selection.

d. Click Save to save the Intent Timer configuration.

Your Intent Timer settings are saved already. It will execute intent as per configuration.

In this chapter, you learned how to define Path Intent and use that path to create Path Intent to
add to the ADT to be executed. Let's recap what you have learned:

• Define Path for a Map.

• Created ADT base table from the Path Browser.

• Created Path Intent using Quick Intent and used Intent Replication Wizard to add Intent
to the ADT. You have created two different Path Intents.

• Created Dashboards for the ADT that you have added Intents.

• Configured Intent Timer for the ADT to execute Intents as per schedule.

NetBrain R11.1b | 275

You might also like