Azure Event Hubs metrics in Azure Monitor

Event Hubs metrics give you the state of Event Hubs resources in your Azure subscription. With a rich set of metrics data, you can assess the overall health of your event hubs not only at the namespace level, but also at the entity level. These statistics can be important as they help you to monitor the state of your event hubs. Metrics can also help troubleshoot root-cause issues without needing to contact Azure support.

Azure Monitor provides unified user interfaces for monitoring across various Azure services. For more information, see Monitoring in Microsoft Azure and the Retrieve Azure Monitor metrics with .NET sample on GitHub.

Access metrics

Azure Monitor provides multiple ways to access metrics. You can either access metrics through the Azure portal, or use the Azure Monitor APIs (REST and .NET) and analysis solutions such as Log Analytics and Event Hubs. For more information, see Monitoring data collected by Azure Monitor.

Metrics are enabled by default, and you can access the most recent 30 days of data. If you need to retain data for a longer period of time, you can archive metrics data to an Azure Storage account. This is configured in diagnostic settings in Azure Monitor.

Access metrics in the portal

You can monitor metrics over time in the Azure portal. The following example shows how to view successful requests and incoming requests at the account level:

View successful metrics

You can also access metrics directly via the namespace. To do so, select your namespace and then click Metrics. To display metrics filtered to the scope of the event hub, select the event hub and then click Metrics.

For metrics supporting dimensions, you must filter with the desired dimension value as shown in the following example:

Filter with dimension value

Billing

Using metrics in Azure Monitor is currently free. However, if you use additional solutions that ingest metrics data, you may be billed by these solutions. For example, you are billed by Azure Storage if you archive metrics data to an Azure Storage account. You are also billed by Azure if you stream metrics data to Azure Monitor logs for advanced analysis.

The following metrics give you an overview of the health of your service.

Note

We are deprecating several metrics as they are moved under a different name. This might require you to update your references. Metrics marked with the "deprecated" keyword will not be supported going forward.

All metrics values are sent to Azure Monitor every minute. The time granularity defines the time interval for which metrics values are presented. The supported time interval for all Event Hubs metrics is 1 minute.

Request metrics

Counts the number of data and management operations requests.

Metric Name Description
Incoming Requests The number of requests made to the Azure Event Hubs service over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Successful Requests The number of successful requests made to the Azure Event Hubs service over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Server Errors The number of requests not processed due to an error in the Azure Event Hubs service over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
User Errors The number of requests not processed due to user errors over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Quota Exceeded Errors The number of requests exceeded the available quota. See this article for more information about Event Hubs quotas.

Unit: Count
Aggregation Type: Total
Dimension: EntityName

Throughput metrics

Metric Name Description
Throttled Requests The number of requests that were throttled because the throughput unit usage was exceeded.

Unit: Count
Aggregation Type: Total
Dimension: EntityName

Message metrics

Metric Name Description
Incoming Messages The number of events or messages sent to Event Hubs over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Outgoing Messages The number of events or messages retrieved from Event Hubs over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Incoming Bytes The number of bytes sent to the Azure Event Hubs service over a specified period.

Unit: Bytes
Aggregation Type: Total
Dimension: EntityName
Outgoing Bytes The number of bytes retrieved from the Azure Event Hubs service over a specified period.

Unit: Bytes
Aggregation Type: Total
Dimension: EntityName

Connection metrics

Metric Name Description
ActiveConnections The number of active connections on a namespace as well as on an entity.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Connections Opened The number of open connections.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Connections Closed The number of closed connections.

Unit: Count
Aggregation Type: Total
Dimension: EntityName

Event Hubs Capture metrics

You can monitor Event Hubs Capture metrics when you enable the Capture feature for your event hubs. The following metrics describe what you can monitor with Capture enabled.

Metric Name Description
Capture Backlog The number of bytes that are yet to be captured to the chosen destination.

Unit: Bytes
Aggregation Type: Total
Dimension: EntityName
Captured Messages The number of messages or events that are captured to the chosen destination over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Captured Bytes The number of bytes that are captured to the chosen destination over a specified period.

Unit: Bytes
Aggregation Type: Total
Dimension: EntityName

Metrics dimensions

Azure Event Hubs supports the following dimensions for metrics in Azure Monitor. Adding dimensions to your metrics is optional. If you do not add dimensions, metrics are specified at the namespace level.

Metric Name Description
EntityName Event Hubs supports the event hub entities under the namespace.

Azure Monitor integration with SIEM tools

Routing your monitoring data (activity logs, diagnostics logs, etc.) to an event hub with Azure Monitor enables you to easily integrate with Security Information and Event Management (SIEM) tools. For more information, see the following articles/blog posts:

In the scenario where an SIEM tool consumes log data from an event hub, if you see no incoming messages or you see incoming messages but no outgoing messages in the metrics graph, follow these steps:

  • If there are no incoming messages, it means that the Azure Monitor service is not moving audit/diagnostics logs into the event hub. Open a support ticket with the Azure Monitor team in this scenario.
  • if there are incoming messages, but no outgoing messages, it means that the SIEM application is not reading the messages. Contact the SIEM provider to determine whether the configuration of the event hub those applications is correct.

Next steps

For more information about Event Hubs, visit the following links: