Exchange queues

There doesn't seem to be any queue monitors in the Microsoft.Exchange.15 sealed mp from Microsoft. This was the last mp they made that monitors on-prem Exchange 2013/2016.

To address this, I think it was Kevin Holman who made the Exchange.Queues (15.0.669.23) mp. The monitors in the mp are listed in Table 1.0 and they all have these settings in common:

  • Target: Exchange.Queues.Server
  • Parent Monitor: System.Health.PerformanceState
  • Category: PerformanceHealth
  • Object: MSExchangeTransport Queues
  • Counter: see Table 1.0
  • Instance: _Total
  • Frequency: 60 seconds
  • Threshold: 5000
  • Monitor type: System.Performance.ConsecutiveSamplesThreshold

Table 1.0

Counter Name
External Aggregate Delivery Queue Length (All External Queues)
External Retry Remote Delivery Queue Length
Internal Aggregate Delivery Queue Length (All Internal Queues)
Internal Retry Remote Delivery Queue Length
Retry Mailbox Delivery Queue Length
Retry Non-Smtp Delivery Queue Length
Submission Queue Length
Unreachable Queue Length

There is one discovery in the mp that creates the Exchange.Queues.Server class. This is the class that the monitors target. It's a PowerShell script that targets the Microsoft.Exchange.15.Server class, which is from the Microsoft Microsoft.Exchange.15 mp and runs this code:

# Get the Exchange Server object
$ExchangeServerObj = Get-ExchangeServer -Identity $ExchServerName
IF ($ExchangeServerObj -eq $null)
{
$momapi.LogScriptEvent($ScriptName,$EventID,1,"`nFATAL ERROR - cannot get Exchange Server object via PowerShell. `nTerminating Script. `nError is ($Error).")
EXIT
}
IF ($ExchangeServerObj.IsHubTransportServer -eq "True" -or $ExchangeServerObj.IsEdgeServer -eq "True")
{
#This is an Exchange 2013 or later Hub or Edge server with queues
$instance = $DiscoveryData.CreateClassInstance("$MPElement[Name='Exchange.Queues.Server']$")
$instance.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $ComputerName)
$instance.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", $ComputerName)
$instance.AddProperty("$MPElement[Name='Exchange2013!Microsoft.Exchange.15.Server']/Name$", $ExchServerName)
$DiscoveryData.AddInstance($instance)}

So the logic is, "Run this on every Exchange server and if it's not a Hub Transport or Edge server, create an instance with the name of the Exchange server of class type Exchange.Queues.Server".

For me there's not enough value doing it this way considering the load you put on each server to load the Exchange PowerShell module and run the cmdlet once a day. If you do this manually you can see it's not quick.

My plan is to build new monitors (borrowing from these ones) and change the target to Microsoft.Exchange.15.Server.

Watch this space...

Comments