Alarms are notifications that occur in response to certain events or conditions that occur with an object in vCenter Server. The objects can be VMs, ESXi hosts, networks, and datastores in the vCenter Server inventory.
You can create a vCenter Server alarm for a virtual machine with vSphere Web Client:
1. Select your VM from the inventory and go to Manage > Alarm Definitions. Click on the Add icon:
2. The New Alarm Definition window opens. Enter the name for the new alarm and select Monitor for specific conditions or state, for example CPU usage:
3. Next, click the Add button (the green plus sign) and select the condition that will trigger the alarm:
In the picture above you can see that we’ve specified the Warning Condition as the VM CPU usage of more than 20% for 30 seconds. The Critical condition has been specified as the VM CPU usage of more than 30% for 30 seconds.
4. Next, we need to define actions for the Warning and Critical conditions:
In the picture above you can see that an email will be sent to Administrator if the VM CPU usage goes above 20% for more than 30 seconds (the Warning condition), but only once. If the VM CPU usage goes above 30% for more than 30 seconds minutes (the Critical condition), an email will be sent again and then every 5 minutes, until the alarm is manually reset to green or the CPU usage drops below 30%.