You can use VMware vCenter alarms to alert you to a variety of potential problems with your environment. Set correctly,...
these vCenter alarms can improve response time and help prevent downtime or degraded VM performance. In this article you’ll learn how you can set and manage alarms on different objects that are managed through your vCenter server.
More on VMware vCenter monitoring
Setting and managing VMware vCenter alarms isn’t difficult, but there are several terms and concepts you should be aware of before you get started.
Anatomy of vCenter alarms
Even if you haven’t set any alarms, you’ll notice that an Alarms tab is available on all objects in your vSphere environment. On this tab, you can see basic alerts relating to events like the shutdown of a host or a virtual machine (VM) running out of resources. In most cases, these alarms are much too generic and you’ll need to configure your own alarms to monitor effectively.
When working with VMware vCenter alarms, it is important to determine the scope of the alarm. You can create alarms at the data center level, the cluster level, host level or even for a specific VM. This allows you to create broad or focused alarms. For example, if you set an alarm at the cluster level, it applies to all hosts in the cluster and to all VMs on those hosts. But if you set an alarm for a specific VM, that alarm applies only to that VM. This allows you to use different alarms for different kinds of needs.
For instance, you can create an alarm at the data center level (the highest level, which includes all clusters, hosts and VMs) that will trigger if the remaining available RAM on any VM drops to less than 20%. But the 20% mark may not be appropriate for some VMs that you want to keep a closer eye on. So, you can create an alarm on a specific VM to trigger if available RAM drops below 30%, for example.
If you want to define an alarm for a specific object, such as a host, you first need to select that object. Next, on the Alarms tab, click Definitions to see a list of alarms that are currently set. To set the properties for an existing alarm, double-click it from the list. You’ll now see a window containing four tabs with the different properties of the alarm, including what will trigger the alarm, how it will be logged and what action vSphere will take if the alarm is triggered.
Building vCenter alarms
VSphere provides some default alarms, or you can create your own. Doing this allows you to define exactly what should happen if the alarm is triggered. To set an alarm, right-click the object to which you want to apply it. On the General tab, name the alarm. Click Add on the Triggers tab to add an alarm trigger. If you add an alarm for a host, the default trigger type is host CPU usage %, which triggers the selected alarm action if host CPU usage goes above a certain percentage.
After selecting the trigger, you need to specify its other properties. First, select the alarm condition. Typically, you can set an alarm to trigger when resource use is either above or below a selected threshold. After selecting the condition, specify when a warning is raised and when an alert (the more severe state) is raised. For both, you’ll also specify a condition length. In Figure 3, you can see that a warning is raised if the CPU Usage exceeds 75% for more than five minutes, and an alert when the same parameter exceeds 90% for more than five minutes.
The most important part of the alarm is its trigger. Specific trigger types are available for the different objects in your environment, such as disk usage, memory usage and power state.
After specifying when an alarm should be triggered, specify what vSphere should do from the Actions tab. The default action is to send a notification email, but you can also send a notification trap – an alarm signal that is sent to the management software. This is important if you’re using an SNMP-based network management tool. Apart from these notifications, you can also specify that an action should occur, such as entering maintenance mode, rebooting the host or running a command. Make sure that you also complete the configuration field that is required for some of the alarms. If for instance you want to send a notification email, in the configuration field you need to enter the email address where a notification will be sent.
Whatever you choose to do when an alarm is raised, you will see an icon on the object in the vSphere Client when an alarm has occurred. You can also see the alarms that have been raised for an object in the Triggered Alarms view of the Alarms tab. From here, you can double-click the alarm and find out what has happened. But you can imagine that in bigger environments, it is worth the effort to set up alarms to be automatically being sent to a centralized management system.