Skip to main content

I would like to perform parsing programmatically. So, what I want is to get the complete output of a “show command”/”snmp query” to a parser variable. Please help. 

I can see two ways to get this done. One way is with simple parser and the other one is with Advanced Parser.

 

1) Normal Parser with mregex as shown below. This method gives the total output of a show command into a variable as string.

 

2) Advanced Parser with "Script" Parsing method. Use _original_result in ParseText function as shown below. Define your variables and parse content into them. Then make a dictionary with interesting/desired values and return the dictionary.

 

 

Hope this is helpful to you !!


Reply