6.7

Table Of Contents
6 Send email notifications
a To send email notifications when alarms are triggered, enable Send email notifications.
b In the Email to, enter recipient addresses. Use commas to separate multiple addresses.
7 To send traps when alarms are triggered on a vCenter Server instance, enable Send SNMP traps.
8 Run scripts
a To run scripts when alarms are triggered, enable Run script.
b In Run this script column, type script or command information:
Option Action
Send a notification email Type email addresses, separated by a comma.
Migrate VM Complete the virtual machine migration wizard.
Run a command Take one of the following actions and press Enter:
n
If the command is a .exe file, enter the full path name of the command
and include any parameters. For example, to run the cmd.exe command
in the C:\tools directory, with the alarmName and targetName
parameters, type: c:\tools\cmd.exe alarmName targetName
n
If the command is a .bat file, enter the full path name of the command as
an argument to the c:\windows\system32\cmd.exe command. Include
any parameters. For example, to run the cmd.bat command in the
C:\tools directory, with the alarmName and targetName parameters,
type:
c:\windows\system32\cmd.exe /c c:\tools\cmd.bat alarmName
targetName
For .bat files, the command and its parameters must be formatted into
one string.
If your script does not make use of the alarm environment variables, include any necessary
parameters in the configuration field. Enclose parameters in curly brackets. For example:
c:\tools\cmd.exe {alarmName} {targetName}
c:\windows\system32\cmd.exe /c c:\tools\cmd.bat {alarmName} {targetName}
The script can run on any platform. You must provide the path to the script and argument keys.
For example:
/var/myscripts/myAlarmActionScript {alarmName} {targetName}
9 (Optional) Configure alarm transitions and frequency.
What to do next
Click Next to review the alarm details.
Review and Enable Alarm
You can review and enable the alarm in the vSphere Client
vSphere Monitoring and Performance
VMware, Inc. 143