Configuring sFlow

Sampled flow (sFlow) allows you to monitor real-time traffic in data networks that contain switches and routers. It uses the sampling mechanism in the sFlow agent software on switches and routers to monitor traffic and to forward the sample data to the central data collector.

For more information, see the Cisco Nexus 9000 Series NX-OS System Management Configuration Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-installation-and-configuration-guides-list.html/

Enabling sFlow Agent

Enabling sFlow Agent
POST http://<mgmt0_IP>/api/mo/sys/fm.json
{
  "fmEntity": {
    "children": [
      {
        "fmSflow": {
          "attributes": {
            "adminSt": "enabled"
}}}]}}
{
    imdata:[]
}
<System>
  <fm-items>
    <sflow-items>
      <adminSt>enabled</adminSt>
    </sflow-items>
  </fm-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

feature sflow


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
fmEntitysys/fm
fmSflowsys/fm/sflow


fmSflow Properties

The following table contains information about the fmSflow properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
adminStfm:AdminState
(scalar:Enum8)
Admin statusSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Disabling sFlow Agent

Disabling sFlow Agent
POST http://<mgmt0_IP>/api/mo/sys/fm.json
{
  "fmEntity": {
    "children": [
      {
        "fmSflow": {
          "attributes": {
            "adminSt": "disabled"
}}}]}}
{
    imdata:[]
}
<System>
  <fm-items>
    <sflow-items>
      <adminSt>disabled</adminSt>
    </sflow-items>
  </fm-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no feature sflow


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
fmEntitysys/fm
fmSflowsys/fm/sflow


fmSflow Properties

The following table contains information about the fmSflow properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
adminStfm:AdminState
(scalar:Enum8)
Admin statusSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring sFlow Extended Switch Flow

Configuring sFlow Extended Switch Flow
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "isExtendedSwitch": "yes"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <isExtendedSwitch>true</isExtendedSwitch>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow extended switch


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
isExtendedSwitchscalar:Bool
Describes whether sflow is configured in extended switch flowSELECTION: true or false


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting sFlow Extended Switch Flow

Deleting sFlow Extended Switch Flow
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "isExtendedSwitch": "no"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <isExtendedSwitch>false</isExtendedSwitch>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow extended switch


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
isExtendedSwitchscalar:Bool
Describes whether sflow is configured in extended switch flowSELECTION: true or false


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the Source IP Address to Send to the sFlow Collector

Configuring the Source IP Address to Send to the sFlow Collector 
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "rcvrAddress": "1.2.3.4",
            "rcvrSrcAddress": "1.2.3.4",
            "rcvrVrfName": "Vrf_1"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <rcvrAddress>1.2.3.4</rcvrAddress>
        <rcvrSrcAddress>1.2.3.4</rcvrSrcAddress>
        <rcvrVrfName>Vrf_1</rcvrVrfName>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow collector-ip 1.2.3.4 vrf Vrf_1 source 1.2.3.4


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
rcvrAddresssflow:addressIp
(address:Ip)
The IP address of the sFlow collector. If set to 0.0.0.0 not sFlow datagrams will be sent.Value must match ipv4 format
rcvrSrcAddresssflow:addressIp
(address:Ip)
The source ip-address option causes the sent sFlow datagram to use the source IP address as the IP packet source address.Value must match ipv4 format
rcvrVrfNamesflow:VrfName
(l3:VrfName)
It holds collector vrf name
DEFAULT: default


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the Source IP Address to Send to the sFlow Collector

Deleting the Source IP Address to Send to the sFlow Collector 
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "rcvrAddress": "0.0.0.0",
            "rcvrSrcAddress": "0.0.0.0",
            "rcvrVrfName": "default"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <rcvrAddress>0.0.0.0</rcvrAddress>
        <rcvrSrcAddress>0.0.0.0</rcvrSrcAddress>
        <rcvrVrfName>default</rcvrVrfName>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow collector-ip 1.2.3.4 vrf Vrf_1 source 1.2.3.4


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
rcvrAddresssflow:addressIp
(address:Ip)
The IP address of the sFlow collector. If set to 0.0.0.0 not sFlow datagrams will be sent.Value must match ipv4 format
rcvrSrcAddresssflow:addressIp
(address:Ip)
The source ip-address option causes the sent sFlow datagram to use the source IP address as the IP packet source address.Value must match ipv4 format
rcvrVrfNamesflow:VrfName
(l3:VrfName)
It holds collector vrf name
DEFAULT: default


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the sFlow Agent IP Address

