Skip to content

Commit 4e30c96

Browse files
committed
changes to notification hubs
1 parent 0024823 commit 4e30c96

File tree

3 files changed

+44
-13
lines changed

3 files changed

+44
-13
lines changed

articles/notification-hubs/monitor-notification-hubs-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The following table lists the metrics available for the Microsoft.NotificationHu
3737
[!INCLUDE [horz-monitor-ref-logs-tables](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-logs-tables.md)]
3838
<!-- No table(s) at https://learn.microsoft.com/azure/azure-monitor/reference/tables/tables-resourcetype. -->
3939

40-
Azure Notification Hubs supports activity and 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:
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:
4141

4242
- **AzureActivity**: Displays logs from operations and actions that are conducted against the namespace in the Azure portal or through Azure Resource Manager template deployments.
4343
- **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.
@@ -58,9 +58,9 @@ Diagnostic log JSON strings include the elements listed in the following table:
5858

5959
[!INCLUDE [horz-monitor-ref-activity-log](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-activity-log.md)]
6060

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. The following management operations are captured in operational logs:
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.
6262

63-
- [Microsoft.NotificationHubs resource provider operations](/azure/role-based-access-control/permissions/integration#microsoftnotificationhubs)
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.
6464

6565
## Related content
6666

articles/notification-hubs/monitor-notification-hubs.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,63 @@ For a list of available metrics for Notification Hubs, see [Notification Hubs mo
2525

2626
[!INCLUDE [horz-monitor-resource-logs](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-logs.md)]
2727

28-
Azure Notification Hubs supports activity and operational logs, which capture management operations that are performed on the Notification Hubs namespace.
28+
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.
2929

30-
- For details about where the logs are stored, the logs schema, and how to enable operational logs, see [Notification Hubs diagnostics logs](notification-hubs-diagnostic-logs.md).
30+
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 currently isn't supported.
31+
32+
- For more details about the logs and how to enable log collection, see [Enable diagnostics logs for Notification Hubs](notification-hubs-diagnostic-logs.md).
3133

3234
- 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).
3335

3436
[!INCLUDE [horz-monitor-activity-log](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-activity-log.md)]
3537

38+
## Azure Notification Hubs REST APIs telemetry
39+
40+
The [Notification Hubs REST APIs](/rest/api/notificationhubs) fall into the following categories:
41+
42+
- **Azure Resource Manager:** APIs that perform Resource Manager operations, and have `/providers/Microsoft.NotificationHubs/` as part of the request URI.
43+
- **Notification Hubs service:** APIs that enable operations directly on the Notification Hubs service, and have `<namespaceName>.servicebus.windows.net/` in the request URI.
44+
45+
The [Get notification message telemetry](/rest/api/notificationhubs/get-notification-message-telemetry) API helps monitor push notifications sent from a hub by providing more 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.
46+
3647
[!INCLUDE [horz-monitor-analyze-data](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-analyze-data.md)]
3748

3849
[!INCLUDE [horz-monitor-external-tools](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-external-tools.md)]
3950

4051
[!INCLUDE [horz-monitor-kusto-queries](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-kusto-queries.md)]
4152

42-
Add short information or links to specific articles that outline how to analyze data for your service. -->
53+
### Sample Kusto queries
54+
55+
Failed operations:
56+
57+
```kusto
58+
// List all reports of failed operations over the past hour.
59+
AzureActivity
60+
| where TimeGenerated > ago(1h)
61+
| where ActivityStatus == "Failed"
62+
```
63+
64+
Errors:
65+
66+
```kusto
67+
// List all the errors for the past 7 days.
68+
AzureDiagnostics
69+
| where TimeGenerated > ago(7d)
70+
| where ResourceProvider =="MICROSOFT.NOTIFICATIONHUBS"
71+
| where Category == "OperationalLogs"
72+
| summarize count() by "EventName", _ResourceId
73+
```
4374

4475
[!INCLUDE [horz-monitor-alerts](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-alerts.md)]
4576

4677
### Notification Hubs alert rules
4778

4879
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).
4980

50-
| Alert type | Condition | Description |
81+
| Alert type | Condition | Description |
5182
|:---|:---|:---|
52-
| | | |
53-
| | | |
83+
| 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 |
84+
| Activity log | Delete Namespace (Namespace) | Whenever the Activity Log has an event with Category='Administrative', Signal name='Delete Namespace (Namespace)' |
5485

5586
[!INCLUDE [horz-monitor-advisor-recommendations](~/articles/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-advisor-recommendations.md)]
5687

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

Lines changed: 4 additions & 4 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
@@ -83,7 +83,7 @@ For calls to the Notification Hubs REST API the `identity` field contains the na
8383

8484
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.
8585

86-
For a list of the management operations that are captured in operational logs, see [Activity log](monitor-notification-hubs-reference.md#activity-log).
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).
8787

8888
### Enable operational logs
8989

@@ -93,7 +93,7 @@ Operational logs are disabled by default. To enable logs, do the following:
9393

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

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

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

0 commit comments

Comments
 (0)