Skip to content

Commit a32c61b

Browse files
authored
Merge pull request #24639 from MGoedtel/NewLAArticle1032017
New article
2 parents 95892ab + bb1e2c1 commit a32c61b

File tree

5 files changed

+69
-154
lines changed

5 files changed

+69
-154
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4159,6 +4159,11 @@
41594159
"source_path": "articles/log-analytics/log-analytics-system-update.md",
41604160
"redirect_url": "/azure/operations-management-suite/oms-solution-update-management",
41614161
"redirect_document_id": false
4162+
},
4163+
{
4164+
"source_path": "articles/log-analytics/log-analytics-get-started.md",
4165+
"redirect_url": "https://docs.microsoft.com/en-us/azure/log-analytics",
4166+
"redirect_document_id": false
41624167
},
41634168
{
41644169
"source_path": "articles/machine-learning/machine-learning-apps-text-analytics.md",

articles/hdinsight/hdinsight-hadoop-oms-log-analytics-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Log Analytics is a service in [Operations Management Suite (OMS)](../operations-
3939
For instructions on how to create an HDInsight cluster, see [Get started with Azure HDInsight](hdinsight-hadoop-linux-tutorial-get-started.md).
4040

4141

42-
* **A Log Analytics workspace**. You can think of this workspace as a unique Log Analytics environment with its own data repository, data sources, and solutions. You must have one such workspace already created that you can associate with Azure HDInsight clusters. For instructions, see [Create a Log Analytics workspace](../log-analytics/log-analytics-get-started.md#2-create-a-workspace).
42+
* **A Log Analytics workspace**. You can think of this workspace as a unique Log Analytics environment with its own data repository, data sources, and solutions. You must have one such workspace already created that you can associate with Azure HDInsight clusters. For instructions, see [Create a Log Analytics workspace](../log-analytics/log-analytics-quick-collect-azurevm.md#create-a-workspace).
4343

4444
## Configure HDInsight cluster to use Azure Log Analytics
4545

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Perform queries across Azure Log Analytics workspaces | Microsoft Docs
3+
description: This article describes how you can query across multiple workspaces in your subscription with examples to follow.
4+
services: log-analytics
5+
documentationcenter: ''
6+
author: MGoedtel
7+
manager: carmonm
8+
editor: ''
9+
ms.assetid:
10+
ms.service: log-analytics
11+
ms.workload: na
12+
ms.tgt_pltfrm: na
13+
ms.devlang: na
14+
ms.topic: article
15+
ms.date: 10/04/2017
16+
ms.author: magoedte
17+
18+
---
19+
20+
# Perform queries across multiple Log Analytics workspaces
21+
22+
Previously with Azure Log Analytics, you could only analyze data from within the current workspace and this limited your ability to query across multiple workspaces defined in your subscription.
23+
24+
Now you can query across multiple workspaces, providing a system-wide view of your data. You can only perform this type of query in the [Advanced portal](log-analytics-log-search-portals.md#advanced-analytics-portal), not in the Azure portal.
25+
26+
## Querying across Log Analytics workspaces
27+
To reference another workspace in your query, use the *workspace* identifier. For example, the following query returns summarized counts of updates needed by their classification from the Update table from both the current workspace, and another workspace named *contosoretail-it*.
28+
29+
30+
## Identifying resources
31+
Identifying a workspace can be performed one of several ways:
32+
33+
* Resource name - is a human-readable name of the workspace, sometimes referred to as *component name*.
34+
35+
`workspace("contosoretail").Update | count`
36+
37+
>[!NOTE]
38+
>Identifying a workspace by its name assumes it is unique across all accessible subscriptions. If you have multiple applications with the specified name, the query fails because of the ambiguity. In this case you must use one of the other identifiers.
39+
40+
* Qualified Name - is the “full name” of the workspace, composed of the subscription name, resource group and component name in this format: *subscriptionName/resourceGroup/componentName*.
41+
42+
`workspace('contoso/contosoretail/development').requests | count `
43+
44+
>[!NOTE]
45+
>Because Azure subscription names are not unique, this identifier might be ambiguous.
46+
>
47+
48+
* workspace ID - A workspace ID is the unique, immutable, identifier assigned to each workspace represented as a globally unique identifier (GUID).
49+
50+
`workspace("b438b4f6-912a-46d5-9cb1-b44069212ab4").Update | count`
51+
52+
* Azure Resource ID – the Azure-defined unique identity of the workspace. You use this when the resource name is ambiguous. For workspaces, the format is: */subscriptions/subscriptionId/resourcegroups/resourceGroup/providers/microsoft.OperationalInsights/workspaces/componentName*.
53+
54+
For example:
55+
```
56+
`workspace("/subscriptions/e427267-5645-4c4e-9c67-3b84b59a6982/resourcegroups/ContosoAzureHQ/providers/Microsoft.OperationalInsights/workspaces/contosoretail").Event | count
57+
```
58+
59+
## Next steps
60+
61+
Review the [Log Analytics log search reference](https://docs.loganalytics.io/docs/Language-Reference) to view all of the query syntax options available in Log Analytics.

articles/log-analytics/log-analytics-get-started.md

Lines changed: 0 additions & 153 deletions
This file was deleted.

articles/log-analytics/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@
9292
items:
9393
- name: Regular expressions
9494
href: log-analytics-log-searches-regex.md
95+
- name: Cross-workspace searches
96+
href: log-analytics-cross-workspace-search.md
9597
- name: Take action from search results
9698
href: log-analytics-log-search-takeaction.md
9799
- name: Computer groups

0 commit comments

Comments
 (0)