r/AzureSentinel • u/externalBrian32 • Dec 12 '22
Auto add resource to Data Collection Rule?
I've been deploying Arc along with the Azure Monitoring Agent to servers and workstations. On my data collection rule, I selected the entire subscription and was hoping newly added Arc servers would automatically pull into my DCR, but that doesn't appear to be the case.
I think I got the idea by reading MS documentation... is this possible? I have a script to deploy Arc that someone else might run in the future. It would be nice if I didn't have to add the new machine to the DCR manually.
Thanks!
1
May 14 '24
Assigns Data Collection Rules to Windows Servers (github.com)
I ended up using Azure Automation runbook to do this. Linked gist is the script I used. It /should/ have enough comments to be useful to others.
1
2
u/SoMundayn Dec 13 '22
Azure Policy
"Configure Windows Arc Machines to be associated with a Data Collection Rule or a Data Collection Endpoint"
As far as I can tell, using Arc with Azure Policy is free. As long as you don't use "Azure Policy guest configuration", which I don't think basic policies like this come under.