Configuring the sFlow Agent IP Address
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "agentAddress": "1.2.3.4"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <agentAddress>1.2.3.4</agentAddress>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow agent-ip 1.2.3.4


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInst sys/hwtelemetry/sflow/inst


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
agentAddresssflow:addressIp
(address:Ip)
The IP address associated with this agent. In the case of a multi-homed agent, this should be the loopback address of the agent.The address should be an invariant that does not change as interfaces are reconfigured, enabled, disabled, added or removedValue must match ipv4 format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the sFlow Agent IP Address

Deleting the sFlow Agent IP Address
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "agentAddress": "0.0.0.0"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <agentAddress>0.0.0.0</agentAddress>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow agent-ip 1.2.3.4


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInst sys/hwtelemetry/sflow/inst


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
agentAddresssflow:addressIp
(address:Ip)
The IP address associated with this agent. In the case of a multi-homed agent, this should be the loopback address of the agent.The address should be an invariant that does not change as interfaces are reconfigured, enabled, disabled, added or removedValue must match ipv4 format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the sFlow Collector UDP Port

Configuring the sFlow Collector UDP Port 
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "rcvrPort": "123"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <rcvrPort>123</rcvrPort>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow collector-port 123


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
rcvrPortsflow:L4Port
(scalar:Uint32)
The destination port for sFlow datagrams.
RANGE: [1 , 65535]
DEFAULT: 6343


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the sFlow Collector UDP Port

Deleting the sFlow Collector UDP Port 
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "rcvrPort": "6343"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <rcvrPort>6343</rcvrPort>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow collector-port 123


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
rcvrPortsflow:L4Port
(scalar:Uint32)
The destination port for sFlow datagrams.
RANGE: [1 , 65535]
DEFAULT: 6343


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the sFlow Counter Poll Interval

Configuring the sFlow Counter Poll Interval
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "counterPollInterval": "123"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <counterPollInterval>123</counterPollInterval>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow counter-poll-interval 123


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
counterPollIntervalsflow:counterPollInterval
(scalar:Uint32)
The maximum number of seconds between successive samples of the counters associated with this data source
RANGE: [0 , 2147483647]
DEFAULT: 20


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the sFlow Counter Poll Interval

Deleting the sFlow Counter Poll Interval
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "counterPollInterval": "20"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <counterPollInterval>20</counterPollInterval>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow counter-poll-interval 123


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
counterPollIntervalsflow:counterPollInterval
(scalar:Uint32)
The maximum number of seconds between successive samples of the counters associated with this data source
RANGE: [0 , 2147483647]
DEFAULT: 20


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the sFlow Data Source Interface (Ethernet)

