Recently, one of my customers asked me how we could monitor their Resource Pools (RP) in VMware Aria Operations™ as they set some CPU limits and would like to be alerted when the CPU demand of the RP was over 80%. Providing guidance for questions like this is typical with VMware Technical Account Management (TAM) Services. It’s just what we do and a whole lot more, but I digress.
Since they use Aria Operations we thought it would be a good idea to create a custom alert that would trigger when the RP was using over 80% of the assigned limit.
How to create a custom alert
To get started, we checked the different metrics available, and discovered we couldn’t create a specific alert for exactly what we wanted to do. However, we could create alerts when RP usage was at 80%, but not related to the limit.
After some thinking, we decided we could create a custom Super Metric that would allow us to trigger the alert they needed.
We created a Super Metric that gives us the result of subtracting the demand of CPU (Metric Type) of the RP to the 80% of the CPU limit set for the RP (Property Type).
For this example, the name of the Super Metric would be:
Is_Resource_Pool_CPU_usage_over_80%_of_Limit
We clicked on the left menu: Configure – Super Metrics and added a new one:
Then we selected the Object Type which, in this case, is Resource Pool.
And we added our formula:
sum({THIS: Configuration|CPU Resource Allocation|Limit (MHz)})*0.8 – sum({THIS: CPU|Demand (MHz)})
We select a Property Type for the Limit and a Metric Type for the Demand.
As result of the formula, if the CPU demand in MHz is over the 80% of the limit, we will have a negative number. This will allow us to create an alert based on this Super Metric.
Next, we selected which policies we wanted to activate the new Super Metric in.
And there we have it! After 5 minutes, the first values for the Super Metric appeared.
Then, to create the alert, we went to Configure – Alerts and select Alert Definitions.
Then we added the new alert. I named it RP_CPU_Demand_over_80%_of _limit and selected the Base Object Type resource Pool.
Next, we dragged and dropped from the list of Conditions to the right of the Super Metric we just created.
And we selected that if the Super Metric is equal or lower than zero, we want to trigger a warning (or Critical depending on your needs).
To prevent the alert from being triggered if the Resource Pool does not have a limit, we added another Condition. This will ensure that the alert will only be triggered if both conditions are true.
Then, we created a Recommendation. Recommendations are not mandatory, but it is a good idea to create and add them to the alerts, so whoever is monitoring our environment and reviewing the alert will have specific information about what is going on.
We can add a link to our company WIKI, a link to a KB from VMware or other vendor describing the issue and how to solve it, or simply a list of people who should be notified if the alert comes up.
Next, we had to apply it to a Policy.
Finally, we enabled notifications and created the new alert.
After a few minutes, we should have alerts in place if any Resource Pool’s CPU demand is over 80% of its limit.
In the example above, the Super Metric and the alert to the Default Policy were added in a lab environment. In a more complex environment, we could create the Super Metric and alerts with different values (70%, 80%, 90%) and use them in different policies applied to different environments.
As an example, we could go for 70% in our production Policy (applied to Production policy used for our PROD Datacenters or Clusters), 80% to our DEV, and 90% to our TEST environment (applied to our DEV and TEST Policies).
Now we can monitor this Resource Pools and they will be aware if the limits are getting too low. This will allow us to anticipate the need for more resources in the future.
Looking for more information?
As a VMware TAM, I work hand in hand with my customers, and we felt great after we achieved our goal. For this specific alert, there was nothing documented nor any post on the Internet that we could find.
You can always search on the Internet about specific Super Metrics or alerts, since many VMware professionals share their experiences online. You can also visit the VMware website to learn more about Configuring Super Metrics.
You can also search on our code web for examples on scripts, dashboards, and many other automations.
Don’t have Technical Account Management Services?
Besides providing guidance on how to set up alerts in Aria Operations, Technical Account Management Services can help you achieve your IT objects through activities such as:
- Conducting technology assessments of your current environment
- Solution guidance and roadmap planning for future technology adoption
- Upgrade planning and guidance
- Recommendations for optimizing operations
- And more…
To learn how Technical Account Management Services can help your organization, contact your VMware Sales Representative, or visit us online.