Skip to content

Commit 4e53553

Browse files
authored
Merge pull request #226437 from whhender/updates
Updates
2 parents 4df628e + 5f48f78 commit 4e53553

17 files changed

+110
-32
lines changed

articles/purview/how-to-monitor-with-azure-monitor.md

Lines changed: 110 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -69,45 +69,123 @@ The following table contains the list of metrics available to explore in the Azu
6969

7070
## Sending Diagnostic Logs
7171

72-
Raw telemetry events are emitted to Azure Monitor. Events can be sent to a Log Analytics Workspace, archived to a customer storage account of choice, streamed to an event hub or sent to a partner solution for further analysis. Exporting of logs is done via the Diagnostic settings for the Microsoft Purview account on the Azure portal.
72+
Raw telemetry events are sent to Azure Monitor. Events can be sent to a Log Analytics Workspace, archived to a customer storage account of choice, streamed to an event hub, or sent to a partner solution for further analysis. Exporting of logs is done via the Diagnostic settings for the Microsoft Purview account on the Azure portal.
7373

74-
Follow the steps to create a Diagnostic setting for your Microsoft Purview account and send to your preferred destination.
74+
Follow these steps to create a diagnostic setting for your Microsoft Purview account and send to your preferred destination:
7575

76-
Create a new diagnostic setting to collect platform logs and metrics by following this article: [Create diagnostic settings to send platform logs and metrics to different destinations](../azure-monitor/essentials/diagnostic-settings.md).
76+
1. Locate your Microsoft Purview account in the [Azure portal](https://portal.azure.com).
77+
1. In the menu under **Monitoring** select **Diagnostic settings**.
78+
1. Select **Add diagnostic setting** to create a new diagnostic setting to collect platform logs and metrics. For more information about these settings and logs, see [the Azure Monitor documentation.](../azure-monitor/essentials/diagnostic-settings.md).
7779

78-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-one-diagnostic-setting.png" alt-text="Screenshot showing creating diagnostic log." lightbox="./media/how-to-monitor-with-azure-monitor/step-one-diagnostic-setting.png":::
80+
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/create-diagnostic-setting.png" alt-text="Screenshot showing creating diagnostic log." lightbox="./media/how-to-monitor-with-azure-monitor/create-diagnostic-setting.png":::
81+
82+
1. You can send your logs to:
7983

80-
You can send your logs to:
8184
- [A log analytics workspace](#destination---log-analytics-workspace)
8285
- [A storage account](#destination---storage-account)
83-
84-
#### Destination - Log Analytics Workspace
85-
Select the destination to a log analytics workspace to send the event to. Create a name for the diagnostic setting, select the applicable log category group and select the right subscription and workspace, then click save. The workspace doesn't have to be in the same region as the resource being monitored. Follow this article to [Create a New Log Analytics Workspace](../azure-monitor/logs/quick-create-workspace.md).
86-
87-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-two-diagnostic-setting.png" alt-text="Screenshot showing assigning log analytics workspace to send event to." lightbox="./media/how-to-monitor-with-azure-monitor/step-two-diagnostic-setting.png":::
88-
89-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-two-one-diagnostic-setting.png" alt-text="Screenshot showing saved diagnostic log event to log analytics workspace." lightbox="./media/how-to-monitor-with-azure-monitor/step-two-one-diagnostic-setting.png":::
90-
91-
Verify the changes in **Log Analytics Workspace** by perfoming some operations to populate data such as creating/updating/deleting policy. After which you can open the **Log Analytics Workspace**, navigate to **Logs**, enter query filter as **"purviewsecuritylogs"**, then click **"Run"** to execute the query.
92-
93-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-two-two-diagnostic-setting.png" alt-text="Screenshot showing log results in the Log Analytics Workspace after a query was run." lightbox="./media/how-to-monitor-with-azure-monitor/step-two-two-diagnostic-setting.png":::
94-
95-
#### Destination - Storage account
96-
To log the events to a storage account; create a diagnostic setting name, select the log category,. select the destination as archieve to a storage account, select the right subscription and storage account then click save. A dedicated storage account is recommended for archiving the diagnostic logs. Following this article to [Create a storage account](../storage/common/storage-account-create.md?tabs=azure-portal).
97-
98-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-three-diagnostic-setting.png" alt-text="Screenshot showing assigning storage account for diagnostic log." lightbox="./media/how-to-monitor-with-azure-monitor/step-three-diagnostic-setting.png":::
99-
100-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-three-one-diagnostic-setting.png" alt-text="Screenshot showing saved log events to storage account." lightbox="./media/how-to-monitor-with-azure-monitor/step-three-one-diagnostic-setting.png":::
101-
102-
To see logs in the **Storage Account**, create/update/delete a policy, then open the **Storage Account**, navigate to **Containers**, and click on the container name
103-
104-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-three-two-diagnostic-setting.png" alt-text="Screenshot showing container in storage account where the diagnostic logs have been sent to." lightbox="./media/how-to-monitor-with-azure-monitor/step-three-two-diagnostic-setting.png":::
105-
106-
Navigate to the flie and download it to see the logs
107-
108-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-three-three-diagnostic-setting.png" alt-text="Screenshot showing folders with details of logs." lightbox="./media/how-to-monitor-with-azure-monitor/step-three-three-diagnostic-setting.png":::
10986

110-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-three-four-diagnostic-setting.png" alt-text="Screenshot showing details of logs." lightbox="./media/how-to-monitor-with-azure-monitor/step-three-four-diagnostic-setting.png":::
87+
### Destination - Log Analytics Workspace
88+
89+
1. In the **Destination details**, select **Send to Log Analytics workspace**.
90+
1. Create a name for the diagnostic setting, select the applicable log category group and select the right subscription and workspace, then select save. The workspace doesn't have to be in the same region as the resource being monitored. You to create a new workspace, you can follow this article: [Create a New Log Analytics Workspace](../azure-monitor/logs/quick-create-workspace.md).
91+
92+
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/log-analytics-diagnostic-setting.png" alt-text="Screenshot showing assigning log analytics workspace to send event to." lightbox="./media/how-to-monitor-with-azure-monitor/log-analytics-diagnostic-setting.png":::
93+
94+
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/log-analytics-select-workspace-diagnostic-setting.png" alt-text="Screenshot showing saved diagnostic log event to log analytics workspace." lightbox="./media/how-to-monitor-with-azure-monitor/log-analytics-select-workspace-diagnostic-setting.png":::
95+
96+
1. Verify the changes in your Log Analytics Workspace by performing some operations to populate data. For example, creating/updating/deleting a policy. After which you can open the **Log Analytics Workspace**, navigate to **Logs**, enter query filter as **"purviewsecuritylogs"**, then select **"Run"** to execute the query.
97+
98+
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/log-analytics-view-logs-diagnostic-setting.png" alt-text="Screenshot showing log results in the Log Analytics Workspace after a query was run." lightbox="./media/how-to-monitor-with-azure-monitor/log-analytics-view-logs-diagnostic-setting.png":::
99+
100+
### Destination - Storage account
101+
102+
1. In the **Destination details**, select **Archive to a storage account**.
103+
1. Create a diagnostic setting name, select the log category, select the destination as archive to a storage account, select the right subscription and storage account then select save. A dedicated storage account is recommended for archiving the diagnostic logs. If you need a storage account, you can follow this article: [Create a storage account](../storage/common/storage-account-create.md?tabs=azure-portal).
104+
105+
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/storage-diagnostic-setting.png" alt-text="Screenshot showing assigning storage account for diagnostic log." lightbox="./media/how-to-monitor-with-azure-monitor/storage-diagnostic-setting.png":::
106+
107+
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/storage-select-diagnostic-setting.png" alt-text="Screenshot showing saved log events to storage account." lightbox="./media/how-to-monitor-with-azure-monitor/storage-select-diagnostic-setting.png":::
108+
109+
1. To see logs in the **Storage Account**, perform a sample action (for example: create/update/delete a policy), then open the **Storage Account**, navigate to **Containers**, and select the container name.
110+
111+
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/storage-two-diagnostic-setting.png" alt-text="Screenshot showing container in storage account where the diagnostic logs have been sent to." lightbox="./media/how-to-monitor-with-azure-monitor/storage-two-diagnostic-setting.png":::
112+
113+
1. Navigate to the file and download it to see the logs.
114+
115+
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/storage-navigate-diagnostic-setting.png" alt-text="Screenshot showing folders with details of logs." lightbox="./media/how-to-monitor-with-azure-monitor/storage-navigate-diagnostic-setting.png":::
116+
117+
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/storage-select-logs-diagnostic-setting.png" alt-text="Screenshot showing details of logs." lightbox="./media/how-to-monitor-with-azure-monitor/storage-select-logs-diagnostic-setting.png":::
118+
119+
## Sample Log
120+
121+
Here's a sample log you'd receive from a diagnostic setting.
122+
123+
The event tracks the scan life cycle. A scan operation follows progress through a sequence of states, from Queued, Running and finally a terminal state of Succeeded | Failed | Canceled. An event is logged for each state transition and the schema of the event will have the following properties.
124+
125+
```JSON
126+
{
127+
"time": "<The UTC time when the event occurred>",
128+
"properties": {
129+
"dataSourceName": "<Registered data source friendly name>",
130+
"dataSourceType": "<Registered data source type>",
131+
"scanName": "<Scan instance friendly name>",
132+
"assetsDiscovered": "<If the resultType is succeeded, count of assets discovered in scan run>",
133+
"assetsClassified": "<If the resultType is succeeded, count of assets classified in scan run>",
134+
"scanQueueTimeInSeconds": "<If the resultType is succeeded, total seconds the scan instance in queue>",
135+
"scanTotalRunTimeInSeconds": "<If the resultType is succeeded, total seconds the scan took to run>",
136+
"runType": "<How the scan is triggered>",
137+
"errorDetails": "<Scan failure error>",
138+
"scanResultId": "<Unique GUID for the scan instance>"
139+
},
140+
"resourceId": "<The azure resource identifier>",
141+
"category": "<The diagnostic log category>",
142+
"operationName": "<The operation that cause the event Possible values for ScanStatusLogEvent category are:
143+
|AdhocScanRun
144+
|TriggeredScanRun
145+
|StatusChangeNotification>",
146+
"resultType": "Queued – indicates a scan is queued.
147+
Running – indicates a scan entered a running state.
148+
Succeeded – indicates a scan completed successfully.
149+
Failed – indicates a scan failure event.
150+
Cancelled – indicates a scan was cancelled. ",
151+
"resultSignature": "<Not used for ScanStatusLogEvent category. >",
152+
"resultDescription": "<This will have an error message if the resultType is Failed. >",
153+
"durationMs": "<Not used for ScanStatusLogEvent category. >",
154+
"level": "<The log severity level. Possible values are:
155+
|Informational
156+
|Error >",
157+
"location": "<The location of the Microsoft Purview account>",
158+
}
159+
```
160+
161+
The Sample log for an event instance is shown in the below section.
162+
163+
```JSON
164+
{
165+
"time": "2020-11-24T20:25:13.022860553Z",
166+
"properties": {
167+
"dataSourceName": "AzureDataExplorer-swD",
168+
"dataSourceType": "AzureDataExplorer",
169+
"scanName": "Scan-Kzw-shoebox-test",
170+
"assetsDiscovered": "0",
171+
"assetsClassified": "0",
172+
"scanQueueTimeInSeconds": "0",
173+
"scanTotalRunTimeInSeconds": "0",
174+
"runType": "Manual",
175+
"errorDetails": "empty_value",
176+
"scanResultId": "0dc51a72-4156-40e3-8539-b5728394561f"
177+
},
178+
"resourceId": "/SUBSCRIPTIONS/111111111111-111-4EB2/RESOURCEGROUPS/FOOBAR-TEST-RG/PROVIDERS/MICROSOFT.PURVIEW/ACCOUNTS/FOOBAR-HEY-TEST-NEW-MANIFEST-EUS",
179+
"category": "ScanStatusLogEvent",
180+
"operationName": "TriggeredScanRun",
181+
"resultType": "Delayed",
182+
"resultSignature": "empty_value",
183+
"resultDescription": "empty_value",
184+
"durationMs": 0,
185+
"level": "Informational",
186+
"location": "eastus",
187+
}
188+
```
111189

112190
## Next steps
113191

157 KB
Loading
226 KB
Loading
279 KB
Loading

0 commit comments

Comments
 (0)