Skip to content

Commit 62ed11f

Browse files
Merge pull request #225455 from TomilolaAbiodun/patch-1
Update how-to-monitor-with-azure-monitor.md
2 parents d65ad2d + c201f5e commit 62ed11f

11 files changed

+36
-79
lines changed

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

Lines changed: 36 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Microsoft Purview admins can use Azure Monitor to track the operational state of
1818

1919
## Aggregated metrics
2020

21-
The metrics can be accessed from the Azure portal for a Microsoft Purview account. Access to the metrics are controlled by the role assignment of Microsoft Purview account. Users need to be part of the "Monitoring Reader" role in Microsoft Purview to see the metrics. Check out [Monitoring Reader Role permissions](../azure-monitor/roles-permissions-security.md#built-in-monitoring-roles) to learn more about the roles access levels.
21+
The metrics can be accessed from the Azure portal for a Microsoft Purview account. Access to the metrics is controlled by the role assignment of Microsoft Purview account. Users need to be part of the "Monitoring Reader" role in Microsoft Purview to see the metrics. Check out [Monitoring Reader Role permissions](../azure-monitor/roles-permissions-security.md#built-in-monitoring-roles) to learn more about the roles access levels.
2222

2323
The person who created the Microsoft Purview account automatically gets permissions to view metrics. If anyone else wants to see metrics, add them to the **Monitoring Reader** role, by following these steps:
2424

@@ -67,90 +67,47 @@ The following table contains the list of metrics available to explore in the Azu
6767
| Scan Failed | Automated scan | Sum <br> Count | Aggregate the failed data source scans over time period |
6868
| Scan time taken | Automated scan | Min <br> Max <br> Sum <br> Avg | Aggregate the total time taken by scans over time period |
6969

70-
## Diagnostic Logs to Azure Storage account
70+
## Sending Diagnostic Logs
7171

72-
Raw telemetry events are emitted to Azure Monitor. Events can be logged to a customer storage account of choice 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 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.
7373

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

76-
1. 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). Select the destination only as Azure storage account.
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).
7777

7878
:::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":::
7979

80-
2. Log the events to a storage account. 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).
81-
82-
:::image type="content" source="./media/how-to-monitor-with-azure-monitor/step-two-diagnostic-setting.png" alt-text="Screenshot showing assigning storage account for diagnostic log." lightbox="./media/how-to-monitor-with-azure-monitor/step-two-diagnostic-setting.png":::
83-
84-
Allow up to 15 minutes to start receiving logs in the newly created storage account. [See data retention and schema of resource logs in Azure Storage account](../azure-monitor/essentials/resource-logs.md#send-to-azure-storage). Once the diagnostic logs are configured, the events flow to the storage account.
85-
86-
### ScanStatusLogEvent
87-
88-
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.
89-
90-
```JSON
91-
{
92-
"time": "<The UTC time when the event occurred>",
93-
"properties": {
94-
"dataSourceName": "<Registered data source friendly name>",
95-
"dataSourceType": "<Registered data source type>",
96-
"scanName": "<Scan instance friendly name>",
97-
"assetsDiscovered": "<If the resultType is succeeded, count of assets discovered in scan run>",
98-
"assetsClassified": "<If the resultType is succeeded, count of assets classified in scan run>",
99-
"scanQueueTimeInSeconds": "<If the resultType is succeeded, total seconds the scan instance in queue>",
100-
"scanTotalRunTimeInSeconds": "<If the resultType is succeeded, total seconds the scan took to run>",
101-
"runType": "<How the scan is triggered>",
102-
"errorDetails": "<Scan failure error>",
103-
"scanResultId": "<Unique GUID for the scan instance>"
104-
},
105-
"resourceId": "<The azure resource identifier>",
106-
"category": "<The diagnostic log category>",
107-
"operationName": "<The operation that cause the event Possible values for ScanStatusLogEvent category are:
108-
|AdhocScanRun
109-
|TriggeredScanRun
110-
|StatusChangeNotification>",
111-
"resultType": "Queued – indicates a scan is queued.
112-
Running – indicates a scan entered a running state.
113-
Succeeded – indicates a scan completed successfully.
114-
Failed – indicates a scan failure event.
115-
Cancelled – indicates a scan was cancelled. ",
116-
"resultSignature": "<Not used for ScanStatusLogEvent category. >",
117-
"resultDescription": "<This will have an error message if the resultType is Failed. >",
118-
"durationMs": "<Not used for ScanStatusLogEvent category. >",
119-
"level": "<The log severity level. Possible values are:
120-
|Informational
121-
|Error >",
122-
"location": "<The location of the Microsoft Purview account>",
123-
}
124-
```
125-
126-
The Sample log for an event instance is shown in the below section.
127-
128-
```JSON
129-
{
130-
"time": "2020-11-24T20:25:13.022860553Z",
131-
"properties": {
132-
"dataSourceName": "AzureDataExplorer-swD",
133-
"dataSourceType": "AzureDataExplorer",
134-
"scanName": "Scan-Kzw-shoebox-test",
135-
"assetsDiscovered": "0",
136-
"assetsClassified": "0",
137-
"scanQueueTimeInSeconds": "0",
138-
"scanTotalRunTimeInSeconds": "0",
139-
"runType": "Manual",
140-
"errorDetails": "empty_value",
141-
"scanResultId": "0dc51a72-4156-40e3-8539-b5728394561f"
142-
},
143-
"resourceId": "/SUBSCRIPTIONS/111111111111-111-4EB2/RESOURCEGROUPS/FOOBAR-TEST-RG/PROVIDERS/MICROSOFT.PURVIEW/ACCOUNTS/FOOBAR-HEY-TEST-NEW-MANIFEST-EUS",
144-
"category": "ScanStatusLogEvent",
145-
"operationName": "TriggeredScanRun",
146-
"resultType": "Delayed",
147-
"resultSignature": "empty_value",
148-
"resultDescription": "empty_value",
149-
"durationMs": 0,
150-
"level": "Informational",
151-
"location": "eastus",
152-
}
153-
```
80+
You can send your logs to:
81+
- [A log analytics workspace](#destination---log-analytics-workspace)
82+
- [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":::
109+
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":::
154111

155112
## Next steps
156113

94.3 KB
Loading
175 KB
Loading
203 KB
Loading
320 KB
Loading
257 KB
Loading
173 KB
Loading
149 KB
Loading
117 KB
Loading
242 KB
Loading

0 commit comments

Comments
 (0)