- VMware vSphere Tanzu: Basic vs. Standard vs. Advanced edition - Fri, Sep 17 2021
- Containers and VMware vSphere - Fri, Sep 10 2021
- How to install ESXi 7.0 U2 directly from an HTTP server via a UEFI HTTP boot - Fri, Sep 3 2021
It's important for admins to know how to effectively configure vSphere 7 alarms to help them with their daily tasks. You can create an alarm to email a notification whenever a new VM is created or alert you to resources running low on an ESXi host or cluster. This is particularly useful when you and your coworkers are creating many VMs and you want to keep track.
vSphere 7 alarms that are created at higher levels in the vSphere hierarchy will be propagated to the underlying objects at lower levels where applicable. At the very top, there is vCenter Server, then a datacenter object, ESXi hosts, and so on. You can create an alarm to monitor any object registered in the vSphere 7 inventory.
You can also create an alarm whenever some of the cluster or VM resources run low. Imagine you have a critical VM that has problems with performance. You want to be notified when this happens. Alarms are very configurable and flexible.
When managing alarms, you need to have a required privilege. You as an admin can delegate this task to someone within your IT team or from among your coworkers.
The required privileges are Alarms.Create alarm or Alarms.Modify alarm.
Where are alarms created?
In the vSphere client, select an object in the inventory pane and navigate to Configure > More > Alarm Definitions. Then click Add.
Tip: If you want to create an alarm for a particular VM or object, you can also right-click that VM or object, and then select Alarms > New Alarm definition.
You'll open an assistant inviting you to provide a name, description, target type, and target.
Click next and create an alarm rule by specifying:
- Conditions—Options are: Trigger, Arguments, Operator, Thresholds
- Severity— Options are: Warning or Critical
- Actions— Options are: Send email notifications, SNMP traps, Run script
As you can see, there are nine different target types available.
After choosing the target type and adding a meaningful name, choose the alarm rule and arguments. Then, in the lower section, select the rule's severity. This indicates whether the alarm is a warning, is critical, or keeps the target's current state.
Then set the notification type. You can choose from email, SNMP trap, or running a script.
Note the two buttons below: Add Another Rule and Duplicate Rule. Use them to add some additional rules to the alarm.
Note that the email and SNMP settings require that you first configure the mail settings for your vCenter Server. You must set the primary receiver URL to the DNS name or IP address of your SNMP receiver.
The run script option needs the full pathname of the command or script. Be sure to format it as a single string. The scripts are executed on the vCenter Server Appliance (VCSA).
When you create an alarm that targets VMs and hosts, advanced actions are also available. Examples of host actions include Enter Maintenance Mode and Exit Maintenance Mode. Examples of virtual machine actions include Migrate VM and Reboot Guest on VM.
Let's continue with the assistant. On the next page, we can specify alarm reset rules by enabling the Reset the Alarm to Green option and providing details, such as arguments, operators, and actions.
Click Next to move to the review page, where you can see which alarms you've created, what the triggers are, and what notification options you picked up.
Once done, you can sort the Last Modified column by date to find your freshly created alarm easily.
As you can see, there are many options. There are nine different target types in the vSphere 7 suite. You can choose the vCenter Server, virtual machines, hosts, clusters, datacenters, datastores, distributed switches, distributed port groups, or datastore clusters. There are hundreds and hundreds of predefined alarms, so chances are that vSphere 7 already has you covered.
The custom alerts with notifications should help you to create your own alerts. There are numerous examples. For instance, you could create an alert to notify you when something is not performing well, such as a lot of memory swapping, disk latency, or excessive CPU ready time metrics with high values. Another example could be notification about the poor health of vSAN objects, key management server problems, or vSphere HA cluster health issues.
The vSphere 7 alarm system is very flexible, enabling you to create your own personalized alarms that fit your own environment.
In larger environments, you'll certainly want to use a SNMP-based monitoring tool such as Nagios, vRealize Operations Manager, or vRealize Log Insight server. You won't configure email settings for your alarms because you'll most likely receive a lot of emails.
When you enable SNMP or SMTP (email), you must configure vCenter Server first so you can use one or the other. To do so, select the vCenter Server object in the vSphere Web Client and configure SNMP or SMTP from the vCenter Server Settings page.
Subscribe to 4sysops newsletter!
vSphere 7 alarms are a very easy method of monitoring what's happening in your vSphere installation. You might need some time to get used to them and to pick what you need and want to monitor, but in the end you won't regret using them.