Configuring VMware vCenter Server Alarms

Working with vCenter you saw the Alarms tab, but I don’t know how many of you touched it. Now is time to use it because is very useful when it comes to preventing incidents for your VMware infrastructure. When something goes bad, or is not in the normal parameters, an alarm is raised and you are notified by email, SMS (need third-party tools), or vCenter messages. To give you an example, let’s say you have a critical VM that every time its CPU goes high you want to be notified, so you can take action and see what the problem is.

If you go to your vCenter server > Alarms and click the Definitions button, you can see a list of alarms already predefined. You can modify or delete them from here if you want to.

Alarms in vCenter are like NTFS permissions in Windows, they propagate. The alarms defined at a top-level will propagate to all the hosts, folders and VMs bellow. Just click one of your VMs then go to the Alarms tab, and you will see a bunch of them propagated here. You might wonder where are the rest of them that I saw at the vCenter level. Well…they are not here, because some of them were configured to monitor ESXi hosts, and others to monitor VMs. Since we are looking at a VM, only those alarms configured to monitor VMs will appear in the list. If you try to delete or modify an alarm here, and that alarm is propagated…you can’t. You will need to go at the level where is defined, and you do that by clicking the link in the Defined In column.

     

If you want to create an alarm, and you want that alarm to apply only to a specific VM, folder, or ESXi host, you can do that. Just click the VM/host/folder, go to the Alarms tab and define a new alarm. Right-click on the white space and choose New Alarm. You can also use the Tools Menu and go to File > New > Alarm.

     

Once the Alarm Settings window opens, give the alarm a name. For the sake of this example I will create an alarm that will be triggered when the machine is powered off. In the Description box you can type a description for this alarms, but is not necessary. In the Monitor menu select what this alarm is going to monitor. You will have a single option here (Virtual Machine) because you are configuring this at a VM level. If you were to configure the alarm at the vCenter level you will have many more options. Bellow the Monitor menu there are two radio buttons, and base on the option selected here we get different triggers in the Triggers tab. For now leave the first option selected “Monitor for specific conditions or state, for example, CPU usage, power state” and we will take care of the second one later on. The Enable this alarms check box is self-explanatory, so I’ll skip it.

On the Triggers tab click the Add button. As you can see in the Triggers Type column we get different kinds of triggers. Select VM state (Trigger Type) > Is equal to (Condition) > None (Warning) > Powered off (Alert).

On the Reporting tab you can modify the time frequency and repetition of the alarm. Just leave the defaults here and go to the Actions tab.

Here we configure what action should be triggered when the condition is met (machine is powered off in this case). Click the Add button to add an action. I’m going to create one that sends me an email when the type of alarm changes from warning to alert. You can also set it to send an email when the machine is powered on, which is the last column. Another thing that can be done is configure the rule not to send just one time alert but to repeat it. When Repeat is chosen you then have the option to configure the repeat interval, down at the Frequency section. Click OK when done.

vCenter to be able to send notification emails needs to be properly configured . See this guide on how to do it.

    

The alarm is created, now let’s test this and see if it actually works. Power off that VM and you should get an email from vCenter saying that the machine is not running.

     

Let’s create another alarm, but this time on the vCenter level. Click your vCenter server name then go to the Alarms tab. Right-click on the white space and choose New Alarm, or right-click the vCenter server and choose Alarm > Add Alarm.

Give the alarm a name then select what to monitor. As you can see there are plenty of monitors now in the list. Select Virtual Machine, because this alarm will apply to all the VMs in the infrastructure. Now select Monitor for specific events occurring on this object, for example, VM power on since we used the first one in the previous example.

On the Triggers tab click the Add button. As you can see there is an all new list of events. Select VM powered off, and set the status to Alert. Click OK when done.

Set what action to take when the triggered condition is met.

If you click on any VM and go to the Alarms tab, you will see the new alarm propagated; off course no modifications can be done from a lower level.

When any VM in the infrastructure will be powered off, an alarm will be triggered, and an email will be sent for notification.

     

I never talked about the Triggered Alarms button. If pressed it shows all the alarms that are triggered at that specific level. If you go at the vCenter server level it will show all the alarms that are triggered in the infrastructure.

You can acknowledge and clear the alarm, but it will trigger again if the problem still persists on an object.

If for some reason, you want this alarm to be disabled, all you have to do is go at the right level until edit mode is permitted, right-click the alarm and choose Edit Settings.

Clear the box Enable this alarm, then hit OK

The icon will change when an alarm is disabled, having an x in the down right corner.

Want content like this delivered right to your

email inbox?


3 thoughts on “Configuring VMware vCenter Server Alarms

  • 05/08/2014 at 17:10
    Permalink

    Hi Adrian,

    I am verifying the alarm functionality on vSphere 5.1, and I have defined the exact settings as you mentioned for the VM State, but with the action to send notification trap instead of email. The trap for VM Powered Off event is sent, but when I turn the VM on, there is no trap sent for the alarm clear.

    Any suggestion?

    Thank you,
    Mihai

    Reply
    • 07/08/2014 at 09:36
      Permalink

      Hello Mihai,
      Make sure in the Actions tab in the Alarm Settings you set an action from yellow to green. Just tested and it works. Let me know if you need any more help.

      Adrian

      Reply

Leave a Reply to Mihai Cancel reply

Your email address will not be published. Required fields are marked *

*

css.php