cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger an command on Nonstop through an analyst

TushR
05 Base Camper

Trigger an command on Nonstop through an analyst

Dear Team,

 

I have configured an analyst to trigger an macro on NonStop but its not working as expected.

I can able to trigger an shell command through Threshold(.thr) but no luck with analyst.

 

Observation: Whenever I start threshold which is having shell command configured, it ask for username and password but it is not the same case with analyst.

 

Which username/password it will use while triggering it on NonStop? There is no any error in logs(windows/nonstop)

Kindly help me with a syntax and functionality.

 

Requirement: Configured an analyst which will obey/run a macro on NonStop

 

Thanks in advance,

tushR

2 ACCEPTED SOLUTIONS

Accepted Solutions
David_Sun
Community Manager

Re: Trigger an command on Nonstop through an analyst

Hi tushR,

 

To execute command on Nonstop, the user name and password will need to be configured in the PASSWORDS static configuration on the Nonstop server, and in the analyst rule, reference to this user in the action EXEC. An example is as below:

ACTION
EXEC  0120  USER passwordKey  WAIT  
END_ACTION

.

.

.

SECTION MSG_TEXT

MSG 0120  "run commandName"


The passwordKey needs to be in PASSWORDS in the format of COMMAND: passwordKey, followed by its user name and password.

Hope this helps.

 

Regards

David

View solution in original post

GeraldC1
Community Manager

Re: Trigger an command on Nonstop through an analyst

Here's a short video on how to check the command and the command output through Prognosis Web UI and through the Prognosis Client.

 

 

 

Steps in this Video:

  1. In Client select Knowledge > Welcome to Prognosis Cross Platform 
  2. In Web UI expand Servers branch > All Servers
  3. And then in Client or Web UI:
  4. click on the server system that the command is sent to to run on;
  5. Alerts
  6. Command History    (check the command that the status is complete and that there is no bad username/password issue)
  7. click on the command ID to see the output of the command that Prognois captured.

 

HTH

 

 

View solution in original post

Tags (1)
7 REPLIES 7
David_Sun
Community Manager

Re: Trigger an command on Nonstop through an analyst

Hi tushR,

 

To execute command on Nonstop, the user name and password will need to be configured in the PASSWORDS static configuration on the Nonstop server, and in the analyst rule, reference to this user in the action EXEC. An example is as below:

ACTION
EXEC  0120  USER passwordKey  WAIT  
END_ACTION

.

.

.

SECTION MSG_TEXT

MSG 0120  "run commandName"


The passwordKey needs to be in PASSWORDS in the format of COMMAND: passwordKey, followed by its user name and password.

Hope this helps.

 

Regards

David

TushR
05 Base Camper

Re: Trigger an command on Nonstop through an analyst

@David_Sun, Thanks for your quick response. It is working now but can I keep this action inside IF statement? I am getting an error when I keep action inside IF statement. Kindly help on this. Error:"An invalid token is encountered in parsing" Thanks in advance, tushR
David_Sun
Community Manager

Re: Trigger an command on Nonstop through an analyst

Hi TushR,

 

Thanks for the update and glad to know it is working now. 

The ACTION statement cannot be put inside the IF statement. You can just put the EXEC statement within the IF/END_IF so the command can be run. For example:

      IF Debug_G = "Y"
         LOG          0320 IMMEDIATELY
      
         EXEC         0120  USER  passwordKey WAIT   
      END_IF

You might find the standard WindowsAnalyst helpful as it has examples of usage of the statements.

 

Regards

David

TushR
05 Base Camper

Re: Trigger an command on Nonstop through an analyst

Hi @David_Sun,

Appreciated your quick responses.

 

Triggering command without ACTION block is not working for me.

I want to trigger an command on specific decisions so need to put IF statements before executing this command.

 

Woking witout IF statement:

ACTION
      EXEC  0108  USER prgnmanager IMMEDIATELY
END_ACTION

 

Not working with IF statement:

  IF OCCRCOUNT > 0 AND ALERTFLAG = 1 AND STNSTATUS = "STARTED"
        EXEC  0108  USER prgnmanager WAIT
        EXEC  #DISPMAN 0100 IMMEDIATELY
        SET ALERTFLAG := 0
  END_IF

 

In above example, I can able to send mail (Dispatch Manager) in 0100 but it fails to execute 0108 command as it is not enclosed in ACTION block.

Executon of command is working only if I put 0108 outside of IF statement with ACTION block.

 

Kindly help me with syntax to trigger a command with IF statement.

 

Regards,

tushR 

David_Sun
Community Manager

Re: Trigger an command on Nonstop through an analyst

Hi tushR 

 

In this case we will need to look into more details. Please log a support case with the analyst and the output of CMDLOG and AUTOOUT records, we can review and analyse the root cause. 

 

Regards

David

ChristopherS
12 Sherpa

Re: Trigger an command on Nonstop through an analyst

@TushR 

Why use IF over Action statements.. there really is minimal functional difference between them.. action clauses allow you to also do multiple things and jump in and out of secondary rules where IFs really do not.. I almost never use IF statements for that reason. I'd need to check but IFs may not allow multiple exections within the clause where I know actions do. 

 

Also prior to like 11.5 or 11.6 there was a bug if you had an ACTION or LOG immediatley after a LOG that created errors and didn't execute due to how the LOG statement treated EOL which caused a lot of frustration.. so something to also consider. 


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.
GeraldC1
Community Manager

Re: Trigger an command on Nonstop through an analyst

Here's a short video on how to check the command and the command output through Prognosis Web UI and through the Prognosis Client.

 

 

 

Steps in this Video:

  1. In Client select Knowledge > Welcome to Prognosis Cross Platform 
  2. In Web UI expand Servers branch > All Servers
  3. And then in Client or Web UI:
  4. click on the server system that the command is sent to to run on;
  5. Alerts
  6. Command History    (check the command that the status is complete and that there is no bad username/password issue)
  7. click on the command ID to see the output of the command that Prognois captured.

 

HTH

 

 

Tags (1)