Skip to content

sFlow

sFlow configuration manages global sFlow sampling and collector settings on NX-OS devices. Settings include agent address, sampling rate, header size, counter polling interval, collector receivers, data source interfaces, and extended flow types (BGP, switch).

sFlow configuration manages global sFlow sampling and collector settings on NX-OS devices. Settings include agent address, sampling rate, header size, counter polling interval, collector receivers, and extended flow types (BGP, switch).

NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo
device_groupsListdevice_groupsNo
globalClassglobalNo
templatesListtemplatesNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
sflowClasssflowNo

NameTypeConstraintMandatoryDefault Value
agent_ipIPNo
collector_portIntegermin: 1, max: 65535No
collectorsListcollectorsNo
counter_poll_intervalIntegermin: 0, max: 2147483647No
extended_bgpBooleantrue, falseNo
extended_switchBooleantrue, falseNo
max_datagram_sizeIntegermin: 200, max: 9000No
max_sampled_sizeIntegermin: 64, max: 256No
sampling_rateIntegermin: 0, max: 4294967295No
data_source_interfacesListdata_source_interfacesNo

NameTypeConstraintMandatoryDefault Value
agent_ipStringNo
collector_portIntegermin: 1, max: 65535No
collectorsListcollectorsNo
counter_poll_intervalIntegermin: 0, max: 2147483647No
extended_bgpBooleantrue, falseNo
extended_switchBooleantrue, falseNo
max_datagram_sizeIntegermin: 200, max: 9000No
max_sampled_sizeIntegermin: 64, max: 256No
sampling_rateIntegermin: 0, max: 4294967295No

collectors (nxos.devices.configuration.sflow)

Section titled “collectors (nxos.devices.configuration.sflow)”
NameTypeConstraintMandatoryDefault Value
addressIPYes
vrfStringNo
source_addressIPNo

collectors (nxos.devices.configuration.sflow)

Section titled “collectors (nxos.devices.configuration.sflow)”
NameTypeConstraintMandatoryDefault Value
addressStringYes
vrfStringNo
source_addressStringNo

data_source_interfaces (nxos.devices.configuration.sflow)

Section titled “data_source_interfaces (nxos.devices.configuration.sflow)”
NameTypeConstraintMandatoryDefault Value
interface_typeChoiceethernet, port-channelYes
interface_idAnyString or Integer[min: 0]Yes

Example 1: Basic sFlow with a single collector

nxos:
devices:
- name: LEAF1
configuration:
feature:
sflow: true
sflow:
agent_ip: 10.0.0.1
sampling_rate: 4096
collector_port: 6343
collectors:
- address: 10.92.198.113
vrf: management

Example 2: sFlow with multiple collectors and tuned parameters

nxos:
devices:
- name: LEAF1
configuration:
feature:
sflow: true
sflow:
agent_ip: 172.24.141.69
counter_poll_interval: 30
max_sampled_size: 128
max_datagram_size: 1400
sampling_rate: 2048
collector_port: 2055
extended_bgp: true
extended_switch: true
collectors:
- address: 10.92.198.113
vrf: management
source_address: 10.0.0.1
- address: 10.92.198.114
vrf: management
source_address: 10.0.0.1

Example 3: sFlow sampling on selected Ethernet and port-channel data sources (sflow data-source interface <interface>)

nxos:
devices:
- name: LEAF1
configuration:
feature:
sflow: true
sflow:
agent_ip: 10.0.0.1
collectors:
- address: 10.92.198.113
vrf: management
data_source_interfaces:
- interface_type: ethernet
interface_id: 1/10
- interface_type: port-channel
interface_id: 10

Example 1: Basic sFlow with a single collector

nxos:
devices:
- name: LEAF1
configuration:
feature:
sflow: true
sflow:
agent_ip: 10.0.0.1
sampling_rate: 4096
collector_port: 6343
collectors:
- address: 10.92.198.113
vrf: management

Example 2: sFlow with multiple collectors and tuned parameters

nxos:
devices:
- name: LEAF1
configuration:
feature:
sflow: true
sflow:
agent_ip: 172.24.141.69
counter_poll_interval: 30
max_sampled_size: 128
max_datagram_size: 1400
sampling_rate: 2048
collector_port: 2055
extended_bgp: true
extended_switch: true
collectors:
- address: 10.92.198.113
vrf: management
source_address: 10.0.0.1
- address: 10.92.198.114
vrf: management
source_address: 10.0.0.1