|
1 | 1 | ---
|
2 |
| -title: Learn about diagnostic logging for Azure Analysis Services | Microsoft Docs |
3 |
| -description: Describes how to setup up logging to monitoring your Azure Analysis Services server. |
| 2 | +title: Set up diagnostic logging for Azure Analysis Services | Microsoft Docs |
| 3 | +description: Describes how to set up logging to monitor your Azure Analysis Services server. |
4 | 4 | author: kfollis
|
5 | 5 | ms.service: analysis-services
|
6 | 6 | ms.topic: conceptual
|
7 |
| -ms.date: 01/27/2023 |
| 7 | +ms.date: 02/16/2024 |
8 | 8 | ms.author: kfollis
|
9 | 9 | ms.reviewer: minewiskan
|
10 | 10 | ms.custom: devx-track-azurepowershell
|
11 | 11 |
|
12 | 12 | ---
|
13 |
| -# Setup diagnostic logging |
| 13 | +# Set up diagnostic logging |
14 | 14 |
|
15 |
| -An important part of any Analysis Services solution is monitoring how your servers are performing. Azure Analysis services is integrated with Azure Monitor. With [Azure Monitor resource logs](../azure-monitor/essentials/platform-logs-overview.md), you can monitor and send logs to [Azure Storage](https://azure.microsoft.com/services/storage/), stream them to [Azure Event Hubs](https://azure.microsoft.com/services/event-hubs/), and export them to [Azure Monitor logs](../azure-monitor/overview.md). |
| 15 | +An important part of any Analysis Services solution is monitoring how your servers are performing. You can send [Azure Monitor resource logs](/azure/azure-monitor/essentials/platform-logs-overview) to [Azure Storage](https://azure.microsoft.com/services/storage/), stream them to [Azure Event Hubs](https://azure.microsoft.com/services/event-hubs/), and export them to [Azure Monitor logs](/azure/azure-monitor/overview). |
16 | 16 |
|
17 | 17 | 
|
18 | 18 |
|
19 | 19 | [!INCLUDE [updated-for-az](../../includes/updated-for-az.md)]
|
20 | 20 |
|
21 | 21 | ## What's logged?
|
22 | 22 |
|
23 |
| -You can select **Engine**, **Service**, and **Metrics** categories. |
24 |
| - |
25 |
| -### Engine |
26 |
| - |
27 |
| -Selecting **Engine** logs all [xEvents](/analysis-services/instances/monitor-analysis-services-with-sql-server-extended-events). You cannot select individual events. |
28 |
| - |
29 |
| -|XEvent categories |Event name | |
30 |
| -|---------|---------| |
31 |
| -|Security Audit | Audit Login | |
32 |
| -|Security Audit | Audit Logout | |
33 |
| -|Security Audit | Audit Server Starts And Stops | |
34 |
| -|Progress Reports | Progress Report Begin | |
35 |
| -|Progress Reports | Progress Report End | |
36 |
| -|Progress Reports | Progress Report Current | |
37 |
| -|Queries | Query Begin | |
38 |
| -|Queries | Query End | |
39 |
| -|Commands | Command Begin | |
40 |
| -|Commands | Command End | |
41 |
| -|Errors & Warnings | Error | |
42 |
| -|Discover | Discover End | |
43 |
| -|Notification | Notification | |
44 |
| -|Session | Session Initialize | |
45 |
| -|Locks | Deadlock | |
46 |
| -|Query Processing | VertiPaq SE Query Begin | |
47 |
| -|Query Processing | VertiPaq SE Query End | |
48 |
| -|Query Processing | VertiPaq SE Query Cache Match | |
49 |
| -|Query Processing | Direct Query Begin | |
50 |
| -|Query Processing | Direct Query End | |
51 |
| - |
52 |
| -### Service |
53 |
| - |
54 |
| -|Operation name |Occurs when | |
55 |
| -|---------|---------| |
56 |
| -|ResumeServer | Resume a server | |
57 |
| -|SuspendServer | Pause a server | |
58 |
| -|DeleteServer | Delete a server | |
59 |
| -|RestartServer | User restarts a server through SSMS or PowerShell | |
60 |
| -|GetServerLogFiles | User exports server log through PowerShell | |
61 |
| -|ExportModel | User exports a model in the portal by using Open in Visual Studio | |
62 |
| - |
63 |
| -### All metrics |
64 |
| - |
65 |
| -The Metrics category logs the same [Server metrics](analysis-services-monitor.md#server-metrics) to the AzureMetrics table. If you're using query [scale-out](analysis-services-scale-out.md) and need to separate metrics for each read replica, use the AzureDiagnostics table instead, where **OperationName** is equal to **LogMetric**. |
66 |
| - |
67 |
| -## Setup diagnostics logging |
| 23 | +You can select **Engine**, **Service**, and **Metrics** log categories. For a listing of what's logged for each category, see [Analysis Services resource log data](monitor-analysis-services.md#analysis-services-resource-log-data). |
| 24 | + |
| 25 | +## Set up diagnostics logging |
68 | 26 |
|
69 | 27 | ### Azure portal
|
70 | 28 |
|
@@ -146,66 +104,6 @@ Logs are typically available within a couple hours of setting up logging. It's u
|
146 | 104 | * Delete logs that you no longer want to keep in your storage account.
|
147 | 105 | * Be sure to set a retention period for so old logs are deleted from your storage account.
|
148 | 106 |
|
149 |
| -## View logs in Log Analytics workspace |
150 |
| - |
151 |
| -Metrics and server events are integrated with xEvents in your Log Analytics workspace resource for side-by-side analysis. Log Analytics workspace can also be configured to receive events from other Azure services providing a holistic view of diagnostic logging data across your architecture. |
152 |
| - |
153 |
| -To view your diagnostic data, in Log Analytics workspace, open **Logs** from the left menu. |
154 |
| - |
155 |
| - |
156 |
| - |
157 |
| -In the query builder, expand **LogManagement** > **AzureDiagnostics**. AzureDiagnostics includes Engine and Service events. Notice a query is created on-the-fly. The EventClass\_s field contains xEvent names, which may look familiar if you've used xEvents for on-premises logging. Click **EventClass\_s** or one of the event names and Log Analytics workspace continues constructing a query. Be sure to save your queries to reuse later. |
158 |
| - |
159 |
| -### Example queries |
160 |
| - |
161 |
| -#### Example 1 |
162 |
| - |
163 |
| -The following query returns durations for each query end/refresh end event for a model database and server. If scaled out, the results are broken out by replica because the replica number is included in ServerName_s. Grouping by RootActivityId_g reduces the row count retrieved from the Azure Diagnostics REST API and helps stay within the limits as described in Log Analytics Rate limits. |
164 |
| - |
165 |
| -```Kusto |
166 |
| -let window = AzureDiagnostics |
167 |
| - | where ResourceProvider == "MICROSOFT.ANALYSISSERVICES" and Resource =~ "MyServerName" and DatabaseName_s =~ "MyDatabaseName" ; |
168 |
| -window |
169 |
| -| where OperationName has "QueryEnd" or (OperationName has "CommandEnd" and EventSubclass_s == 38) |
170 |
| -| where extract(@"([^,]*)", 1,Duration_s, typeof(long)) > 0 |
171 |
| -| extend DurationMs=extract(@"([^,]*)", 1,Duration_s, typeof(long)) |
172 |
| -| project StartTime_t,EndTime_t,ServerName_s,OperationName,RootActivityId_g,TextData_s,DatabaseName_s,ApplicationName_s,Duration_s,EffectiveUsername_s,User_s,EventSubclass_s,DurationMs |
173 |
| -| order by StartTime_t asc |
174 |
| -``` |
175 |
| - |
176 |
| -#### Example 2 |
177 |
| - |
178 |
| -The following query returns memory and QPU consumption for a server. If scaled out, the results are broken out by replica because the replica number is included in ServerName_s. |
179 |
| - |
180 |
| -```Kusto |
181 |
| -let window = AzureDiagnostics |
182 |
| - | where ResourceProvider == "MICROSOFT.ANALYSISSERVICES" and Resource =~ "MyServerName"; |
183 |
| -window |
184 |
| -| where OperationName == "LogMetric" |
185 |
| -| where name_s == "memory_metric" or name_s == "qpu_metric" |
186 |
| -| project ServerName_s, TimeGenerated, name_s, value_s |
187 |
| -| summarize avg(todecimal(value_s)) by ServerName_s, name_s, bin(TimeGenerated, 1m) |
188 |
| -| order by TimeGenerated asc |
189 |
| -``` |
190 |
| - |
191 |
| -#### Example 3 |
192 |
| - |
193 |
| -The following query returns the Rows read/sec Analysis Services engine performance counters for a server. |
194 |
| - |
195 |
| -```Kusto |
196 |
| -let window = AzureDiagnostics |
197 |
| - | where ResourceProvider == "MICROSOFT.ANALYSISSERVICES" and Resource =~ "MyServerName"; |
198 |
| -window |
199 |
| -| where OperationName == "LogMetric" |
200 |
| -| where parse_json(tostring(parse_json(perfobject_s).counters))[0].name == "Rows read/sec" |
201 |
| -| extend Value = tostring(parse_json(tostring(parse_json(perfobject_s).counters))[0].value) |
202 |
| -| project ServerName_s, TimeGenerated, Value |
203 |
| -| summarize avg(todecimal(Value)) by ServerName_s, bin(TimeGenerated, 1m) |
204 |
| -| order by TimeGenerated asc |
205 |
| -``` |
206 |
| - |
207 |
| -There are hundreds of queries you can use. To learn more about queries, see [Get started with Azure Monitor log queries](../azure-monitor/logs/get-started-queries.md). |
208 |
| - |
209 | 107 |
|
210 | 108 | ## Turn on logging by using PowerShell
|
211 | 109 |
|
@@ -323,6 +221,5 @@ Set-AzDiagnosticSetting -ResourceId $account.ResourceId`
|
323 | 221 |
|
324 | 222 | ## Next steps
|
325 | 223 |
|
326 |
| -Learn more about [Azure Monitor resource logging](../azure-monitor/essentials/platform-logs-overview.md). |
327 |
| - |
328 |
| -See [Set-AzDiagnosticSetting](/powershell/module/az.monitor/set-azdiagnosticsetting) in PowerShell help. |
| 224 | +- Learn more about [Azure Monitor resource logging](/azure/azure-monitor/essentials/platform-logs-overview). |
| 225 | +- See [Set-AzDiagnosticSetting](/powershell/module/az.monitor/set-azdiagnosticsetting) in PowerShell help. |
0 commit comments