White Papers
Technical white paper
3 Configure, Edit, and Delete scripts for remote execution
Scripts for remote execution can be customized to the different types of devices in the data center. This
section provides a step-by-step explanation of how to create, edit and delete the scripts or commands for
remote execution.
3.1 Configure Remote Script Execution with token substitution
• Select Create button a wizard for “Add Remote Command “will open.
• Provide a Command name.
• Select “script” radio button.
• In Authentication method select “Password”.
• Provide Admin username and password of remote box.
• Place the script file with name demo.sh in the remote system.
o Example command in Script file to send a mail: $ mail -s $1+$2+$3+$4 user1@domain.com
• Provide Command to initiate the script .Ex-./demo.sh $SEVERITY $IP $SERVICETAG $MSG
• Passing Tokens to a Script: If you are using a batch file or a script, use $1, $2, $3 , and so on to
receive the values passed from OpenManage Enterprise. The values are passed in the order they are
entered from left to right in the Arguments field.
o For example, if you use $IP $SERVICTAG as arguments, a batch file with the following Echo
$1 $2 displays the following result: 172.168.10.10 ABC1234
The following table lists the supported tokens for Remote Script Execution Commands
Description
Tokens
Device IP Address
$IP
Message
$MSG
Date
$DATE
Time
$TIME
Severity
$SEVERITY
Servicetag
$SERVICETAG
Recommended Resolution
$RESOLUTION
Alert Category Name
$CATEGORY
Asset tag
$ASSETTAG
Model Name
$MODEL
Os hostname
$HOSTNAME