Home > Troubleshooting, VMware vSphere > Use Alarms to monitor your vSphere environment

Use Alarms to monitor your vSphere environment

06/18/2012

There have been a number of KB articles, blog posts, best practices documentation and more suggesting vSphere admins use the Alarms feature in vSphere to proactively monitor their environment.  This is another one.

I was recently asked about a tool that could let someone know when memory or CPU utilization gets too high on a VM.  I suggested vCOps, but after a moment, I realized that vCOps is a fantastic tool for analysis and trending, but it’s not really meant to let someone know that a threshold has been reached and some action may or may not be needed.

For that, I suggest using the built-in and easy-to-use Alarms.   There are a number (54 in my case) of built-in Alarms that come pre-configured, but none of them – by default – will notify you via email when they’ve fired.  We’ll modify a built-in Alarm to send an email when its status changes.

Modify default Alarm

On event that deserves notification is a vSphere HA error. Namely, when vSphere HA on a host is in an error/alert state.  The Alarm to modify is named “vSphere HA host status”.  Find it on the Alarms tab while your vCenter server is selected in the treeview of the vSphere Client.

This One

This One

Right-click the Alarm and choose “Edit Settings”.  The “Alarm Settings” window has four tabs; General, Triggers, Reporting and Actions.  For this section,  we are concerned about the Actions tab, but you can check out the other tabs too.  Go ahead, I’ll be right here.  You’ll notice on the Actions tab, there are no actions listed, so when the status changes, the icon on the host will change.

No actions defined

No actions defined

Unless you are watching the vSphere client, you may not notice that anything has changed.  Let’s fix that.  Click the “Add” button.  It adds a new action item which, conveniently enough is “Send a notification email”, once,  when the status is “Alert”.  All we have to do is click in the “Configuration” field and type in the comma-separated email addresses for notifications to be sent to.  You have options to send the message repeatedly and when the status changes back to warning or normal – there depend on your environment and just how much email you want to send.  Please note that there’s no way – that I’m aware of – to modify the content of the notification email messages.  They just say “Alarm status on XX host changed from warning to alert” or similar.  It’s just enough information to know THAT something happened, but not WHY it happened.

There are a lot of valuable Alarms already configured that just need actions assigned. For example, there’s an alarm for Virtual Machine Memory Usage that will let you know when a VM is running out of vRAM – this is handy because you may not know about the high memory utilization without a notification.

Prerequisites:

The Alarm notifications are sent by the vCenter Server, so it has to be configured with valid SMTP settings:

vCenter Server SMTP Configuration

Configure SMTP settings for vCenter

Advertisements
%d bloggers like this: