R12.1-JA-2025June05

Define Multiple Formats for Parser

By default, a parser has one format, e.g., define total/used/free memory for a Cisco Router device. The anchor is “Processor Pool Total: Used: Free:”.

A screenshot of a computer

Description automatically generated

You can add more formats for the parser (click the + icon in the format tab bar). e.g., define the same variables for a Cisco IOS Switch device. The anchor is “System memory: total, used, free,” which is different from that in Format1. 

Basic Operations on Format

You can perform basic operations on each format from the format drop-down menu.
 

The following table describes the operations that can be performed from the format drop-down menu.

No.OperationDescription
1Rename
  • Modify the format name. Duplicated format names are not allowed.
2Set as Primary
  • The primary format tab is placed in front of other format tabs.
  • If another format is set as the primary format, it will be moved to the first place.

3Move Left
  • If a format is moved to the left, it will have higher priority during format matching.   
4Move Right
  • If a format is moved to the right, it will have lower priority during format matching.  
5Edit Sample
  • Edit the sample output data manually.
6Define Replacement
  • Define the replacement logic to search and replace the text before parsing variables (exception: text variable).
7Delete
  • Remove the format.
  • If the parser has only one format, this only format cannot be deleted.

Variables in Multiple Formats

When variables are defined for formats, the following rules will apply:

  • One format cannot contain variables with the same name.
  • Variables with the same name can appear in different formats, and these variables will be treated as one same variable.
IMPORTANT When the variables in parser format are applied to other features such as NI, Runbook CLI mode, Flash Probe, only the variables parsed in the primary format can be used. The variables defined in other formats cannot be used in these features. Therefore, the best practice is to keep the variable name in non-primary formats consistent with the variable name in the primary format.