Skip to content

Commit 2d4ab38

Browse files
authored
Merge pull request #296513 from yelevin/yelevin/fix-dns-api-samples
Fix DNS API samples
2 parents 9e6a178 + c4c31db commit 2d4ab38

File tree

2 files changed

+23
-38
lines changed

2 files changed

+23
-38
lines changed

articles/sentinel/connect-dns-ama.md

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Stream and filter Windows DNS logs with the AMA connector
3-
description: Use the AMA connector to upload and filter data from your Windows DNS server logs. You can then dive into your logs to protect your DNS servers from threats and attacks.
3+
description: Ingest and filter data from your Windows DNS server logs with this data connector. Query this data to protect your DNS servers from threats and attacks.
44
author: yelevin
55
ms.topic: how-to
6-
ms.date: 11/11/2024
6+
ms.date: 03/25/2025
77
ms.author: yelevin
88

99
#Customer intent: As a security engineer, I want to stream and filter DNS server logs using a cloud-based monitoring agent so that analysts can detect and mitigate potential threats efficiently.
@@ -70,18 +70,20 @@ Use the following example as a template to create or update a DCR:
7070

7171
### Request URL and header 
7272

73-
```rest
73+
```http
74+
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}?api-version={latest-supported-version}
75+
```
7476

75-
PUT
77+
For the latest supported API version, see [Data Collection Rules - REST API (Azure Monitor) | Microsoft Learn](/rest/api/monitor/data-collection-rules).
7678

77-
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}?api-version=2019-11-01-preview
78-
```
79-
80-
### Request body
79+
:::image type="content" source="media/connect-dns-ama/windows-dns-ama-connector-dcr-api-version.png" border="false" alt-text="Screenshot of the API version's appearance in the DCR documentation.":::
8180

82-
```rest
81+
### Request body
8382

83+
```json
8484
{
85+
"location": "eastus2",
86+
"kind" : "Windows",
8587
"properties": {
8688
"dataSources": {
8789
"windowsEventLogs": [],
@@ -113,9 +115,9 @@ PUT
113115
"destinations": {
114116
"logAnalytics": [
115117
{
116-
"workspaceResourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.OperationalInsights/workspaces/{sentinelWorkspaceName}",
117-
"workspaceId": {WorkspaceGuid}",
118-
"name": "WorkspaceDestination"
118+
"name" : "WorkspaceDestination",
119+
"workspaceId" : "{WorkspaceGuid}",
120+
"workspaceResourceId" : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.OperationalInsights/workspaces/{sentinelWorkspaceName}"
119121
}
120122
]
121123
},
@@ -125,17 +127,12 @@ PUT
125127
"Microsoft-ASimDnsActivityLogs"
126128
],
127129
"destinations": [
128-
" WorkspaceDestination "
130+
"WorkspaceDestination"
129131
]
130132
}
131133
],
132134
},
133-
"location": "eastus2",
134-
"tags": {},
135-
"kind": "Windows",
136-
"id":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Insights/dataCollectionRules/{workspaceName}-microsoft-sentinel-asimdnsactivitylogs ",
137-
"name": " {workspaceName}-microsoft-sentinel-asimdnsactivitylogs ",
138-
"type": "Microsoft.Insights/dataCollectionRules",
135+
"tags" : {}
139136
}
140137
```
141138

@@ -203,7 +200,7 @@ This filter instructs the connector not to collect EventID 256 or EventID 257 or
203200

204201
**Using the API**:
205202

206-
```rest
203+
```json
207204
"Filters": [
208205
{
209206
"FilterName": "SampleFilter",
@@ -260,32 +257,20 @@ To define different values in a single field, use the **OR** operator.
260257

261258
Review these considerations for [using wildcards](#use-wildcards).
262259

263-
```rest
260+
```json
264261
"Filters": [
265-
266262
{
267-
268263
"FilterName": "SampleFilter",
269-
270264
"Rules": [
271-
272265
{
273-
274266
"Field": "DnsQuery",
275-
276267
"FieldValues": [
277-
278268
"*.microsoft.com", "*.google.com", "facebook.com", "*.amazon.com","center.local"
279-
280-
]
281-
282-
},
283-
284-
}
285-
286-
}
287-
288-
]
269+
]
270+
}
271+
]
272+
}
273+
]
289274
```
290275

291276
## Normalization using ASIM
30.1 KB
Loading

0 commit comments

Comments
 (0)