You can select and configure the events, states, or conditions that trigger the alarm from the Alarm Rule page in the New Alarm Definition wizard.
An alarm definition must contain at least one trigger before you can save it.
Prerequisites
Required Privilege: Alarms.Create alarm or Alarms.Modify alarm
Procedure
- Select a trigger from the drop-down menu.
The combined event triggers are displayed. You can set the rule for a single event only. You must create multiple rules for multiple events.
- Click Add Argument to select an argument from the drop-down menu.
It supports ALL based expression, option to select ANY is not available. You must create a separate alarm definition for each trigger. The OR operator is not supported in the vSphere Client. However, you can combine more than one condition trigger with AND operator.
- Select an operator from the drop-down menu.
- Select an option from the drop-down menu to set the threshold for triggering an alarm
- Select severity of the alarm from the drop-down menu.
You can set the condition to either Show as Warning or Show as Critical, but not for both. You must create a separate alarm definition for warning and critical status. Keep the target's current state option can be enabled only for an event based alarm condition. For example, if Cannot power off the VM and Keep the target's current state is selected for an alarm rule, then it cannot be combined with any other alarm rule with different severities like Warning or Critical. These alarms will not have reset rules as the alarm rule does not change the state of the target object.
- Send email notifications
- To send email notifications when alarms are triggered, enable Send email notifications.
- In the Email to, enter recipient addresses. Use commas to separate multiple addresses.
- To send traps when alarms are triggered on a vCenter Server instance, enable Send SNMP traps.
- Run scripts
- To run scripts when alarms are triggered, enable Run script.
- In Run this script column, type script or command information:
For this type of command... Enter this... EXE executable files Full pathname of the command. For example, to run the cmd.exe command in the C:\tools directory, type: c:\tools\cmd.exe.
BAT batch file Full pathname of the command as an argument to the c:\windows\system32\cmd.exe command. For example, to run the cmd.bat command in the C:\tools directory, type: c:\windows\system32\cmd.exe /c c:\tools\cmd.bat.
Note: 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}
- (Optional) Configure alarm transitions and frequency.
- Select an advanced action from the drop-down menu.
You can define the advanced actions for virtual machine and hosts. These advanced actions are applicable only for virtual machines and hosts. There are different sets of advanced actions based on target types of virtual machines and hosts.You can add multiple advanced actions for an alarm.
- (Optional) Configure frequency for advanced actions.
- Click Add Another Rule to add an additional rule for an alarm.
- Click Duplicate Rule to create an identical rule for an alarm.
- Click Remove Rule to remove an existing rule set for an alarm.
What to do next
Click Next to set the Reset Rule.