Configuring the sFlow Data Source Interface (Ethernet)
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow/inst.json
{
  "sflowInst": {
    "children": [
      {
        "sflowSflowFsDataSource": {
          "attributes": {
            "id": "eth1/2"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <datasource-items>
          <SflowFsDataSource-list>
            <id>eth1/2</id>
          </SflowFsDataSource-list>
        </datasource-items>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow data-source interface ethernet 1/2


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowFsDataSourcesys/hwtelemetry/sflow/inst/datasource-[eth1/2]
sflowSflowFsDataSourcesys/hwtelemetry/sflow/inst/datasource-[po123]


sflowSflowFsDataSource Properties

The following table contains information about the sflowSflowFsDataSource properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
idnw:IfId
(base:IfIndex)
The interface id for sFlow datasource.Must match first field in the output of `show intf brief`. Example: Eth1/1


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the sFlow Data Source Interface (Ethernet)

Deleting the sFlow Data Source Interface (Ethernet)
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow/inst.json
{
  "sflowInst": {
    "children": [
      {
        "sflowSflowFsDataSource": {
          "attributes": {
            "id": "eth1/2",
            "status": "deleted"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <datasource-items>
          <SflowFsDataSource-list xc:operation="delete">
            <id>eth1/2</id>
          </SflowFsDataSource-list>
        </datasource-items>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow data-source interface ethernet 1/2


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowFsDataSourcesys/hwtelemetry/sflow/inst/datasource-[eth1/2]
sflowSflowFsDataSourcesys/hwtelemetry/sflow/inst/datasource-[po123]


sflowSflowFsDataSource Properties

The following table contains information about the sflowSflowFsDataSource properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
idnw:IfId
(base:IfIndex)
The interface id for sFlow datasource.Must match first field in the output of `show intf brief`. Example: Eth1/1
statusmo:ModificationStatus
(scalar:Bitmask32)
Modification statusSELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the sFlow Data Source Interface (Port Channel)

Configuring the sFlow Data Source Interface (Port Channel) 
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow/inst.json
{
  "sflowInst": {
    "children": [
      {
        "sflowSflowFsDataSource": {
          "attributes": {
            "id": "po123"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <datasource-items>
          <SflowFsDataSource-list>
            <id>po123</id>
          </SflowFsDataSource-list>
        </datasource-items>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow data-source interface port-channel 123


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowFsDataSourcesys/hwtelemetry/sflow/inst/datasource-[eth1/2]
sflowSflowFsDataSourcesys/hwtelemetry/sflow/inst/datasource-[po123]


sflowSflowFsDataSource Properties

The following table contains information about the sflowSflowFsDataSource properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
idnw:IfId
(base:IfIndex)
The interface id for sFlow datasource.Must match first field in the output of `show intf brief`. Example: PO1


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the sFlow Data Source Interface (Port Channel)

Deleting the sFlow Data Source Interface (Port Channel) 
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow/inst.json
{
  "sflowInst": {
    "children": [
      {
        "sflowSflowFsDataSource": {
          "attributes": {
            "id": "po123",
            "status": "deleted"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <datasource-items>
          <SflowFsDataSource-list xc:operation="delete">
            <id>po123</id>
          </SflowFsDataSource-list>
        </datasource-items>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow data-source interface port-channel 123


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowFsDataSourcesys/hwtelemetry/sflow/inst/datasource-[eth1/2]
sflowSflowFsDataSourcesys/hwtelemetry/sflow/inst/datasource-[po123]


sflowSflowFsDataSource Properties

The following table contains information about the sflowSflowFsDataSource properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
idnw:IfId
(base:IfIndex)
The interface id for sFlow datasource.Must match first field in the output of `show intf brief`. Example: PO1
statusmo:ModificationStatus
(scalar:Bitmask32)
Modification statusSELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the sFlow Datagram Size

Configuring the sFlow Datagram Size
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "rcvrMaxDatagramSize": "250"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <rcvrMaxDatagramSize>250</rcvrMaxDatagramSize>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow max-datagram-size 250


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
rcvrMaxDatagramSizesflow:maxDatagramSize
(scalar:Uint32)
The maximum number of data bytes that can be sent in a single sample datagram
RANGE: [200 , 9000]
DEFAULT: 1400


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the sFlow Datagram Size

Deleting the sFlow Datagram Size
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "rcvrMaxDatagramSize": "1400"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <rcvrMaxDatagramSize>1400</rcvrMaxDatagramSize>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow max-datagram-size 250


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
rcvrMaxDatagramSizesflow:maxDatagramSize
(scalar:Uint32)
The maximum number of data bytes that can be sent in a single sample datagram
RANGE: [200 , 9000]
DEFAULT: 1400


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the sFlow Sampled Size

Configuring the sFlow Sampled Size
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "maxHeaderSize": "205"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <maxHeaderSize>205</maxHeaderSize>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow max-sampled-size 205


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
maxHeaderSizesflow:maxSampledSize
(scalar:Uint32)
The maximum number of bytes that should be copied from a sampled packet. The agent may have an internal maximum and minimum permissible sizes
RANGE: [64 , 256]
DEFAULT: 128


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the sFlow Sampled Size

Deleting the sFlow Sampled Size
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "maxHeaderSize": "128"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <maxHeaderSize>128</maxHeaderSize>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow max-sampled-size 205


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
maxHeaderSizesflow:maxSampledSize
(scalar:Uint32)
The maximum number of bytes that should be copied from a sampled packet. The agent may have an internal maximum and minimum permissible sizes
RANGE: [64 , 256]
DEFAULT: 128


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the sFlow Sampling Rate

Configuring the sFlow Sampling Rate
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "pktSamplingRate": "5000"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <pktSamplingRate>5000</pktSamplingRate>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

sflow sampling-rate 5000


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
pktSamplingRatesflow:samplingRate
(scalar:Uint32)
The statistical sampling rate for packet sampling from this source
RANGE: [4096 , 1000000000]
DEFAULT: 4096


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the sFlow Sampling Rate

Deleting the sFlow Sampling Rate
POST http://<mgmt0_IP>/api/mo/sys/hwtelemetry/sflow.json
{
  "sflowSflow": {
    "children": [
      {
        "sflowInst": {
          "attributes": {
            "pktSamplingRate": "4096"
}}}]}}
{
    imdata:[]
}
<System>
  <hwtelemetry-items>
    <sflow-items>
      <inst-items>
        <pktSamplingRate>4096</pktSamplingRate>
      </inst-items>
    </sflow-items>
  </hwtelemetry-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no sflow sampling-rate 5000


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
sflowInstsys/hwtelemetry/sflow/inst
sflowSflowsys/hwtelemetry/sflow


sflowInst Properties

The following table contains information about the sflowInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
pktSamplingRatesflow:samplingRate
(scalar:Uint32)
The statistical sampling rate for packet sampling from this source
RANGE: [4096 , 1000000000]
DEFAULT: 4096


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html