Skip to content

Commit 9877307

Browse files
authored
Merge pull request #92149 from axisc/aschhab_operational_and_diagnostic_logs
Updating Operational log documentation
2 parents a1a3786 + 2a2b28b commit 9877307

File tree

4 files changed

+66
-45
lines changed

4 files changed

+66
-45
lines changed
3.61 KB
Loading
7.6 KB
Loading
6.16 KB
Loading

articles/service-bus-messaging/service-bus-diagnostic-logs.md

Lines changed: 66 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,59 +18,32 @@ ms.date: 01/23/2019
1818
ms.author: aschhab
1919

2020
---
21-
# Service Bus diagnostic logs
21+
# Enable diagnostic logs for Service Bus
2222

23-
You can view two types of logs for Azure Service Bus:
24-
* **[Activity logs](../azure-monitor/platform/activity-logs-overview.md)**. These logs contain information about operations performed on a job. The logs are always enabled.
25-
* **[Diagnostic logs](../azure-monitor/platform/resource-logs-overview.md)**. You can configure diagnostic logs for richer information about everything that happens within a job. Diagnostic logs cover activities from the time the job is created until the job is deleted, including updates and activities that occur while the job is running.
23+
When you start using your Azure Service Bus namespace, you may want to monitor how and when your namespace is created, deleted or accessed. This article provides an overview of all the operational/diagnostic logs that are available.
2624

27-
## Turn on diagnostic logs
28-
29-
Diagnostics logs are disabled by default. To enable diagnostic logs, perform the following steps:
30-
31-
1. In the [Azure portal](https://portal.azure.com), under **Monitoring + Management**, click **Diagnostics logs**.
32-
33-
![blade navigation to diagnostic logs](./media/service-bus-diagnostic-logs/image1.png)
34-
35-
2. Click the resource you want to monitor.
36-
37-
3. Click **Turn on diagnostics**.
38-
39-
![turn on diagnostic logs](./media/service-bus-diagnostic-logs/image2.png)
40-
41-
4. For **Status**, click **On**.
42-
43-
![change status diagnostic logs](./media/service-bus-diagnostic-logs/image3.png)
44-
45-
5. Set the archive target that you want; for example, a storage account, an event hub, or Azure Monitor logs.
46-
47-
6. Save the new diagnostics settings.
48-
49-
New settings take effect in about 10 minutes. After that, logs appear in the configured archival target, on the **Diagnostics logs** blade.
50-
51-
For more information about configuring diagnostics, see the [overview of Azure diagnostic logs](../azure-monitor/platform/resource-logs-overview.md).
52-
53-
## Diagnostic logs schema
54-
55-
All logs are stored in JavaScript Object Notation (JSON) format. Each entry has string fields that use the format described in the following section.
25+
Azure Service Bus currently supports activity/operational logs which capture **management operations** performed on the Azure Service Bus namespace. Specifically, these logs capture the operation type, including queue creation, resources used, and the status of the operation.
5626

5727
## Operational logs schema
5828

59-
Logs in the **OperationalLogs** category capture what happens during Service Bus operations. Specifically, these logs capture the operation type, including queue creation, resources used, and the status of the operation.
29+
All logs are stored in JavaScript Object Notation (JSON) format in the below 2 locations.
30+
31+
- **AzureActivity** - displays logs from operations/actions conducted against your namespace on the portal or through Azure Resource Manager template deployments.
32+
- **AzureDiagnostics** - displays logs from operations/actions conducted against your namespace using the API, or through management clients on the language SDK.
6033

6134
Operational log JSON strings include elements listed in the following table:
6235

63-
Name | Description
64-
------- | -------
65-
ActivityId | Internal ID, used for tracking
66-
EventName | Operation name
67-
resourceId | Azure Resource Manager resource ID
68-
SubscriptionId | Subscription ID
69-
EventTimeString | Operation time
70-
EventProperties | Operation properties
71-
Status | Operation status
72-
Caller | Caller of operation (Azure portal or management client)
73-
category | OperationalLogs
36+
| Name | Description |
37+
| ------- | ------- |
38+
| ActivityId | Internal ID, used to identify the specified activity |
39+
| EventName | Operation name |
40+
| ResourceId | Azure Resource Manager resource ID |
41+
| SubscriptionId | Subscription ID |
42+
| EventTimeString | Operation time |
43+
| EventProperties | Operation properties |
44+
| Status | Operation status |
45+
| Caller | Caller of operation (Azure portal or management client) |
46+
| Category | OperationalLogs |
7447

7548
Here's an example of an operational log JSON string:
7649

@@ -88,6 +61,54 @@ Here's an example of an operational log JSON string:
8861
}
8962
```
9063

64+
## What events/operations are captured in operational logs?
65+
66+
Operation logs capture all management operations performed on the Azure Service Bus namespace. Data operations are not captured because of the high volume of data operations that are conducted on Azure Service Bus.
67+
68+
> [!NOTE]
69+
> To better track data operations, we recommend using client side tracing.
70+
71+
The below management operations are captured in operational logs -
72+
73+
| Scope | Operation|
74+
|-------| -------- |
75+
| Namespace | <ul> <li> Create Namespace</li> <li> Update Namespace </li> <li> Delete Namespace </li> </ul> |
76+
| Queue | <ul> <li> Create Queue</li> <li> Update Queue</li> <li> Delete Queue </li> </ul> |
77+
| Topic | <ul> <li> Create Topic </li> <li> Update Topic </li> <li> Delete Topic </li> </ul> |
78+
| Subscription | <ul> <li> Create Subscription </li> <li> Update Subscription </li> <li> Delete Subscription </li> </ul> |
79+
80+
> [!NOTE]
81+
> Currently, **Read** operations are not tracked in the operational logs.
82+
83+
## How to enable operational logs?
84+
85+
Operational logs are disabled by default. To enable diagnostic logs, perform the following steps:
86+
87+
1. In the [Azure portal](https://portal.azure.com), navigate to your Azure Service Bus namespace and under **Monitoring**, click **Diagnostics settings**.
88+
89+
![blade navigation to diagnostic logs](./media/service-bus-diagnostic-logs/image1.png)
90+
91+
2. Click **Add diagnostic setting** to configure the diagnostic settings.
92+
93+
![turn on diagnostic logs](./media/service-bus-diagnostic-logs/image2.png)
94+
95+
3. Configure the diagnostic settings
96+
1. Type a **name** to identify the diagnostic settings.
97+
2. Pick a destination for the diagnostics.
98+
- If you pick **Storage account**, you need to configure the storage account where the diagnostics will be stored.
99+
- If you pick **Event hubs**, you need to configure the appropriate Event Hub where the diagnostics settings will be streamed to.
100+
- If you pick **Log Analytics**, you need to specify which instance of Log Analytics the diagnostics will be sent.
101+
3. Check **OperationalLogs**.
102+
103+
![change status diagnostic logs](./media/service-bus-diagnostic-logs/image3.png)
104+
105+
4. Click **Save**.
106+
107+
108+
New settings take effect in about 10 minutes. After that, logs appear in the configured archival target, on the **Diagnostics logs** blade.
109+
110+
For more information about configuring diagnostics, see the [overview of Azure diagnostic logs](../azure-monitor/platform/diagnostic-logs-overview.md).
111+
91112
## Next steps
92113

93114
See the following links to learn more about Service Bus:

0 commit comments

Comments
 (0)