Control: Network traffic data collection agent should be installed on Windows virtual machines
Description
Security Center uses the Microsoft Dependency agent to collect network traffic data from your Azure virtual machines to enable advanced network protection features such as traffic visualization on the network map, network hardening recommendations and specific network threats.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.compute_vm_network_traffic_data_collection_windows_agent_installed
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.compute_vm_network_traffic_data_collection_windows_agent_installed --share
SQL
This control uses a named query:
with agent_installed_vm as ( select distinct a.vm_id from azure_compute_virtual_machine as a, jsonb_array_elements(extensions) as b where b ->> 'ExtensionType' = 'DependencyAgentWindows' and b ->> 'Publisher' = 'Microsoft.Azure.Monitoring.DependencyAgent' and b ->> 'ProvisioningState' = 'Succeeded')select a.vm_id as resource, case when a.os_type <> 'Windows' then 'skip' when b.vm_id is not null then 'ok' else 'alarm' end as status, case when a.os_type <> 'Windows' then a.title || ' is of ' || a.os_type || ' operating system.' when b.vm_id is not null then a.title || ' have data collection agent installed.' else a.title || ' data collection agent not installed.' end as reason , a.resource_group as resource_group , sub.display_name as subscriptionfrom azure_compute_virtual_machine as a left join agent_installed_vm as b on a.vm_id = b.vm_id, azure_subscription as subwhere sub.subscription_id = a.subscription_id;