Skip to content

Run a Remote Script

Execute a remote script and rollback if needed.

Associate server agent will execute the script.

The op config form has the following fields:

Server

Hostname or IP that we will connect to.

User

User allowed to connect to remote server.

Command

Commands to be executed on the remote server.

Commands and arguments can be included here and more than one command can be separated by ; or && or whataver command separator is available in the platform you are connecting to.

Arguments

List of input command arguments. This list is incompatible with arguments entered on the Command field.

Environments

List of environment variables to be set on the remote server at the moment of execution.

Home directory

Directory from which the local script is launched. If set, Clarive will change directory here before executing the command.

Log Display

If this field is set, instead of showing the full command and arguments on the job log output, this value will be shown.

This is useful to hide sensitive command details from the user or just to make the log more readable for the user.

These are the log messages shown for a remote command execution:

STARTING remote script USER@HOST: COMMAND

And, if no error ocurred:

FINISHED remote script USER@HOST: COMMAND

Errors and Output

These two fields are related to manage control errors. Options are:

  • Fail and output error - Search for configurated error pattern in script output. If found, an error message is displayed in monitor showing the match.

  • Warn and output warn - Search for configurated warning pattern in script output. If found, an error message is displayed in monitor showing the match.,

  • Custom - In case combo box errors is set to custom a new form is showed to define the behavior with these fields:

  • OK - Range of return code values for the script to have succeeded. No message will be displayed in monitor.

  • Warn - Range of return code values to warn the user. A warn message will be displayed in monitor.

  • Error - Range of return code values for the script to have failed. An error message will be displayed in monitor.