How to monitor partition count currently in use for event hub namespaces?

Aaron Turcott 0 Reputation points
2025-01-06T20:35:55.2233333+00:00

We are trying to create an alert to notify us when our event hub namespaces are nearing partition count capacity. I have been able to find out how many partitions are allocated to an event hub namespace using KQL, but have not been able to figure out how many partitions are currently in use. To my knowledge, Azure doesn't monitor event hub instances like it does event hub namespaces because they are entities of the namespace and not their own resource so we can't pull that info. I can use the az cli to figure out how many partitions are in use for each instance but I'm also not sure if I can use that to create an alert. My question is: how do I create an Azure monitor or log alert to notify us when an event hub namespace is nearing partition count capacity?

TL;DR

Trying to create Azure monitor or log alert to notify us when an event hub namespace is nearing partition count capacity. Cannot find info in Azure of how many partitions are currently being used. Where do I get this info to create an alert?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,408 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
671 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sander van de Velde | MVP 34,201 Reputation points MVP
    2025-01-07T22:24:01.4966667+00:00

    Hello @Aaron Turcott ,

    welcome to this moderated Azure community forum.

    Azure Event Hub are created within an EventHub namespace.

    Each eventhub has its own number of partitions.

    These partition are use to provide parallelism.

    It's a good practice to keep the same amount of partitions as surrounding azure resources.

    For example, if an IoT Hub forwards messages to a stream analytics job having an eventhub as an output, all three resources should use the same amount of partitions.

    The number of partitions used by an eventhub is something set when creating the eventhub itself.

    It is fixed and cannot change anymore afterwards without recreating the eventhub.

    The maximum amount of partitions that can be assigned depends on the tier of eventhub namespace.

    So, I'm not sure if there is some notification related to that count.

    Last question is then: how much partitions do you need?

    For the answer of that question, check out this post with a detailed description.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.


  2. Alios 0 Reputation points
    2025-01-09T21:43:37.04+00:00

    Hi @Aaron Turcott ,

    Could you please share your query, I will assist you for this for creating custom alerts based on that data


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.