How to get the complete output of Show Command to a variable retrieved by a parser ?

  • 14 October 2021
  • 1 reply

Userlevel 2

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. 


Best answer by Rakesh Mandava 14 October 2021, 08:36

View original

1 reply

Userlevel 2
Badge +1

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 !!


Community |  Ideas

Facebook |  Instagram |  Youtube |  Twitter |  LinkedIn
Privacy & Security Statement  |  Terms & Conditions |  Impressum  |  UK Modern Slavery Statement