Collect data from your workloads with the Log Analytics agent
Configure the Log Analytics agent and workspaces
When the Log Analytics agent is on, Defender for Cloud deploys the agent on all supported Azure VMs and any new ones created. For the list of supported platforms, see Supported platforms in Microsoft Defender for Cloud.
To configure integration with the Log Analytics agent:
From Defender for Cloud's menu, open Environment settings.
Select the relevant subscription.
In the Monitoring Coverage column of the Defender plans, select Settings.
From the configuration options pane, define the workspace to use.
Connect Azure VMs to the default workspaces created by Defender for Cloud - Defender for Cloud creates a new resource group and default workspace in the same geolocation, and connects the agent to that workspace. If a subscription contains VMs from multiple geolocations, Defender for Cloud creates multiple workspaces to ensure compliance with data privacy requirements.
The naming convention for the workspace and resource group is:
- Workspace: DefaultWorkspace-[subscription-ID]-[geo]
- Resource Group: DefaultResourceGroup-[geo]
A Defender for Cloud solution is automatically enabled on the workspace per the pricing tier set for the subscription.
For questions regarding default workspaces, see:
Connect Azure VMs to a different workspace - From the dropdown list, select the workspace to store collected data. The dropdown list includes all workspaces across all of your subscriptions. You can use this option to collect data from virtual machines running in different subscriptions and store it all in your selected workspace.
If you already have an existing Log Analytics workspace, you might want to use the same workspace (requires read and write permissions on the workspace). This option is useful if you're using a centralized workspace in your organization and want to use it for security data collection. Learn more in Manage access to log data and workspaces in Azure Monitor.
If your selected workspace already has a "Security" or "SecurityCenterFree" solution enabled, the pricing will be set automatically. If not, install a Defender for Cloud solution on the workspace:
- From Defender for Cloud's menu, open Environment settings.
- Select the workspace to which you'll be connecting the agents.
- Set Security posture management to on or select Enable all to turn all Microsoft Defender plans on.
From the Windows security events configuration, select the amount of raw event data to store:
- None – Disable security event storage. (Default)
- Minimal – A small set of events for when you want to minimize the event volume.
- Common – A set of events that satisfies most customers and provides a full audit trail.
- All events – For customers who want to make sure all events are stored.
To set these options at the workspace level, see Setting the security event option at the workspace level.
For more information of these options, see Windows security event options for the Log Analytics agent.
Select Apply in the configuration pane.
Windows security event options for the Log Analytics agent
When you select a data collection tier in Microsoft Defender for Cloud, the security events of the selected tier are stored in your Log Analytics workspace so that you can investigate, search, and audit the events in your workspace. The Log Analytics agent also collects and analyzes the security events required for Defender for Cloud’s threat protection.
The enhanced security protections of Defender for Cloud are required for storing Windows security event data. Learn more about the enhanced protection plans.
You maybe charged for storing data in Log Analytics. For more information, see the pricing page.
Information for Microsoft Sentinel users
Security events collection within the context of a single workspace can be configured from either Microsoft Defender for Cloud or Microsoft Sentinel, but not both. If you want to add Microsoft Sentinel to a workspace that already gets alerts from Microsoft Defender for Cloud and to collect Security Events, you can either:
- Leave the Security Events collection in Microsoft Defender for Cloud as is. You'll be able to query and analyze these events in both Microsoft Sentinel and Defender for Cloud. If you want to monitor the connector's connectivity status or change its configuration in Microsoft Sentinel, consider the second option.
- Disable Security Events collection in Microsoft Defender for Cloud and then add the Security Events connector in Microsoft Sentinel. You'll be able to query and analyze events in both Microsoft Sentinel, and Defender for Cloud, but you'll also be able to monitor the connector's connectivity status or change its configuration in - and only in - Microsoft Sentinel. To disable Security Events collection in Defender for Cloud, set Windows security events to None in the configuration of your Log Analytics agent.
What event types are stored for "Common" and "Minimal"?
The Common and Minimal event sets were designed to address typical scenarios based on customer and industry standards for the unfiltered frequency of each event and their usage.
- Minimal - This set is intended to cover only events that might indicate a successful breach and important events with low volume. Most of the data volume of this set is successful user logon (event ID 4625), failed user logon events (event ID 4624), and process creation events (event ID 4688). Sign out events are important for auditing only and have relatively high volume, so they aren't included in this event set.
- Common - This set is intended to provide a full user audit trail, including events with low volume. For example, this set contains both user logon events (event ID 4624) and user logoff events (event ID 4634). We include auditing actions like security group changes, key domain controller Kerberos operations, and other events that are recommended by industry organizations.
Here's a complete breakdown of the Security and App Locker event IDs for each set:
|Data tier||Collected event indicators|
- If you are using Group Policy Object (GPO), it is recommended that you enable audit policies Process Creation Event 4688 and the CommandLine field inside event 4688. For more information about Process Creation Event 4688, see Defender for Cloud's FAQ. For more information about these audit policies, see Audit Policy Recommendations.
- To enable data collection for Adaptive application controls, Defender for Cloud configures a local AppLocker policy in Audit mode to allow all applications. This will cause AppLocker to generate events which are then collected and leveraged by Defender for Cloud. It is important to note that this policy will not be configured on any machines on which there is already a configured AppLocker policy.
- To collect Windows Filtering Platform Event ID 5156, you need to enable Audit Filtering Platform Connection (Auditpol /set /subcategory:"Filtering Platform Connection" /Success:Enable)
Setting the security event option at the workspace level
You can define the level of security event data to store at the workspace level.
From Defender for Cloud's menu in the Azure portal, select Environment settings.
Select the relevant workspace. The only data collection events for a workspace are the Windows security events described on this page.
Select the amount of raw event data to store and select Save.
Manual agent provisioning
To manually install the Log Analytics agent:
Turn off the Log Analytics agent in Environment Settings > Monitoring coverage > Settings.
Optionally, create a workspace.
Enable Microsoft Defender for Cloud on the workspace on which you're installing the Log Analytics agent:
From Defender for Cloud's menu, open Environment settings.
Set the workspace on which you're installing the agent. Make sure the workspace is in the same subscription you use in Defender for Cloud and that you have read/write permissions for the workspace.
Select Microsoft Defender for Cloud on, and Save.
If the workspace already has a Security or SecurityCenterFree solution enabled, the pricing will be set automatically.
To deploy agents on new VMs using a Resource Manager template, install the Log Analytics agent:
To deploy agents on your existing VMs, follow the instructions in Collect data about Azure Virtual Machines (the section Collect event and performance data is optional).
To use PowerShell to deploy the agents, use the instructions from the virtual machines documentation:
For more information about onboarding, see Automate onboarding of Microsoft Defender for Cloud using PowerShell.
To turn off monitoring components:
- Go to the Defender plans and turn off the plan that uses the extension and select Save.
- For Defender plans that have monitoring settings, go to the settings of the Defender plan, turn off the extension, and select Save.
- Disabling extensions does not remove the extensions from the effected workloads.
- For information on removing the OMS extension, see How do I remove OMS extensions installed by Defender for Cloud.
Submit and view feedback for