About Defining Command Templates

A command template supports execution of a command or script on the Operations Sentinel server. For example, the command or script can send email or access a remote system. With a command template, you can invoke any type of script that Windows supports. You should not, however, execute a program that displays windows since the windows will not appear.

Default Environment When Using a Command Template

Commands or scripts are executed on the Operations Sentinel server, under the Operations Sentinel service account. The default environment is as follows:

To refer to these environment variables, use the syntax appropriate for the scripting language you choose. For example, for a DOS script specify %SP_ALERTID%.

Exit codes are recorded in the log SP-EAI for successful and failed action executions. If an action execution produces an exit code of 0, the execution is assumed to be successful. Exit codes of 60 through 100 are reserved for use by Operations Sentinel. When writing scripts, use exit codes other than 0 and 60 through 100 to represent failures.