6.0.1

Table Of Contents
Send SNMP Traps as an Alarm
The SNMP agent included with vCenter Server can be used to send traps when alarms are triggered on a
vCenter Server instance. The default hardware health alarms send SNMP traps by default.
Prerequisites
Ensure that vCenter Server SNMP agents and ESXi SNMP agents are properly configured.
Ensure that SNMP trap receiver agents are properly configured.
Required Privilege: Alarms.Create alarm or Alarms.Modify alarm
Procedure
1 On the Actions page of the alarm definition wizard, click Add.
2 In the Actions column, select Send a notification trap from the drop-down menu.
3 (Optional) Configure alarm transitions and frequency.
4 Click Finish to save the alarm settings.
SNMP Trap Notifications
The following table describes the information that is included in vCenter Server and ESXi trap notifications.
Table 43. SNMP Trap Notification Details
Trap Entry Description
Type The state vCenter Server is monitoring for the alarm. Options include Host Processor (or CPU)
usage, Host Memory usage, Host State, Virtual Machine Processor (or CPU) usage, Virtual
Machine Memory usage, Virtual Machine State, Virtual Machine Heartbeat.
Name The name of the host or virtual machine that triggers the alarm.
Old Status The alarm status before the alarm was triggered.
New Status The alarm status when the alarm is triggered.
Object Value The object value when the alarm is triggered.
Run a Script or a Command as an Alarm Action
You can configure an alarm to run a script or a command in the vSphere Web Client when the alarm is
triggered.
Use the alarm environment variables to define complex scripts and attach them to multiple alarms or
inventory objects. For example, you can write a script that enters the following trouble ticket information
into an external system when an alarm is triggered:
n
Alarm name
n
Object on which the alarm was triggered
n
Event that triggered the alarm
n
Alarm trigger values
When you write the script, include the following environment variables in the script:
n
VMWARE_ALARM_NAME
n
VMWARE_ALARM_TARGET_NAME
n
VMWARE_ALARM_EVENTDESCRIPTION
vSphere Monitoring and Performance
114 VMware, Inc.