To simplify script configuration for alarm actions, VMware provides environment variables for VMware alarms. Use the variables to define more complex scripts and attach them to multiple alarms or inventory objects so that the alarm action occurs when the alarm triggers.

Table 1. Alarm Environment Variables
Variable Name Variable Description Supported Alarm Type
VMWARE_ALARM_NAME The name of the triggered alarm. Condition, State, Event
VMWARE_ALARM_ID The MOID of the triggered alarm. Condition, State, Event
VMWARE_ALARM_TARGET_NAME The name of the entity on which the alarm triggered. Condition, State, Event
VMWARE_ALARM_TARGET_ID The MOID of the entity on which the alarm triggered. Condition, State, Event
VMWARE_ALARM_OLDSTATUS The old status of the alarm. Condition, State, Event
VMWARE_ALARM_NEWSTATUS The new status of the alarm. Condition, State, Event
VMWARE_ALARM_TRIGGERINGSUMMARY A multiline summary of the alarm. Condition, State, Event
VMWARE_ALARM_DECLARINGSUMMARY A single-line declaration of the alarm expression. Condition, State, Event
VMWARE_ALARM_ALARMVALUE The value that triggered the alarm. Condition, State
VMWARE_ALARM_EVENTDESCRIPTION A description of the alarm status change event. Condition, State
VMWARE_ALARM_EVENTDESCRIPTION A description of the event that triggered the alarm. Event
VMWARE_ALARM_EVENT_USERNAME The user name associated with the event. Event
VMWARE_ALARM_EVENT_DATACENTER The name of the data center in which the event occurred. Event
VMWARE_ALARM_EVENT_COMPUTERESOURCE The name of the cluster or resource pool in which the event occurred. Event
VMWARE_ALARM_EVENT_HOST The name of the host on which the event occurred. Event
VMWARE_ALARM_EVENT_VM The name of the virtual machine on which the event occurred. Event
VMWARE_ALARM_EVENT_NETWORK The name of the network on which the event occurred. Event
VMWARE_ALARM_EVENT_DATASTORE The name of the datastore on which the event occurred. Event
VMWARE_ALARM_EVENT_DVS The name of the vSphere Distributed Switch on which the event occurred. Event