A: While there is no specific metric that measures quantity of messages in a Event Hub partition, there is a way to measure that messages are going thru.  This can be done by comparing Sequence Numbers and alerting if they don't change or don't change fast enough.  Specifically, this is done by comparing Sequence Number from the current monitoring cycle to Sequence number from the previous monitoring cycle.  If the two are the same for a sustained amount of time, this signifies that messages are not being published thru the hub.

Capturing latest sequence number is simple.  

  • Define a metric of type AzureServiceBusEventHubEndSequenceNumber.  Let's call the metric (for example): CurrentSequenceNumber
  • Define a metric of type AggregateMetric over CurrentSequenceNumber, use time period of 10 minutes and Aggregation method of: PreviousValue.  Call the metric (for example): PreviousSequenceNumber
  • Define an alert that compares CurrentSequenceNumber to PreviousSequenceNumber.  Expression: CurrentSequenceNumber == PreviousSequenceNumber.