Network Command Line Terminal Based Discovery Pattern

Nikhil Sharma
Tera Contributor

I am trying to create a pattern which uses SSH connection to a network switch. Idea is to login to the network terminal console and run commands like "show running-config" or "show system info" and then fetch the values from the command output using the "Parse Command Output" operation method in discovery pattern.

 

However when I am doing this for small outputs it is successful however for large output which need extra prompt the pattern is failing after time out. Or sometime I can see the bottom part of the command output or sometime beginning of the output. Could anyone share their response how this can be done. Below is the snapshot of command output but only once I could see that other times its timing out. But small command output is working fine.

NikhilSharma_0-1731601561593.png

 

3 REPLIES 3

Niklas Peterson
Mega Sage
Mega Sage

Hi,

 

Looks from the screenshot that the commmand you are running is intended to be displayed on a screen because it is being paginated and is waiting for input to go on and show more information. You need to use more direct commands that will produce all output in one go without any further input.

 

Regards,
Niklas

Nikhil Sharma
Tera Contributor

I have disabled the paging but still service now command pompt takes a lot of time to bring the output. Sometimes it does not show anything at all sometimes it shows the result.

Hi,

There are some MID Server parameters that can be altered to allow more time etc. Check the SSH parameters sections on this page:

 

https://www.servicenow.com/docs/bundle/xanadu-servicenow-platform/page/product/mid-server/reference/...

for example the mid.ssh.command_timeout_ms parameter.

Regards,
Niklas