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
@@ -301,21 +302,29 @@ for metric in response.metrics:
301
302
)
302
303
```
303
304
304
-
### Advacned Scenarios
305
+
### Advanced scenarios
305
306
306
307
#### Query multiple workspaces
307
308
308
-
One of the more advanced scenarios is to query the same query on multiple workspaces. The `additional_workspaces` parameter can be used to pass a list of workspaces that are included in the query when querying a single query over multiple workspaces. The parameter's list items can be qualified workspace names, workspace IDs, or Azure resource IDs. A primary workspace ID must be provided when querying multiple workspaces, as in the following example:
309
+
The same log query can be executed across multiple Log Analytics workspaces. In addition to the KQL query, the following parameters are required:
310
+
311
+
-`workspace_id` - The first (primary) workspace ID.
312
+
-`additional_workspaces` - A list of workspaces, excluding the workspace provided in the `workspace_id` parameter. The parameter's list items may consist of the following identifier formats:
313
+
- Qualified workspace names
314
+
- Workspace IDs
315
+
- Azure resource IDs
316
+
317
+
For example, the following query executes in three workspaces:
The full sample can be found [here](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py).
327
+
A full sample can be found [here](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py).
0 commit comments