System Center 2019+ Virtual Machine Manager UserRole VMCount

Microsoft.SystemCenter.VirtualMachineManager.UserRoleVMCountMonitor (UnitMonitor)

Monitors the user role VMCount quota

Element properties:

TargetMicrosoft.SystemCenter.VirtualMachineManager.UserRole
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.VirtualMachineManager.UserRoleUsageUnitMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
UserRole VMCount Has Reached Or Exceeded Threshold
The UserRole {0} has a VMCount quota usage percentage of {1}, and it has reached or exceeded the specified threshold percentage
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.VirtualMachineManager.UserRoleVMCountMonitor" Accessibility="Public" Target="VMMBase!Microsoft.SystemCenter.VirtualMachineManager.UserRole" TypeID="Microsoft.SystemCenter.VirtualMachineManager.UserRoleUsageUnitMonitorType" ParentMonitorID="SystemHealth!System.Health.ConfigurationState">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.VirtualMachineManager.UserRoleVMCountMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="System!System.Entity"]/DisplayName$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='$Target/Property[Type="VMMBase!Microsoft.SystemCenter.VirtualMachineManager.UserRole"]/RoleID$-VMCount']$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UserRoleVMCountHealthy" MonitorTypeStateID="UserRoleHealthy" HealthState="Success"/>
<OperationalState ID="UserRoleVMCountWarning" MonitorTypeStateID="UserRoleWarning" HealthState="Warning"/>
<OperationalState ID="UserRoleVMCountCritical" MonitorTypeStateID="UserRoleCritical" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>1800</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<WarningThreshold>80</WarningThreshold>
<CriticalThreshold>90</CriticalThreshold>
<UserRoleId>$Target/Property[Type="VMMBase!Microsoft.SystemCenter.VirtualMachineManager.UserRole"]/RoleID$-VMCount</UserRoleId>
<VMMServer>$Target/Property[Type="VMMBase!Microsoft.SystemCenter.VirtualMachineManager.UserRole"]/VMMServer$</VMMServer>
</Configuration>
</UnitMonitor>