R11.0a-March2023
Create Visual Parser
The Visual Parser uses NetBrain-specific grammar to turn plain text (such as device CLI command output, SNMP output, or configuration file text) into programable variables and enable "What you see is what you can program" with no or little coding. It enables network engineers familiar with the visual parsing grammar to parse the configuration file, CLI command output, and SNMP output for most automation problem resolutions.
GUI and Definition Flow of Visual Parser
The GUI of the Visual Parser editor consists of 6 areas. Take the definition of Paragraph Parser as an example:
The general flow of Visual Parser definition is as follows:
- Define basic Parser information in Area1.
- Define Parser Qualification in Area3.
- Select a data source and retrieve sample text from command output or device configuration in Area2. The retrieved sample text of command output of device configuration is displayed in Area4.
Note: SNMP Visual Parser supports referencing SNMP OIDs corresponding to three specific variables, $cpu_oid , $mem_oid, and $ifIndex. It also supports multiple OIDs, separated by double vertical bars (||), such as SNMPGet 1.3.6.1.2.1.2.2.1.2.$ifIndex||1.3.6.1.2.1.2.2.1.10.$ifIndex||1.3.6.1.2.1.31.1.1.1.6.$ifIndex to retrieve interface traffic. - Select a Parser group to add and select the input box of the target line in Area5.
- Select a line of text where the target variable resides in Area4 and click the arrow (
) to duplicate it to the selected line in Area6.
- Edit line patterns to define variables in Area5 and preview the parsed result in Area7.
Tip: See Parser Discovery for how to find and request a Parser effectively.