Skip to content

Commit a2c0acb

Browse files
Fix KQL queries
1 parent c9ceeed commit a2c0acb

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

articles/azure-monitor/logs/tutorial-logs-ingestion-portal.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,18 @@ Instead of directly configuring the schema of the table, you can upload a file w
125125
```kusto
126126
source
127127
| extend TimeGenerated = todatetime(Time)
128-
| parse RawData with
128+
| parse RawData with *
129+
'":"'
129130
ClientIP:string
131+
' - -' * '"'
132+
RequestType:string
133+
' '
134+
Resource:string
130135
' ' *
136+
'" '
137+
ResponseCode:int
131138
' ' *
132-
' [' * '] "' RequestType:string
133-
" " Resource:string
134-
" " *
135-
'" ' ResponseCode:int
136-
" " *
137-
```
139+
```
138140

139141
1. Select **Run** to view the results. This action extracts the contents of `RawData` into the separate columns `ClientIP`, `RequestType`, `Resource`, and `ResponseCode`.
140142

@@ -145,16 +147,19 @@ Instead of directly configuring the schema of the table, you can upload a file w
145147
```kusto
146148
source
147149
| extend TimeGenerated = todatetime(Time)
148-
| parse kind = regex RawData with *
149-
':"'
150+
| parse RawData with *
151+
'":"'
150152
ClientIP:string
151-
" - -" * '"'
153+
' - -' * '"'
152154
RequestType:string
153155
' '
154156
Resource:string
155-
" " *
156-
'" ' ResponseCode:int
157-
" " *
157+
' ' *
158+
'" '
159+
ResponseCode:int
160+
' ' *
161+
| project-away RawData, Time
162+
| where ResponseCode != 200
158163
```
159164
160165
1. Select **Run** to view the results.

0 commit comments

Comments
 (0)