To simplify script configuration for alarm actions, VMware provides environment variables for VMware alarms.

Alarm Environment Variables lists the default environment variables defined for alarms. Use these variables to define more complex scripts and attach them to multiple alarms or inventory objects so the action occurs when the alarm triggers.

Alarm Environment Variables

Variable Name

Variable Description

Supported Alarm Type

VMWARE_ALARM_NAME

Name of the triggered alarm.

Condition, State, Event

VMWARE_ALARM_ID

MOID of the triggered alarm.

Condition, State, Event

VMWARE_ALARM_TARGET_NAME

Name of the entity on which the alarm triggered.

Condition, State, Event

VMWARE_ALARM_TARGET_ID

MOID of the entity on which the alarm triggered.

Condition, State, Event

VMWARE_ALARM_OLDSTATUS

Old status of the alarm.

Condition, State, Event

VMWARE_ALARM_NEWSTATUS

New status of the alarm.

Condition, State, Event

VMWARE_ALARM_TRIGGERINGSUMMARY

Multiline summary of the alarm.

Condition, State, Event

VMWARE_ALARM_DECLARINGSUMMARY

Single-line declaration of the alarm expression.

Condition, State, Event

VMWARE_ALARM_ALARMVALUE

Value that triggered the alarm.

Condition, State

VMWARE_ALARM_EVENTDESCRIPTION

Description text of the alarm status change event.

Condition, State

VMWARE_ALARM_EVENTDESCRIPTION

Description of the event that triggered the alarm.

Event

VMWARE_ALARM_EVENT_USERNAME

User name associated with the event.

Event

VMWARE_ALARM_EVENT_DATACENTER

Name of the datacenter in which the event occurred.

Event

VMWARE_ALARM_EVENT_COMPUTERESOURCE

Name of the cluster or resource pool in which the event occurred.

Event

VMWARE_ALARM_EVENT_HOST

Name of the host on which the event occurred.

Event

VMWARE_ALARM_EVENT_VM

Name of the virtual machine on which the event occurred.

Event

VMWARE_ALARM_EVENT_NETWORK

Name of the network on which the event occurred.

Event

VMWARE_ALARM_EVENT_DATASTORE

Name of the datastore on which the event occurred.

Event

VMWARE_ALARM_EVENT_DVS

Name of the vNetwork Distributed Switch on which the event occurred.

Event