What are VMware Virtual Infrastructure Alarms?
VMware Virtual Infrastructure Alarms are created by VMware Admins to perform an action when a VMware event happens. Alarms can be configured at various levels of the VMware host, VM, datacenter, and cluster level. You are only going to get the alarms functionality if you are using VMware VirtualCenter and the Virtual Infrastructure Suite. You do not get alarm functionality if you are managing an individual ESX or ESXi host.
Essentially, when you create an alarm, you are telling the VirtualCenter to notify you, in some way, when a certain event happens in the virtual datacenter, in the cluster/resource pool, on a particular ESX host, or on a certain VMware Guest VM. Yes, alarms can be configured at all of those levels I just mentioned.
VMware Virtual Center alarms are something you edit in the Alarms Tab inside a VMware Virtual Infrastructure Client (VI Client) that is connected to a Virtual Center host. Inside this tab, you will see that you have two Views. Your two views are Triggered Alarms and Definitions (actually where you define the alarms).
Figure 1: VMware VI Client Alarms Tabs and two views
So how do you know at what level you should define an alarm?
At what level of the Virtual Infrastructure should you create your alarms?
As I mentioned above, you can configure VMware alarms at various levels of the Virtual Infrastructure. You could create an alarm at:
So how do you know what level to configure them? I hate to answer a question with a question but… What is it that you want to do? Ask yourself- what is it that you want to receive an alarm about? The most common alarms will be for hosts or guests going down and those will be for all hosts or guests in a Folder, DataCenter, or Resource pool.
Once you have some idea where at what level you want to alarm on, you will want to define a new alarm. Let us find out how to do this.
How do you define your first VMware Virtual Infrastructure Alarm?
Before we create a new alarm, I should point out that there are already some default alarms created for you. Those alarm descriptions will start with the words “default alarm”. Here are the current default alarms:
Figure 2: Default VMware VI Alarms
As you can see from the name and descriptions of these alarms, these default alarms are there to both monitor host and virtual machines. The 3 default alarms for hosts will alarm on 1) ESX lost host connections, 2) high ESX host CPU utilization, and 3) high ESX host memory utilization. The 2 default alarms for virtual machines will alarm on 1) high virtual machine CPU utilization and 2) high virtual machine memory utilization.
These default alarms can be modified and this is an ideal time to point out that alarms can only be modified at the level that they are defined in. If you look at Figure 2, notice how it says that the alarm was defined at the Datacenters level. If you click on that word “Datacenters”, you will be taken to the datacenters level so that you can modify these alarms. Notice the message that you get when you attempt to modify an alarm at a level that it was not created at:
Figure 3: Alarm settings are read-only except when accessed through the item that it was defined on
Now, by default, these default alarms do not take any action other than to make an entry in the Triggered Alarms window, as you see in Figure 4:
Figure 4: Triggered Alarms Log in VMware VI Client
So to create an alarm that actually performs some action, other than just an entry in the log, we can 1) modify the existing default alarms to take a greater action or 2) create a new alarm to take a particular action.
Let us say that we want to create a new alarm definition. To create a new alarm, go to the Alarms tab at whatever level you choose, click on the Definitions View, then right-click in the white space and click New Alarm, as you see in Figure 5.
Figure 5: Creating a new Alarm in VMware VI Client
This will bring up the Alarm Settings window. In the General tab, you can provide an Alarm Name, Description, Type (host or VM), and enable your alarm. The Triggers tab is where you define what you want to alarm on. The Reporting tab is where you set the tolerance range. And, the last tab is the Actions tab, where you define what action you want the alarm to take.
Let’s say that I want to create an alarm for a specific VM Guest that will email me if its CPU is above 80%. To do that, I go to the Guest VM inside the VI client. I then click on the Alarms tab, right-click and click New Alarm in the alarm definitions view. I gave the alarm a name “Alert when Vista 1 is down” and a description. I also made sure that the Enable this Alarm checkbox was checked.
Figure 6: Creating a new Alarm, giving it a name and description
From there, I moved on to the Triggers tab where clicked Add then added an alarm trigger to alarm on VM CPU Usage, above 80%.
Figure 7: Defining VMware VI Alarm Triggers
Next, I moved on to the Actions tab, where I created a new action to send an email to a certain email address. Notice, that in Figure 8 there are many actions to choose from including; email, SMTP trap, run a script, and power on/off/suspend a VM guest. Also notice how the alarm will occur when the trigger turns from yellow to red.
Figure 8: Creating the Action for the Alarm
From here, I clicked OK and the alarm was created!
You should note that for SNMP and Email alarms to function, Mail and SNMP server settings must be configured for these types of alarms to work. These are configured in the VIrtualCenter Management Server Configuration (see Figure 9, below).
Figure 9: Mail and SNMP server settings must be configured for these types of alarms to work
You can see that our alarm was successfully triggered in the triggered alarms pane of the VI Client.
Figure 10: Alarm successfully triggered
In this article, I have covered how to configure VMware Alarms. These alarms tell you what is going on in your VMware Virtual Infrastructure – something every Admin should know. You really want to be able to set alarms and not have to think about your VMware Hosts and Guests. You need to be able to configure these, then sit back and relax, having faith that you will be alerted if something needs your attention.