Skip to content

Commit fdcd450

Browse files
authored
Merge pull request #267538 from osalzberg/add-new-basiclogs-tables
Update azure-monitor-data-explorer-proxy.md
2 parents bdd1db4 + 2493998 commit fdcd450

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

articles/azure-monitor/logs/azure-monitor-data-explorer-proxy.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -124,29 +124,6 @@ More use cases:
124124
- Use a tag to determine whether VMs should be running 24x7 or should be shut down at night.
125125
- Show alerts on any server that contains a certain number of cores.
126126
127-
### Combine Azure Resource Graph tables with a Log Analytics workspace
128-
129-
Use the `union` command to combine cluster tables with a Log Analytics workspace.
130-
131-
For example:
132-
133-
```kusto
134-
union AzureActivity, arg("").Resources
135-
| take 10
136-
```
137-
```kusto
138-
let CL1 = arg("").Resources ;
139-
union AzureActivity, CL1 | take 10
140-
```
141-
142-
When you use the [`join` operator](/azure/data-explorer/kusto/query/joinoperator) instead of union, you need to use a [`hint`](/azure/data-explorer/kusto/query/joinoperator#join-hints) to combine the data in Azure Resource Graph with data in the Log Analytics workspace. Use `Hint.remote={Direction of the Log Analytics Workspace}`. For example:
143-
144-
```kusto
145-
Perf | where ObjectName == "Memory" and (CounterName == "Available MBytes Memory")
146-
| extend _ResourceId = replace_string(replace_string(replace_string(_ResourceId, 'microsoft.compute', 'Microsoft.Compute'), 'virtualmachines','virtualMachines'),"resourcegroups","resourceGroups")
147-
| join hint.remote=left (arg("").Resources | where type =~ 'Microsoft.Compute/virtualMachines' | project _ResourceId=id, tags) on _ResourceId | project-away _ResourceId1 | where tostring(tags.env) == "prod"
148-
```
149-
150127
## Create an alert based on a cross-service query
151128
152129
To create a new alert rule based on a cross-service query, follow the steps in [Create a new alert rule](../alerts/alerts-create-new-alert-rule.md), selecting your Log Analytics workspace on the **Scope** tab.
@@ -163,19 +140,43 @@ To create a new alert rule based on a cross-service query, follow the steps in [
163140
* Database names are case sensitive.
164141
* Identifying the Timestamp column in the cluster isn't supported. The Log Analytics Query API won't pass the time filter.
165142
* Cross-service queries support data retrieval only.
166-
* [Private Link](../logs/private-link-security.md) (private endpoints) and [IP restrictions](/azure/data-explorer/security-network-restrict-public-access) do not support cross-service queries.
167-
* `mv-expand` is limited to 2000 records.
168-
* Azure Monitor Logs does not support the `external_table()` function, which lets you query external tables in Azure Data Explorer. To query an external table, define `external_table(<external-table-name>)` as a parameterless function in Azure Data Explorer. You can then call the function using the expression `adx("").<function-name>`.
143+
* [Private Link](../logs/private-link-security.md) (private endpoints) and [IP restrictions](/azure/data-explorer/security-network-restrict-public-access) don't support cross-service queries.
144+
* `mv-expand` is limited to 2,000 records.
145+
* Azure Monitor Logs doesn't support the `external_table()` function, which lets you query external tables in Azure Data Explorer. To query an external table, define `external_table(<external-table-name>)` as a parameterless function in Azure Data Explorer. You can then call the function using the expression `adx("").<function-name>`.
169146
170147
### Azure Resource Graph cross-service query limitations
171148
172-
* Microsoft Sentinel does not support cross-service queries to Azure Resource Graph.
149+
* Microsoft Sentinel doesn't support cross-service queries to Azure Resource Graph.
173150
* When you query Azure Resource Graph data from Azure Monitor:
174-
* The query returns the first 1000 records only.
151+
* The query returns the first 1,000 records only.
175152
* Azure Monitor doesn't return Azure Resource Graph query errors.
176153
* The Log Analytics query editor marks valid Azure Resource Graph queries as syntax errors.
177154
* These operators aren't supported: `smv-apply()`, `rand()`, `arg_max()`, `arg_min()`, `avg()`, `avg_if()`, `countif()`, `sumif()`, `percentile()`, `percentiles()`, `percentilew()`, `percentilesw()`, `stdev()`, `stdevif()`, `stdevp()`, `variance()`, `variancep()`, `varianceif()`.
178155
156+
157+
### Combine Azure Resource Graph tables with a Log Analytics workspace
158+
159+
Use the `union` command to combine cluster tables with a Log Analytics workspace.
160+
161+
For example:
162+
163+
```kusto
164+
union AzureActivity, arg("").Resources
165+
| take 10
166+
```
167+
```kusto
168+
let CL1 = arg("").Resources ;
169+
union AzureActivity, CL1 | take 10
170+
```
171+
172+
When you use the [`join` operator](/azure/data-explorer/kusto/query/joinoperator) instead of union, you need to use a [`hint`](/azure/data-explorer/kusto/query/joinoperator#join-hints) to combine the data in Azure Resource Graph with data in the Log Analytics workspace. Use `Hint.remote={Direction of the Log Analytics Workspace}`. For example:
173+
174+
```kusto
175+
Perf | where ObjectName == "Memory" and (CounterName == "Available MBytes Memory")
176+
| extend _ResourceId = replace_string(replace_string(replace_string(_ResourceId, 'microsoft.compute', 'Microsoft.Compute'), 'virtualmachines','virtualMachines'),"resourcegroups","resourceGroups")
177+
| join hint.remote=left (arg("").Resources | where type =~ 'Microsoft.Compute/virtualMachines' | project _ResourceId=id, tags) on _ResourceId | project-away _ResourceId1 | where tostring(tags.env) == "prod"
178+
```
179+
179180
## Next steps
180181
* [Write queries](/azure/data-explorer/write-queries)
181182
* [Perform cross-resource log queries in Azure Monitor](../logs/cross-workspace-query.md)

0 commit comments

Comments
 (0)