Memory Usage

Microsoft.MSMQ.10.0.Monitor.Memory (UnitMonitor)

Monitor the "Private Bytes" counter for the MSMQ process and alert if the value is larger than threshold.

Knowledge Base article:

Summary

The amount of private bytes used by MSMQ is larger than baseline values and should be investigated.

Resolutions

If the private bytes usage levels out or falls back below the baseline then the issue may be due to an intermittent spike in activity.

If the private bytes for the MQSVC process continue to increase then determine whether there is a corresponding increase in message volume or message size that would in turn require increased memory usage.

If no other issues are found then consider restarting the service to reset its memory allocation. If the issue reoccurs then further debugging may be required to investigate the source of the memory use.

Element properties:

TargetMicrosoft.MSMQ.10.0.Servers
Parent MonitorSystem.Health.PerformanceState
CategoryCustom
EnabledTrue
Instance NameProcess
Counter NamePrivate Bytes
Frequency900
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeSystem.Performance.ConsecutiveSamplesThreshold
RemotableTrue
AccessibilityPublic
Alert Message
Memory Usage
Please see the alert context for details.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.MSMQ.10.0.Monitor.Memory" Accessibility="Public" Enabled="true" Target="Microsoft.MSMQ.10.0.Servers" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="SystemPerf!System.Performance.ConsecutiveSamplesThreshold" ConfirmDelivery="false">
<Category>Custom</Category>
<AlertSettings AlertMessage="Microsoft.MSMQ.10.0.Monitor.Memory.AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters/>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UnderThreshold" MonitorTypeStateID="ConditionFalse" HealthState="Success"/>
<OperationalState ID="OverThreshold" MonitorTypeStateID="ConditionTrue" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Private Bytes</CounterName>
<ObjectName>Process</ObjectName>
<InstanceName>mqsvc</InstanceName>
<AllInstances>false</AllInstances>
<Frequency>900</Frequency>
<Threshold>104857600</Threshold>
<Direction>greater</Direction>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>