You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. For general information about monitoring Azure Analysis Services, see [Monitor Azure Analysis Services](monitor-analysis-services.md).
16
+
17
+
This article describes how to set up, view, and manage [Azure Monitor resource logs](/azure/azure-monitor/essentials/platform-logs-overview) for your Analysis Services servers. You can send resource 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/azure-monitor/overview).
16
18
17
19

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
25
+
You can select **Engine**, **Service**, and **Metrics** log categories. For a listing of what's logged for each category, see [Supported resource logs for Microsoft.AnalysisServices/servers](monitor-analysis-services-reference.md#supported-resource-logs-for-microsoftanalysisservicesservers).
26
+
27
+
## Set up diagnostics logging
68
28
69
29
### Azure portal
70
30
@@ -76,9 +36,9 @@ The Metrics category logs the same [Server metrics](analysis-services-monitor.md
76
36
77
37
***Name**. Enter a name for the logs to create.
78
38
79
-
***Archive to a storage account**. To use this option, you need an existing storage account to connect to. See [Create a storage account](../storage/common/storage-account-create.md). Follow the instructions to create a Resource Manager, general-purpose account, then select your storage account by returning to this page in the portal. It may take a few minutes for newly created storage accounts to appear in the drop-down menu.
80
-
***Stream to an event hub**. To use this option, you need an existing Event Hub namespace and event hub to connect to. To learn more, see [Create an Event Hubs namespace and an event hub using the Azure portal](../event-hubs/event-hubs-create.md). Then return to this page in the portal to select the Event Hub namespace and policy name.
81
-
***Send to Azure Monitor (Log Analytics workspace)**. To use this option, either use an existing workspace or [create a new workspace](../azure-monitor/logs/quick-create-workspace.md) resource in the portal. For more information on viewing your logs, see [View logs in Log Analytics workspace](#view-logs-in-log-analytics-workspace) in this article.
39
+
***Archive to a storage account**. To use this option, you need an existing storage account to connect to. See [Create a storage account](/azure/storage/common/storage-account-create). Follow the instructions to create a Resource Manager, general-purpose account, then select your storage account by returning to this page in the portal. It may take a few minutes for newly created storage accounts to appear in the drop-down menu.
40
+
***Stream to an event hub**. To use this option, you need an existing Event Hub namespace and event hub to connect to. To learn more, see [Create an Event Hubs namespace and an event hub using the Azure portal](/azure/event-hubs/event-hubs-create). Then return to this page in the portal to select the Event Hub namespace and policy name.
41
+
***Send to Azure Monitor (Log Analytics workspace)**. To use this option, either use an existing workspace or [create a new workspace](/azure/azure-monitor/logs/quick-create-workspace) resource in the portal. For more information on viewing your logs, see [View logs in Log Analytics workspace](#view-logs-in-log-analytics-workspace) in this article.
82
42
83
43
***Engine**. Select this option to log xEvents. If you're archiving to a storage account, you can select the retention period for the resource logs. Logs are autodeleted after the retention period expires.
84
44
***Service**. Select this option to log service level events. If you are archiving to a storage account, you can select the retention period for the resource logs. Logs are autodeleted after the retention period expires.
@@ -148,64 +108,13 @@ Logs are typically available within a couple hours of setting up logging. It's u
148
108
149
109
## View logs in Log Analytics workspace
150
110
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
111
To view your diagnostic data, in Log Analytics workspace, open **Logs** from the left menu.
154
112
155
113

156
114
157
115
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
116
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
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"
| 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
-
117
+
For more queries you can use with Analysis Services, see [Sample Kusto queries](monitor-analysis-services.md#sample-kusto-queries).
209
118
210
119
## Turn on logging by using PowerShell
211
120
@@ -217,7 +126,7 @@ To complete this tutorial, you must have the following resources:
217
126
218
127
* An existing Azure Analysis Services server. For instructions on creating a server resource, see [Create a server in Azure portal](analysis-services-create-server.md), or [Create an Azure Analysis Services server by using PowerShell](analysis-services-create-powershell.md).
219
128
220
-
### </a>Connect to your subscriptions
129
+
### Connect to your subscriptions
221
130
222
131
Start an Azure PowerShell session and sign in to your Azure account with the following command:
0 commit comments