Skip to content

Commit 692fc51

Browse files
authored
Merge pull request #266595 from v-thepet/as-monitor
Azure Monitor horizontals - Azure Analysis Services
2 parents 4236ccf + 2d769db commit 692fc51

8 files changed

+277
-229
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,11 @@
980980
"redirect_url": "/analysis-services/tabular-models/compatibility-level-for-tabular-models-in-analysis-services",
981981
"redirect_document_id": false
982982
},
983+
{
984+
"source_path_from_root": "/articles/analysis-services/analysis-services-monitor.md",
985+
"redirect_url": "/azure/analysis-services/monitor-analysis-services",
986+
"redirect_document_id": false
987+
},
983988
{
984989
"source_path_from_root": "/articles/frontdoor/front-door-whats-new.md",
985990
"redirect_url": "https://azure.microsoft.com/updates/?category=networking\u0026query=Azure%20Front%20Door",

articles/analysis-services/TOC.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@
7070
href: analysis-services-vnet-gateway.md
7171
- name: Manage a server
7272
href: analysis-services-manage.md
73-
- name: Monitor server metrics
74-
href: analysis-services-monitor.md
75-
- name: Setup diagnostic logging
73+
- name: Monitor
74+
href: monitor-analysis-services.md
75+
- name: Set up diagnostic logging
7676
href: analysis-services-logging.md
7777
- name: Create service principal - Azure portal
7878
href: /entra/identity-platform/howto-create-service-principal-portal
@@ -124,6 +124,8 @@
124124
href: /analysis-services/tmsl/tabular-model-scripting-language-tmsl-reference?view=azure-analysis-services-current&preserve-view=true
125125
- name: Tabular Object Model (TOM)
126126
href: /analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo?view=azure-analysis-services-current&preserve-view=true
127+
- name: Monitoring data reference
128+
href: monitor-analysis-services-reference.md
127129
- name: Resource and object limits
128130
href: analysis-services-capacity-limits.md
129131
- name: Resources

articles/analysis-services/analysis-services-logging.md

Lines changed: 17 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,30 @@
11
---
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.
44
author: kfollis
55
ms.service: analysis-services
66
ms.topic: conceptual
7-
ms.date: 01/27/2023
7+
ms.date: 02/16/2024
88
ms.author: kfollis
99
ms.reviewer: minewiskan
1010
ms.custom: devx-track-azurepowershell
1111

1212
---
13-
# Setup diagnostic logging
13+
# Set up diagnostic logging
1414

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).
1618

1719
![Resource logging to Storage, Event Hubs, or Azure Monitor logs](./media/analysis-services-logging/aas-logging-overview.png)
1820

1921
[!INCLUDE [updated-for-az](../../includes/updated-for-az.md)]
2022

2123
## What's logged?
2224

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
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
6828

6929
### Azure portal
7030

@@ -76,9 +36,9 @@ The Metrics category logs the same [Server metrics](analysis-services-monitor.md
7636

7737
* **Name**. Enter a name for the logs to create.
7838

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.
8242

8343
* **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.
8444
* **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
148108

149109
## View logs in Log Analytics workspace
150110

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-
153111
To view your diagnostic data, in Log Analytics workspace, open **Logs** from the left menu.
154112

155113
![Screenshot showing log Search options in the Azure portal.](./media/analysis-services-logging/aas-logging-open-log-search.png)
156114

157115
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.
158116

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-
117+
For more queries you can use with Analysis Services, see [Sample Kusto queries](monitor-analysis-services.md#sample-kusto-queries).
209118

210119
## Turn on logging by using PowerShell
211120

@@ -217,7 +126,7 @@ To complete this tutorial, you must have the following resources:
217126

218127
* 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).
219128

220-
### </a>Connect to your subscriptions
129+
### Connect to your subscriptions
221130

222131
Start an Azure PowerShell session and sign in to your Azure account with the following command:
223132

@@ -323,6 +232,5 @@ Set-AzDiagnosticSetting -ResourceId $account.ResourceId`
323232

324233
## Next steps
325234

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.
235+
- Learn more about [Azure Monitor resource logging](/azure/azure-monitor/essentials/platform-logs-overview).
236+
- See [Set-AzDiagnosticSetting](/powershell/module/az.monitor/set-azdiagnosticsetting) in PowerShell help.

0 commit comments

Comments
 (0)