To remove collector IPs, do the following:
From the vSphere Client, go to "Networking".
Select a distributed switch >> Configure >> Settings >> NetFlow.
Click "Edit".
Remove any unknown collector IPs.
or
From a PowerCLI command prompt while connected to the vCenter server, run the following commands:
$dvs = Get-VDSwitch dvswitch | Get-View
ForEach($vs in $dvs){
$spec = New-Object VMware.Vim.VMwareDVSConfigSpec
$spec.configversion = $vs.Config.ConfigVersion
$spec.IpfixConfig = New-Object VMware.Vim.VMwareIpfixConfig
$spec.IpfixConfig.CollectorIpAddress = ""
$spec.IpfixConfig.CollectorPort = "0"
$spec.IpfixConfig.ActiveFlowTimeout = "60"
$spec.IpfixConfig.IdleFlowTimeout = "15"
$spec.IpfixConfig.SamplingRate = "0"
$spec.IpfixConfig.InternalFlowsOnly = $False
$vs.ReconfigureDvs_Task($spec)
}
Note: This will reset the NetFlow collector configuration back to the defaults.
To disable NetFlow on a distributed port group, do the following:
From the vSphere Client, go to "Networking".
Select a distributed port group >> Configure >> Settings >> Policies.
Click "Edit".
Click the "Monitoring" tab.
Change "NetFlow" to "Disabled".
or
From a PowerCLI command prompt while connected to the vCenter server, run the following commands:
$pgs = Get-VDPortgroup | Get-View
ForEach($pg in $pgs){
$spec = New-Object VMware.Vim.DVPortgroupConfigSpec
$spec.configversion = $pg.Config.ConfigVersion
$spec.defaultPortConfig = New-Object VMware.Vim.VMwareDVSPortSetting
$spec.defaultPortConfig.ipfixEnabled = New-Object VMware.Vim.BoolPolicy
$spec.defaultPortConfig.ipfixEnabled.inherited = $false
$spec.defaultPortConfig.ipfixEnabled.value = $false
$pg.ReconfigureDVPortgroup_Task($spec)
}