Querying Interface and VLAN Counters and Statistics
The NX-API REST provides HTTP GET requests that query interface statistics and VLAN statistics. The information returned from these queries is useful in monitoring the performance of the switch.
Querying RMON Dot3 Ethernet Statistics
Querying RMON Dot3 Ethernet Statistics
GET http://<IP_Address>/api/node/mo/sys/intf/phys-[eth3/2]/dbgDot3Stats.json
{
"rmonDot3Stats": {
"attributes": {
"alignmentErrors": "0",
"babble": "0",
"carrierSenseErrors": "0",
"childAction": "",
"clearTs": "never",
"controlInUnknownOpcodes": "0",
"deferredTransmissions": "0",
"dn": "sys/intf/phys-[eth3/2]/dbgDot3Stats",
"excessiveCollisions": "0",
"fCSErrors": "0",
"frameTooLongs": "0",
"inPauseFrames": "0",
"inputdribble": "0",
"internalMacReceiveErrors": "0",
"internalMacTransmitErrors": "0",
"lateCollisions": "0",
"lostCarrierErrors": "0",
"modTs": "never",
"multipleCollisionFrames": "0",
"noCarrierErrors": "0",
"outPauseFrames": "0",
"runts": "0",
"sQETTestErrors": "0",
"singleCollisionFrames": "0",
"status": "",
"symbolErrors": "0"
}
}
}
The HTTP request shown in this section shows how to query RMON Dot3 Ethernet Statistics for a specified Ethernet interface. For detailed information on Dot3 Ethernet Statistics, see RFC 3635, " Definitions of Managed Objects for the Ethernet-like Interface Types" at the following URL.
https://tools.ietf.org/html/rfc3635
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
Querying Ethernet Statistics
Querying Ethernet Statistics
GET http://<IP_Address>/api/node/mo/sys/intf/phys-[eth1/1]/dbgEtherStats.json
{
"totalCount": "1",
"imdata": [
{
"rmonEtherStats": {
"attributes": {
"broadcastPkts": "0",
"cRCAlignErrors": "0",
"childAction": "",
"clearTs": "never",
"collisions": "0",
"dn": "sys/intf/phys-[eth1/1]/dbgEtherStats",
"dropEvents": "0",
"fragments": "0",
"ifdowndrop": "0",
"ignored": "0",
"jabbers": "0",
"modTs": "never",
"multicastPkts": "0",
"octets": "0",
"overrun": "0",
"oversizePkts": "0",
"pkts": "0",
"pkts1024to1518Octets": "0",
"pkts128to255Octets": "0",
"pkts256to511Octets": "0",
"pkts512to1023Octets": "0",
"pkts64Octets": "0",
"pkts65to127Octets": "0",
"rXNoErrors": "0",
"rxOversizePkts": "0",
"status": "",
"tXNoErrors": "0",
"txOversizePkts": "0",
"underrun": "0",
"undersizePkts": "0",
"watchdog": "0"
}
}
}
]
}
The example in this section queries Ethernet statistics for interrace eth1/1. For a description of the Ethernet statistics, see RFC 2819 at the following URL:
https://tools.ietf.org/html/rfc2819
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
Querying RMON High Capacity Interface Input Statistics
Querying RMON High Capacity Interface Input Statistics
GET http://<IP_Address>/api/node/mo/sys/intf/phys-[eth1/1]/dbgIfHCIn.json
{
"totalCount": "1",
"imdata": [
{
"rmonIfHCIn": {
"attributes": {
"broadcastPkts": "0",
"childAction": "",
"clearTs": "never",
"dn": "sys/intf/phys-[eth1/1]/dbgIfHCIn",
"modTs": "never",
"multicastPkts": "0",
"octets": "0",
"status": "",
"ucastPkts": "0"
}
}
}
]
}
The example in this section queries high capacity interface input statistics for interface eth1/1.
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
Querying RMON High Capacity Interface Output Statistics
Querying RMON High Capacity Interface Output Statistics
GET http://<IP_Address>/api/node/mo/sys/intf/phys-[eth1/1]/dbgIfHCOut.json
{
"totalCount": "1",
"imdata": [
{
"rmonIfHCOut": {
"attributes": {
"broadcastPckts": "0",
"broadcastPkts": "0",
"childAction": "",
"clearTs": "never",
"dn": "sys/intf/phys-[eth1/1]/dbgIfHCOut",
"modTs": "never",
"multicastPkts": "0",
"octets": "0",
"status": "",
"ucastPkts": "0"
}
}
}
]
}
The example in this section queries high capacity interface output statistics for interface eht1/1.
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
Querying Interface Input Counters
d
Querying Interface Input Counters
GET http://172.31.200.187/api/node/mo/sys/intf/phys-[eth1/1]/dbgIfIn.json
{
"totalCount": "1",
"imdata": [
{
"rmonIfIn": {
"attributes": {
"broadcastPkts": "0",
"childAction": "",
"clearTs": "never",
"discards": "0",
"dn": "sys/intf/phys-[eth1/1]/dbgIfIn",
"errors": "0",
"modTs": "never",
"multicastPkts": "0",
"nUcastPkts": "0",
"noBuffer": "0",
"octetRate": "0",
"octets": "0",
"packetRate": "0",
"rateInterval": "738263040",
"status": "",
"ucastPkts": "0",
"unknownEtype": "0",
"unknownProtos": "0"
}
}
}
]
}
The example in this section queries interface input counters for interface eth1/1.
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
Querying Interface Output Counters
Querying Interface Output Counters
GET http://<IP_Address>/api/node/mo/sys/intf/phys-[eth1/1]/dbgIfOut.json
{
"totalCount": "1",
"imdata": [
{
"rmonIfOut": {
"attributes": {
"broadcastPkts": "0",
"childAction": "",
"clearTs": "never",
"discards": "0",
"dn": "sys/intf/phys-[eth1/1]/dbgIfOut",
"errors": "0",
"modTs": "never",
"multicastPkts": "0",
"nUcastPkts": "0",
"octetRate": "0",
"octets": "0",
"packetRate": "0",
"qLen": "0",
"rateInterval": "738263040",
"status": "",
"ucastPkts": "0"
}
}
}
]
}
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
Querying VLAN Statistics
Querying VLAN Statistics
GET http://<IP_Address>/api/node/mo/sys/bd/bd-[vlan-1].json?query-target=subtree
{
"totalCount": "3",
"imdata": [
{
"l2EpRetPol": {
"attributes": {
"bounceAgeIntvl": "630",
"bounceTrig": "protocol",
"childAction": "",
"descr": "",
"dn": "sys/bd/bd-[vlan-1]/epret",
"holdIntvl": "300",
"lcOwn": "local",
"localEpAgeIntvl": "900",
"modTs": "2015-08-06T17:51:01.934+00:00",
"moveFreq": "256",
"name": "",
"remoteEpAgeIntvl": "300",
"status": ""
}
}
},
{
"l2VlanStats": {
"attributes": {
"childAction": "",
"clearTs": "never",
"dn": "sys/bd/bd-[vlan-1]/dbgVlanStats",
"inBcastOctets": "0",
"inBcastPkts": "0",
"inL3UcastOctets": "0",
"inL3UcastPkts": "0",
"inMcastOctets": "0",
"inMcastPkts": "0",
"inUcastOctets": "0",
"inUcastPkts": "0",
"modTs": "never",
"outUcastOctets": "0",
"outUcastPkts": "0",
"status": ""
}
}
},
{
"l2BD": {
"attributes": {
"accEncap": "unknown",
"adminSt": "active",
"bdDefDn": "",
"bridgeMode": "mac",
"childAction": "",
"createTs": "1970-01-01T00:00:00.000+00:00",
"ctrl": "",
"dn": "sys/bd/bd-[vlan-1]",
"epOperSt": "",
"fabEncap": "vlan-1",
"fwdCtrl": "mdst-flood",
"fwdMode": "bridge,route",
"hwId": "0",
"id": "1",
"lcOwn": "local",
"modTs": "2015-08-06T17:51:01.934+00:00",
"mode": "CE",
"monPolDn": "",
"name": "",
"operSt": "down",
"pcTag": "any",
"status": "",
"type": "bd-regular",
"unkMacUcastAct": "proxy",
"unkMcastAct": "flood",
"vlanmgrCfgFailedBmp": "",
"vlanmgrCfgFailedTs": "00:00:00:00.000",
"vlanmgrCfgState": "0"
}
}
}
]
}
You can also query VLAN statistics objects for a specified VLAN. The example in this section queries the VLAN statistics objects for VLAN-1.
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