Creating a Configuration Parser

This section introduces how to create a Configuration parser to extract key metrics from configuration files of devices.

Example: Parse the version number of a router in its configuration file.

1.Click the icon on the taskbar and select New Parser.

2.Keep the default Legacy Device node type and select Cisco Router from the Device Type list. By default, the All Device Types option is selected.

Tip: The system also supports defining a parser to retrieve and parse SDN data through APIs. See Creating an API Parser to get details about API parser.

3.Select Configuration from the Parser Type drop-down menu.

4.Select the data source to obtain the sample configuration file. See Data Source for more reference.

3.Click Retrieve and select a router to retrieve sample data.

4.Highlight the version number exactly in the sample data and click Define Keyword in the floating menu.

5.The Keyword Parser dialog prompts with the following fields auto-populated.

Sample — the sample command line where the variable stays.

Parser — defines keywords and where a variable is located. The keyword parser Version $var1, RELEASE is created automatically. It contains the keywords Version and RELEASE that always stay the same, and the variable $var1 which varies in different devices.

Variable — the variable defined in the parser. To change the auto-created variable name to a more meaningful name, rename the variable such as from var1 to Version.

8.Click Save Variable in the Keyword Parser dialog. This variable will be displayed in the variable tree.

9.Click SaveThe parser will be saved in the Parser Library.

 

See also:

Advanced Filter