Skip to content

Commit 16d1746

Browse files
authored
Merge pull request #268713 from v-thepet/notification-monitor
Azure Monitor horizontals - Notification Hubs
2 parents dc69da8 + c22a57f commit 16d1746

File tree

4 files changed

+179
-34
lines changed

4 files changed

+179
-34
lines changed

articles/notification-hubs/TOC.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@
158158
href: notification-hubs-baidu-china-android-notifications-get-started.md
159159
- name: Use APNS VOIP through Notification Hubs
160160
href: voip-apns.md
161-
- name: Enable diagnostic logs for Notification Hubs
161+
- name: Monitor
162+
href: monitor-notification-hubs.md
163+
- name: Enable diagnostic logs
162164
href: notification-hubs-diagnostic-logs.md
163165
- name: Reference
164166
items:
@@ -172,6 +174,8 @@
172174
href: /rest/api/notificationhubs/
173175
- name: Resource Manager template
174176
href: /azure/templates/microsoft.notificationhubs/allversions
177+
- name: Monitoring data reference
178+
href: monitor-notification-hubs-reference.md
175179
- name: Resources
176180
items:
177181
- name: FAQ
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: Monitoring data reference for Azure Notification Hubs
3+
description: This article contains important reference material you need when you monitor Azure Notification Hubs.
4+
ms.date: 03/21/2024
5+
ms.custom: horz-monitor
6+
ms.topic: reference
7+
author: sethmanheim
8+
ms.author: sethm
9+
ms.service: notification-hubs
10+
---
11+
12+
# Azure Notification Hubs monitoring data reference
13+
14+
[!INCLUDE [horz-monitor-ref-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-intro.md)]
15+
16+
See [Monitor Notification Hubs](monitor-notification-hubs.md) for details on the data you can collect for Azure Notification Hubs and how to use it.
17+
18+
[!INCLUDE [horz-monitor-ref-metrics-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-intro.md)]
19+
20+
### Supported metrics for Microsoft.NotificationHubs/namespaces/notificationHubs
21+
The following table lists the metrics available for the Microsoft.NotificationHubs/namespaces/notificationHubs resource type.
22+
[!INCLUDE [horz-monitor-ref-metrics-tableheader](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-tableheader.md)]
23+
[!INCLUDE [Microsoft.NotificationHubs/namespaces/notificationHubs](~/azure-reference-other-repo/azure-monitor-ref/supported-metrics/includes/microsoft-notificationhubs-namespaces-notificationhubs-metrics-include.md)]
24+
25+
[!INCLUDE [horz-monitor-ref-metrics-dimensions-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-dimensions-intro.md)]
26+
27+
[!INCLUDE [horz-monitor-ref-no-metrics-dimensions](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-no-metrics-dimensions.md)]
28+
29+
[!INCLUDE [horz-monitor-ref-resource-logs](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-resource-logs.md)]
30+
31+
### Supported resource logs for Microsoft.NotificationHubs/namespaces
32+
[!INCLUDE [Microsoft.NotificationHubs/namespaces](~/azure-reference-other-repo/azure-monitor-ref/supported-logs/includes/microsoft-notificationhubs-namespaces-logs-include.md)]
33+
34+
### Supported resource logs for Microsoft.NotificationHubs/namespaces/notificationHubs
35+
[!INCLUDE [Microsoft.NotificationHubs/namespaces/notificationHubs](~/azure-reference-other-repo/azure-monitor-ref/supported-logs/includes/microsoft-notificationhubs-namespaces-notificationhubs-logs-include.md)]
36+
37+
[!INCLUDE [horz-monitor-ref-logs-tables](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-logs-tables.md)]
38+
<!-- No table(s) at https://learn.microsoft.com/azure/azure-monitor/reference/tables/tables-resourcetype. -->
39+
40+
Azure Notification Hubs supports operational logs, which capture management operations that are performed on the Notification Hubs namespace. All logs are stored in JavaScript Object Notation (JSON) format in the following two locations:
41+
42+
- **AzureActivity**: Displays logs from operations and actions that are conducted against the namespace in the Azure portal or through Azure Resource Manager template deployments.
43+
- **AzureDiagnostics**: Displays logs from operations and actions that are conducted against the namespace by using the API, or through management clients on the language SDK.
44+
45+
Diagnostic log JSON strings include the elements listed in the following table:
46+
47+
| Name | Description |
48+
| ------- | ------- |
49+
| time | UTC timestamp of the log |
50+
| resourceId | Relative path to the Azure resource |
51+
| operationName | Name of the management operation |
52+
| category | Log category. Valid values: `OperationalLogs` |
53+
| callerIdentity | Identity of the caller who initiated the management operation |
54+
| resultType | Status of the management operation. Valid values: `Succeeded` or `Failed` |
55+
| resultDescription | Description of the management operation |
56+
| correlationId | Correlation ID of the management operation (if specified) |
57+
| callerIpAddress | The caller IP address. Empty for calls that originated from the Azure portal |
58+
59+
[!INCLUDE [horz-monitor-ref-activity-log](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-activity-log.md)]
60+
61+
Operational logs capture all management operations that are performed on the Azure Notification Hubs namespace. Data operations aren't captured, because of the high volume of data operations that are conducted on notification hubs.
62+
63+
[Microsoft.NotificationHubs resource provider operations](/azure/role-based-access-control/permissions/integration#microsoftnotificationhubs) lists all the management operations that are captured in operational logs.
64+
65+
## Related content
66+
67+
- See [Monitor Notification Hubs](monitor-notification-hubs.md) for a description of monitoring Notification Hubs.
68+
- See [Monitor Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) for details on monitoring Azure resources.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: Monitor Azure Notification Hubs
3+
description: Start here to learn how to monitor Azure Notification Hubs.
4+
ms.date: 03/21/2024
5+
ms.custom: horz-monitor
6+
ms.topic: conceptual
7+
author: sethmanheim
8+
ms.author: sethm
9+
ms.service: notification-hubs
10+
---
11+
12+
# Monitor Azure Notification Hubs
13+
14+
<!-- Intro. Required. -->
15+
[!INCLUDE [horz-monitor-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-intro.md)]
16+
17+
[!INCLUDE [horz-monitor-resource-types](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-types.md)]
18+
For more information about the resource types for Azure Notification Hubs, see [Notification Hubs monitoring data reference](monitor-notification-hubs-reference.md).
19+
20+
[!INCLUDE [horz-monitor-data-storage](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-data-storage.md)]
21+
22+
[!INCLUDE [horz-monitor-platform-metrics](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-platform-metrics.md)]
23+
24+
For a list of available metrics for Notification Hubs, see [Notification Hubs monitoring data reference](monitor-notification-hubs-reference.md#metrics).
25+
26+
[!INCLUDE [horz-monitor-resource-logs](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-logs.md)]
27+
28+
### Notification Hubs logs
29+
30+
Notification Hubs supports activity and operational logs, which capture management operations that are performed on the Notification Hubs namespace. Data operations aren't captured, because of the high volume of data operations that are conducted on notification hubs.
31+
32+
You can archive the diagnostic logs to a storage account or stream them to an event hub. Sending the logs to a Log Analytics workspace isn't currently supported.
33+
34+
- For more information about the logs and instructions for enabling log collection, see [Enable diagnostics logs for Notification Hubs](notification-hubs-diagnostic-logs.md).
35+
36+
- For the available resource log categories, associated Log Analytics tables, and the management operations captured in operational logs, see [Notification Hubs monitoring data reference](monitor-notification-hubs-reference.md#resource-logs).
37+
38+
[!INCLUDE [horz-monitor-activity-log](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-activity-log.md)]
39+
40+
## Azure Notification Hubs REST APIs
41+
42+
The [Notification Hubs REST APIs](/rest/api/notificationhubs) fall into the following categories:
43+
44+
- **Azure Resource Manager:** APIs that perform Resource Manager operations, and have `/providers/Microsoft.NotificationHubs/` as part of the request URI.
45+
- **Notification Hubs service:** APIs that enable operations directly on the Notification Hubs service, and have `<namespaceName>.servicebus.windows.net/` in the request URI.
46+
47+
The [Get notification message telemetry](/rest/api/notificationhubs/get-notification-message-telemetry) API helps monitor push notifications sent from a hub by providing telemetry on the finished states of outgoing push notifications. The Notification ID that this API uses can be retrieved from the HTTP Location header included in the response of the REST API used to send the notification.
48+
49+
[!INCLUDE [horz-monitor-analyze-data](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-analyze-data.md)]
50+
51+
[!INCLUDE [horz-monitor-external-tools](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-external-tools.md)]
52+
53+
[!INCLUDE [horz-monitor-kusto-queries](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-kusto-queries.md)]
54+
55+
### Sample Kusto queries
56+
57+
Failed operations:
58+
59+
```kusto
60+
// List all reports of failed operations over the past hour.
61+
AzureActivity
62+
| where TimeGenerated > ago(1h)
63+
| where ActivityStatus == "Failed"
64+
```
65+
66+
Errors:
67+
68+
```kusto
69+
// List all the errors for the past 7 days.
70+
AzureDiagnostics
71+
| where TimeGenerated > ago(7d)
72+
| where ResourceProvider =="MICROSOFT.NOTIFICATIONHUBS"
73+
| where Category == "OperationalLogs"
74+
| summarize count() by "EventName", _ResourceId
75+
```
76+
77+
[!INCLUDE [horz-monitor-alerts](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-alerts.md)]
78+
79+
### Notification Hubs alert rules
80+
81+
The following table lists some suggested alert rules for Notification Hubs. These alerts are just examples. You can set alerts for any metric, log entry, or activity log entry that's listed in the [Notification Hubs monitoring data reference](monitor-notification-hubs-reference.md).
82+
83+
| Alert type | Condition | Description |
84+
|:---|:---|:---|
85+
| Platform metric | Payload Errors | Whenever the count of pushes that failed because the push notification service (PNS) returned a bad payload error is greater than a dynamic threshold |
86+
| Activity log | Delete Namespace (Namespace) | Whenever the Activity Log has an event with Category='Administrative', Signal name='Delete Namespace (Namespace)' |
87+
88+
[!INCLUDE [horz-monitor-advisor-recommendations](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-advisor-recommendations.md)]
89+
90+
## Related content
91+
92+
- See [Notification Hubs monitoring data reference](monitor-notification-hubs-reference.md) for a reference of the metrics, logs, and other important values created for Notification Hubs.
93+
- See [Enable diagnostics logs for Notification Hubs](notification-hubs-diagnostic-logs.md) for information about diagnostic logs for Notification Hubs and how to enable them.
94+
- See [Get notification message telemetry](/rest/api/notificationhubs/get-notification-message-telemetry) for information about using the API to monitor push notification success.
95+
- See [Monitoring Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) for general details on monitoring Azure resources.

articles/notification-hubs/notification-hubs-diagnostic-logs.md

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: Azure Notification Hubs diagnostics logs | Microsoft Docs
3-
description: This article provides an overview of all the operational and diagnostics logs that are available for Azure Notification Hubs.
3+
description: Learn about the operational and diagnostics logs that are available for Azure Notification Hubs, and how to enable diagnostic logging.
44
author: sethmanheim
55
ms.author: sethm
66
ms.service: notification-hubs
77
ms.topic: article
8-
ms.date: 10/23/2023
8+
ms.date: 03/12/2024
99
---
1010

1111
# Enable diagnostics logs for Notification Hubs
@@ -61,7 +61,7 @@ For calls originating from the Azure portal the `identity` field is empty. The l
6161
}
6262
```
6363

64-
For calls made through Azure Resource Manager the `identity` field will contain the username of the logged in user.
64+
For calls made through Azure Resource Manager the `identity` field contains the username of the logged in user.
6565

6666
```json
6767
{
@@ -70,7 +70,7 @@ For calls made through Azure Resource Manager the `identity` field will contain
7070
}
7171
```
7272

73-
For calls to the Notification Hubs REST API the `identity` field will contain the name of the access policy used to generate the SharedAccessSignature token.
73+
For calls to the Notification Hubs REST API the `identity` field contains the name of the access policy used to generate the SharedAccessSignature token.
7474

7575
```json
7676
{
@@ -81,41 +81,19 @@ For calls to the Notification Hubs REST API the `identity` field will contain th
8181

8282
## Events and operations captured in operational logs
8383

84-
Operational logs capture all management operations that are performed on the Azure Notification Hubs namespace. Data operations are not captured, because of the high volume of data operations that are conducted on Azure Notification Hubs.
85-
86-
The following management operations are captured in operational logs:
87-
88-
| Scope | Operation Name | Operation Description |
89-
| :-- | :-- | :-- |
90-
| Namespace | Microsoft.NotificationHubs/Namespaces/authorizationRules/action | List Authorization Rules |
91-
| Namespace | Microsoft.NotificationHubs/Namespaces/authorizationRules/delete | Delete Authorization Rule |
92-
| Namespace | Microsoft.NotificationHubs/Namespaces/authorizationRules/listkeys/action | List Keys |
93-
| Namespace | Microsoft.NotificationHubs/Namespaces/authorizationRules/read | Get Authorization Rule |
94-
| Namespace | Microsoft.NotificationHubs/Namespaces/authorizationRules/regenerateKeys/action | Regenerate Keys |
95-
| Namespace | Microsoft.NotificationHubs/Namespaces/authorizationRules/write | Create or Update Authorization Rule |
96-
| Namespace | Microsoft.NotificationHubs/Namespaces/delete | Delete Namespace |
97-
| Namespace | Microsoft.NotificationHubs/Namespaces/read | Get Namespace |
98-
| Namespace | Microsoft.NotificationHubs/Namespaces/write | Create or Update Namespace |
99-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/action | List Authorization Rules |
100-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/delete | Delete Authorization Rule |
101-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/listkeys/action | List Keys |
102-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/read | Read Authorization Rule |
103-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/regenerateKeys/action | Regenerate Keys |
104-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/write | Create or Update Authorization Rule |
105-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/delete | Delete Notification Hub |
106-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/pnsCredentials/action | Create, Update, or Get PNS Credentials |
107-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/read | Get Notification Hub |
108-
| Notification Hub | Microsoft.NotificationHubs/Namespaces/NotificationHubs/write | Create or Update Notification Hub |
109-
110-
## Enable operational logs
84+
Operational logs capture all management operations that are performed on the Azure Notification Hubs namespace. Data operations aren't captured, because of the high volume of data operations that are conducted on notification hubs.
85+
86+
For a list of the management operations that are captured in operational logs, see [Microsoft.NotificationHubs resource provider operations](/azure/role-based-access-control/permissions/integration#microsoftnotificationhubs).
87+
88+
### Enable operational logs
11189

11290
Operational logs are disabled by default. To enable logs, do the following:
11391

11492
1. In the [Azure portal](https://portal.azure.com), go to your Azure Notification Hubs namespace and then, under **Monitoring**, select **Diagnostic settings**.
11593

11694
![The "Diagnostic settings" link](./media/notification-hubs-diagnostic-logs/image-1.png)
11795

118-
1. In the **Diagnostics settings** pane, select **Add diagnostic setting**.
96+
1. In the **Diagnostics settings** pane, select **Add diagnostic setting**.
11997

12098
![The "Add diagnostic setting" link](./media/notification-hubs-diagnostic-logs/image-2.png)
12199

@@ -138,7 +116,7 @@ Operational logs are disabled by default. To enable logs, do the following:
138116

139117
The new settings take effect in about 10 minutes. The logs are displayed in the configured archival target, in the **Diagnostics logs** pane.
140118

141-
## Next steps
119+
## Related content
142120

143121
To learn more about configuring diagnostics settings, see:
144122
* [Overview of Azure diagnostics logs](../azure-monitor/essentials/platform-logs-overview.md).

0 commit comments

Comments
 (0)