R12.1-JA-2025June05

ID Line

The Identifier (ID) Line is the key to identifying recurring paragraphs. For those duplicate variables that reside in recurring paragraphs, you can use ID Line Pattern to divide lines of text into segmented paragraphs first and then use Variable Line Pattern to define more variables.

Information Note: ID Line Pattern applies to Auto Parser (multiple mode), Paragraph Parser and Collector Parser, where multiple ID Line Patterns are allowed.

ID Line in Auto Parser (Multiple Type)

In multiple type auto parser, the first line pattern is the unique one ID line for dividing lines of text into segmented paragraphs, then Var line patterns are added after the ID line pattern to define more variables in the same paragraph.

You can change a Var Line to an ID line from the menu Set as ID Line of the Var Line, then the target var line will be placed on the top as the beginning of the paragraph.

ID Line in Paragraph Parser

The default and mandatory ID Line is labeled as ID Line Pattern A, which divides lines of text into paragraphs. As shown below, the line of text that matches ID Line A’s line pattern is highlighted in each paragraph and labeled with numberings. The parsed values of variables are differentiated by the foreground color. When you click on a variable value in the parsed result, the value text will be highlighted in the sample text.

Beyond the ID Line Pattern A, you have options to add more ID Line Patterns B~Z as filters to filter out unqualified paragraphs.

For example, the ID Line Pattern A of the following Paragraph Parser uses the interface name as the identifier to separate paragraphs, and the ID Line Pattern B further defines the condition that only the paragraphs for those interfaces, of which the MTU’s value is 1504 bytes, will be used for parsing. The lines of text that match the line pattern of ID Line B~Z are also highlighted and marked with a label. The labels for ID Line B~Z do not contain numbering because their numbering keeps the same as the paragraph numbering of ID Line A.

Define ID Line Using Regex Pattern

Besides NetBrain-specific patterns, you can use Regex Pattern to define an ID Line, especially when there are no regular keywords before and after a target variable in that ID line.

For example, the target ID Line A of the following raw text contains a variable $intf (interface name). In this case, the Regex Pattern is more suitable for defining the ID Line Pattern. For more information about the syntax, refer to Regex Pattern.

Use ID Line to Parse Wrapped Table Text

Generally, Table Parser is recommended to parse table-formatted text. However, when it comes to a table with wrapped text in a cell, you need a workaround, that is, using a Paragraph Parser (with ID Line Pattern) to parse wrapped text.

For example, the first cell of the table column has wrapped text, which cannot be completely parsed by Table Parsers. You can use Regex to finish a two-step definition:

  1. Define the first three table columns (ID, vLANname, Status) as the ID Line using Regex, which means every first three cells in each table row is an independent paragraph.
  2. Parse multiple lines of text inside each paragraph.