ericmattingly / msit-azure-service-bus-mp

The Microsoft IT Windows Azure Service Bus Management Pack provides a new template to use with System Center Operations Manager 2012 R2 to monitor Azure Service Bus
MIT License
4 stars 4 forks source link

Monitoring for Old Messages not Working for Queues and Subscriptions #3

Closed ericmattingly closed 9 years ago

ericmattingly commented 9 years ago

Both powershell scripts return no value sometimes which causes the SCOM old messages monitor to break

ericmattingly commented 9 years ago

Issue is with this statement which is not converting the values correctly and SCOM does not always read this as an Int

$oldCount = ([System.DateTime]::UtcNow - $oldestDate)::Minutes

The below code is a fix for this

$oldCount = [System.Convert]::ToInt32(([System.DateTime]::UtcNow - $oldestDate).TotalMinutes)

The fix is in v1.1.1.2