最も古いメッセージ

Microsoft.MSMQ.6.3.Monitor.Queue.OldestMessage (UnitMonitor)

このモニターは、キュー内の最も古いメッセージの経過時間をチェックします。

Knowledge Base article:

概要

このモニターは、キュー内の最も古いメッセージの経過時間をチェックします。

構成

このモニターは、既定では無効になっています。 モニターを動作させるには、上書きによってモニターを有効にする必要があります。

このモニターの動作は、以下のパラメーターを上書き設定することで変更できます。

IntervalSeconds

テストの実行間隔の秒数です。 この値の設定が低すぎると、MSMQ サービスに過度のオーバーヘッドがかかります。 この値の設定が高すぎると、エラー状態が適切な時間内に検出されない可能性があります。 既定で 120 秒に設定されています (2 分間隔でテストを実施)。

WarningThresholdValue

警告状態が生成される最も古いメッセージの経過時間 (秒)。

ErrorThresholdValue

エラー状態が生成される最も古いメッセージの経過時間 (秒)。

原因

通常の動作では、メッセージがキューに追加されるとアプリケーションが直ちにメッセージを受信することが期待されます。 メッセージが長い時間キューに残っている場合は、受信側のアプリケーションに問題が発生しているか、受信側のアプリケーションがキューからメッセージを読み取ることができないことを示している可能性があります。

解決方法

キューの接続状態、およびキューからメッセージを受信するアプリケーションの接続状態を確認してください。

Element properties:

TargetMicrosoft.MSMQ.6.3.Queues
Parent MonitorSystem.Health.PerformanceState
CategoryAvailabilityHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.MSMQ.6.3.MonitorType.QueueStatistic.ThreeState
RemotableTrue
AccessibilityPublic
Alert Message
キュー内の最も古いメッセージの経過時間がしきい値を超えました。
詳細については、アラートのコンテキストを参照してください。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.MSMQ.6.3.Monitor.Queue.OldestMessage" Accessibility="Public" Enabled="false" Target="Microsoft.MSMQ.6.3.Queues" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.MSMQ.6.3.MonitorType.QueueStatistic.ThreeState" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.MSMQ.6.3.Monitor.Queue.OldestMessage.AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ExceededErrorThreshold" MonitorTypeStateID="ErrorState" HealthState="Error"/>
<OperationalState ID="ExceededWarningThreshold" MonitorTypeStateID="WarningState" HealthState="Warning"/>
<OperationalState ID="WithinThreshold" MonitorTypeStateID="SuccessState" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>300</IntervalSeconds>
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<QueuePath>$Target/Property[Type="Microsoft.MSMQ.6.3.Queue"]/PathName$</QueuePath>
<CounterName>Oldest Message Age</CounterName>
<LogDetail>false</LogDetail>
<WarningThresholdValue>0</WarningThresholdValue>
<ErrorThresholdValue>0</ErrorThresholdValue>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>