VMware 4817V62 Administration Guide - Page 246
Running Scripts as Alarm Actions, Alarm Environment Variables
View all VMware 4817V62 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 246 highlights
vSphere Basic System Administration If the alarm was triggered by an event, the information in Table 21-20 is also included in the body of the email. Table 21-20. Event Details in Email Detail Description Event Details VMODL event type name. Summary Alarm summary, including the event type, alarm name, and target object. Date Time and date the alarm was triggered. UserName Person who initiated the action that caused the event to be created. Events caused by an internal system activity do not have a UserName value. Host Host on which the alarm was triggered. Resource Pool Resource pool on which the alarm was triggered. Datacenter Datacenter on which the alarm was triggered. Arguments Arguments passed with the alarm and their values. Running Scripts as Alarm Actions You can write scripts and attach them to alarms so that when the alarm triggers, the script runs. 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 n VMWARE_ALARM_ALARMVALUE You can attach the script to any alarm on any object without changing the script. Alarm Environment Variables To simplify script configuration for alarm actions, VMware provides environment variables for VMware alarms. Table 21-21 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. Table 21-21. Alarm Environment Variables Variable Name Variable Description Supported Alarm Type VMWARE_ALARM_NAME VMWARE_ALARM_ID Name of the triggered alarm. MOID of the triggered alarm. Condition, State, Event Condition, State, Event 246 VMware, Inc.