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
Copy file name to clipboardExpand all lines: articles/azure-monitor/logs/azure-monitor-data-explorer-proxy.md
+34-38Lines changed: 34 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,8 +51,7 @@ union customEvents, adx('https://help.kusto.windows.net/Samples').StormEvents
51
51
```kusto
52
52
let CL1 = adx('https://help.kusto.windows.net/Samples').StormEvents;
53
53
union customEvents, CL1 | take 10
54
-
55
-
```sql
54
+
```
56
55
57
56
> [!TIP]
58
57
> Shorthand format is allowed: *ClusterName*/*InitialCatalog*. For example, `adx('help/Samples')` is translated to `adx('help.kusto.windows.net/Samples')`.
@@ -61,7 +60,7 @@ When you use the [`join` operator](/azure/data-explorer/kusto/query/joinoperator
61
60
62
61
For example:
63
62
64
-
kusto
63
+
```kusto
65
64
AzureDiagnostics
66
65
| join hint.remote=left adx("cluster=ClusterURI").AzureDiagnostics on (ColumnName)
67
66
```
@@ -95,40 +94,39 @@ Here are some sample Azure Log Analytics queries that use the new Azure Resource
95
94
96
95
- Filter a Log Analytics query based on the results of an Azure Resource Graph query:
97
96
98
-
```kusto
99
-
arg("").Resources
100
-
| where type == "microsoft.compute/virtualmachines" and properties.hardwareProfile.vmSize startswith "Standard_D"
101
-
| join (
102
-
Heartbeat
103
-
| where TimeGenerated > ago(1d)
104
-
| distinct Computer
105
-
)
106
-
on $left.name == $right.Computer
107
-
```
97
+
```kusto
98
+
arg("").Resources
99
+
| where type == "microsoft.compute/virtualmachines" and properties.hardwareProfile.vmSize startswith "Standard_D"
100
+
| join (
101
+
Heartbeat
102
+
| where TimeGenerated > ago(1d)
103
+
| distinct Computer
104
+
)
105
+
on $left.name == $right.Computer
106
+
```
108
107
109
108
- Create an alert rule that applies only to certain resources taken from an ARG query:
110
109
- Exclude resources based on tags – for example, not to trigger alerts for VMs with a “Test” tag.
111
110
112
-
```kusto
113
-
arg("").Resources
114
-
| where tags.environment=~'Test'
115
-
| project name
116
-
117
-
```
118
-
119
-
- Retrieve performance data related to CPU utilization and filter to resources with the “prod” tag.
120
-
121
-
```kusto
122
-
InsightsMetrics
123
-
| where Name == "UtilizationPercentage"
124
-
| lookup (
125
-
arg("").Resources
126
-
| where type == 'microsoft.compute/virtualmachines'
127
-
| project _ResourceId=tolower(id), tags
128
-
)
129
-
on _ResourceId
130
-
| where tostring(tags.Env) == "Prod"
131
-
```
111
+
```kusto
112
+
arg("").Resources
113
+
| where tags.environment=~'Test'
114
+
| project name
115
+
```
116
+
117
+
- Retrieve performance data related to CPU utilization and filter to resources with the “prod” tag.
118
+
119
+
```kusto
120
+
InsightsMetrics
121
+
| where Name == "UtilizationPercentage"
122
+
| lookup (
123
+
arg("").Resources
124
+
| where type == 'microsoft.compute/virtualmachines'
125
+
| project _ResourceId=tolower(id), tags
126
+
)
127
+
on _ResourceId
128
+
| where tostring(tags.Env) == "Prod"
129
+
```
132
130
133
131
More use cases:
134
132
- Use a tag to determine whether VMs should be running 24x7 or should be shut down at night.
@@ -147,16 +145,14 @@ union AzureActivity, arg("").Resources
147
145
```kusto
148
146
let CL1 = arg("").Resources ;
149
147
union AzureActivity, CL1 | take 10
148
+
```
150
149
151
-
```sql
152
-
153
-
When you use the [`join` operator](/azure/data-explorer/kusto/query/joinoperator) instead of union, you're required to use a [`hint`](/azure/data-explorer/kusto/query/joinoperator#join-hints) to combine the data in Azure Resource Graph with the Log Analytics workspace. Use `Hint.remote={Direction of the Log Analytics Workspace}`. For example:
150
+
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:
154
151
155
-
kusto
152
+
```kusto
156
153
Perf | where ObjectName == "Memory" and (CounterName == "Available MBytes Memory")
0 commit comments