cancel
Showing results for 
Search instead for 
Did you mean: 

ssh command configuration

Conrad_Lemos
05 Base Camper

ssh command configuration

I would like to know how i could setup a command configuration to ssh to the system manager and run a command capture the output.

 

I wanted to then run a where caluse where the output can be chaecked and alerted on.

1 REPLY 1
ChristopherS
12 Sherpa

Re: ssh command configuration

At a high level it sounds like you already have a script to run it.. and with that you have two primary options that are relatively straight forward to implement and you if you have the Prognosis experience technically can do yourself.

 

1)  As long as the where clause is looking for a string value you can execute several different types of scripts (given permission and stored credentials) from a Prognosis Analyst and then process the string results using RegEx or Prognosis Matches or Contains statements from the output as long as the output isn't too.

The biggest catch doing it this way with a RegEx to break apart different parts of the output is your RegEx search string has to match every part of the string and you have to throw other parts of the strings into ^var variables and only use the parts of it you want to use.. and store them in internal variables for later use within the analyst.

I use this method regularly to execute command line commands and scripts of various types to do a lot without writing a whole seperate solution to accomplish somethin quickly or one off.. 

2) Alternatively you can write a script that outputs the output to a delimited text file and then write an extractor that pulls the fields into a Prognosis record and you can have them be any format you want.. the output processed though just needs to be in a specific format.. 

 

Another option is to have consulting create something for you... 

 

Christopher


If my answer helped you today, please be sure to mark the resolved button to assist others.

Christopher R Souser - Solution Architect – MSci. PA, CISSP, ITIL.