Querying Analytic Information
Querying Analytic Statistics
Querying Analytic Statistics
GET http://<IP_Address>/api/mo/sys/analytics/inst-analytics/fwdinst-65793/dbgStatistics.json
{
"totalCount": "1",
"imdata": [
{
"analyticsStatistics": {
"attributes": {
"clearTs": "never",
"dn": "sys/analytics/inst-analytics/fwdinst-65793/dbgStatistics",
"export": "12980",
"flowCreateCe": "0",
"flowCreateIPv4": "12976",
"flowCreateIPv6": "0",
"flowHitCe": "0",
"flowHitIPv4": "0",
"flowHitIPv6": "0",
"lastCollectTs": "0",
"packetsSeen": "14220",
"skipCollect": "1244"
}
}
}
]
}
GET: http://<IP_Address>/restconf/data/Cisco-NX-OS-device:
<analytics-items>
<inst-items>
<Inst-list>
<mode>analytics</mode>
<adminSt>enabled</adminSt>
<collector-items>
<Collector-list>
<name>e2</name>
<dscp>44</dscp>
<dstAddr>10.1.11.2</dstAddr>
<dstPort>2000</dstPort>
<srcIf>lo0</srcIf>
<ver>cisco-v1</ver>
</Collector-list>
<Collector-list>
<name>e5</name>
<dscp>44</dscp>
<dstAddr>10.1.11.5</dstAddr>
<dstPort>5000</dstPort>
<srcIf>lo0</srcIf>
<ver>cisco-v1</ver>
</Collector-list>
<Collector-list>
<name>e3</name>
<dscp>44</dscp>
<dstAddr>10.1.11.3</dstAddr>
<dstPort>3000</dstPort>
<srcIf>lo0</srcIf>
<ver>cisco-v1</ver>
</Collector-list>
<Collector-list>
<name>e1</name>
<dscp>44</dscp>
<dstAddr>10.1.11.1</dstAddr>
<dstPort>1000</dstPort>
<srcIf>lo0</srcIf>
<ver>cisco-v1</ver>
</Collector-list>
<Collector-list>
<name>e4</name>
<dscp>44</dscp>
<dstAddr>10.1.11.4</dstAddr>
<dstPort>4000</dstPort>
<srcIf>lo0</srcIf>
<ver>cisco-v1</ver>
</Collector-list>
</collector-items>
<fwdinst-items>
<FwdInstTarget-list>
<id>65793</id>
<DefPolicy>permit</DefPolicy>
<ceCreate>0</ceCreate>
<ceHit>0</ceHit>
<collectorId>1234</collectorId>
<dbgStatistics-items>
<export>58412</export>
<flowCreateCe>0</flowCreateCe>
<flowCreateIPv4>58408</flowCreateIPv4>
<flowCreateIPv6>0</flowCreateIPv6>
<flowHitCe>0</flowHitCe>
<flowHitIPv4>0</flowHitIPv4>
<flowHitIPv6>0</flowHitIPv6>
<lastCollectTs>0</lastCollectTs>
<packetsSeen>59921</packetsSeen>
<skipCollect>1513</skipCollect>
</dbgStatistics-items>
<dir>in</dir>
<fltType>ipv4</fltType>
<ipv4Create>0</ipv4Create>
<ipv4Hit>0</ipv4Hit>
<ipv6Create>0</ipv6Create>
<ipv6Hit>0</ipv6Hit>
<rspolicyAtt-items>
<tCl>analyticsPolicy</tCl>
<tDn>/System/analytics-items/inst-items/Inst-list[mode='analytics']/policy-items/Policy-list[name='abc']</tDn>
</rspolicyAtt-items>
<rsprofAtt-items>
<tCl>analyticsProfile</tCl>
<tDn>/System/analytics-items/inst-items/Inst-list[mode='analytics']/prof-items/Profile-list[name='h2']</tDn>
</rsprofAtt-items>
</FwdInstTarget-list>
</fwdinst-items>
<monitor-items>
<Monitor-list>
<name>m1</name>
<collectorbucket-items>
<CollectorBucket-list>
<id>1</id>
<hashHi>4095</hashHi>
<hashLo>0</hashLo>
<rscollectorAtt-items>
<RsCollectorAtt-list>
<tDn>/System/analytics-items/inst-items/Inst-list[mode='analytics']/collector-items/Collector-list[name='e1']</tDn>
<tCl>analyticsCollector</tCl>
</RsCollectorAtt-list>
<RsCollectorAtt-list>
<tDn>/System/analytics-items/inst-items/Inst-list[mode='analytics']/collector-items/Collector-list[name='e3']</tDn>
<tCl>analyticsCollector</tCl>
</RsCollectorAtt-list>
</rscollectorAtt-items>
</CollectorBucket-list>
<CollectorBucket-list>
<id>2</id>
<hashHi>4095</hashHi>
<hashLo>2048</hashLo>
<rscollectorAtt-items>
<RsCollectorAtt-list>
<tDn>/System/analytics-items/inst-items/Inst-list[mode='analytics']/collector-items/Collector-list[name='e2']</tDn>
<tCl>analyticsCollector</tCl>
</RsCollectorAtt-list>
<RsCollectorAtt-list>
<tDn>/System/analytics-items/inst-items/Inst-list[mode='analytics']/collector-items/Collector-list[name='e4']</tDn>
<tCl>analyticsCollector</tCl>
</RsCollectorAtt-list>
</rscollectorAtt-items>
</CollectorBucket-list>
</collectorbucket-items>
<rsrecordPAtt-items>
<tCl>analyticsRecordP</tCl>
<tDn>/System/analytics-items/inst-items/Inst-list[mode='analytics']/recordp-items/RecordP-list[name='r1']</tDn>
</rsrecordPAtt-items>
</Monitor-list>
</monitor-items>
<operErr/>
<policy-items>
<Policy-list>
<name>abc</name>
<acl-items>
<MatchAcl-list>
<name>ipv4</name>
<fltType>ipv4</fltType>
</MatchAcl-list>
<MatchAcl-list>
<name>ipv6</name>
<fltType>ipv6</fltType>
</MatchAcl-list>
</acl-items>
</Policy-list>
</policy-items>
<prof-items>
<Profile-list>
<name>h2</name>
<burstIntvlShift>0</burstIntvlShift>
<collectIntvl>100</collectIntvl>
<ipPktIdShift>0</ipPktIdShift>
<mtu>1500</mtu>
<payloadlenbin-items>
<PayloadLenBin-list>
<id>2</id>
<hi>6</hi>
<lo>1</lo>
</PayloadLenBin-list>
<PayloadLenBin-list>
<id>1</id>
<hi>10</hi>
<lo>1</lo>
</PayloadLenBin-list>
</payloadlenbin-items>
<rcvwindowszbin-items>
<RcvWindowSzBin-list>
<id>3</id>
<hi>8</hi>
<lo>1</lo>
</RcvWindowSzBin-list>
<RcvWindowSzBin-list>
<id>2</id>
<hi>7</hi>
<lo>1</lo>
</RcvWindowSzBin-list>
</rcvwindowszbin-items>
<seqNumGuessThreshHi>255</seqNumGuessThreshHi>
<seqNumGuessThreshLo>2</seqNumGuessThreshLo>
<srcPort>555</srcPort>
<tcpopthdrlenbin-items>
<TCPOptHdrLenBin-list>
<id>1</id>
<hi>5</hi>
<lo>1</lo>
</TCPOptHdrLenBin-list>
<TCPOptHdrLenBin-list>
<id>2</id>
<hi>6</hi>
<lo>1</lo>
</TCPOptHdrLenBin-list>
</tcpopthdrlenbin-items>
</Profile-list>
</prof-items>
<recordp-items>
<RecordP-list>
<name>r1</name>
<collect>count-bytes,count-pkts</collect>
<match>dst-ipv4,dst-port,proto,src-ipv4,src-port</match>
</RecordP-list>
</recordp-items>
</Inst-list>
</inst-items>
</analytics-items>
Note: Retrieving analytic statistics requires enabling feature analytics and configuring analytics through a REST POST (pushing all the analytics-related configuration MOs).
Under sys/analytics/inst-analytics/fwdinst-65794/dbgStatistics MO statistics can be found with following counters:
- flowCreateCe
- flowCreateIPv4
- flowCreateIPv6
- flowHitCe
- flowHitIPv4
- flowHitIPv6
- packetsSeen
- export
- skipCollect
- lastCollectTs
Note: The property information for this example was added in Release 9.3(3).
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.
MO | DN |
---|---|
analyticsStatistics | sys/analytics/inst-{mode}/fwdinst-{id}/dbgStatistics |
analyticsStatistics Properties
The following table contains information about the analyticsStatistics 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 Name | Data Type | Description | Values |
---|---|---|---|
clearTs | scalar:Date | Clear timestamp | DATE FORMAT: %Y-%m-%dT%H:%M:%S.%f%z DEFAULT: never |
dn | reference:BinRef | A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. | |
export | scalar:Uint64 | Total number of export packets sent from the slice | RANGE: [0, 18446744073709551615] |
flowCreateCe | scalar:Uint64 | Number of L2 flows created on the slice | RANGE: [0, 18446744073709551615] |
flowCreateIPv4 | scalar:Uint64 | Number of IPv4 flows created on the slice | RANGE: [0, 18446744073709551615] |
flowCreateIPv6 | scalar:Uint64 | Number of IPv6 flows created on the slice | RANGE: [0, 18446744073709551615] |
flowHitCe | scalar:Uint64 | Number of L2 flows hitting the flow table | RANGE: [0, 18446744073709551615] |
flowHitIPv4 | scalar:Uint64 | Number of IPv4 flows hitting the flow table | RANGE: [0, 18446744073709551615] |
flowHitIPv6 | scalar:Uint64 | Number of IPv6 flows hitting the flow table | RANGE: [0, 18446744073709551615] |
lastCollectTs | scalar:Uint64 | Last timestamp when packets were sent to the collector | RANGE: [0, 18446744073709551615] |
packetsSeen | scalar:Uint64 | Total number of packets seen on the slice | RANGE: [0, 18446744073709551615] |
skipCollect | scalar:Uint64 | Total number of packets not accounted for flow creation on the slice | RANGE: [0, 18446744073709551615] |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
Checking if O-Class and O-Port are Enabled
Checking if O-Class and O-Port are Enabled
GET http://<mgmt0_IP>/api/mo/sys/analytics/inst-analytics/capability.json
{
"totalCount": "1",
"imdata": [
{
"analyticsCapability": {
"attributes": {
"bucketHashWidth": "12",
"configLatencyResFactor": "disable",
"dn": "sys/analytics/inst-analytics/capability",
"fabricMode": "standalone",
"numTcamEnt": "488",
"numTcamEntPerV4": "1",
"numTcamEntPerV6": "2",
"oclassSupport": "enable",
"oportSupport": "enable"
}
}
}
]
}
Note: This example was added in Release 9.2(2).
To enable O-Class and O-Port information, first create a cluster then enable analytics.
Note: The property information for this example was added in Release 9.3(3).
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.
MO | DN |
---|---|
analyticsCapability | sys/analytics/inst-{mode}/capability |
analyticsCapability Properties
The following table contains information about the analyticsCapability 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 Name | Data Type | Description | Values |
---|---|---|---|
bucketHashWidth | analytics:HashWidthT (scalar:Uint16) | Bit Width of the Collector Bucket Hash | RANGE: [1 , 255] DEFAULT: 12 |
configLatencyResFactor | analytics:configLatencyResFactorT (scalar:Enum8) | Ability to Configure Resolution Factor | SELECTION: 0 - disable 1 - enable DEFAULT: disable |
dn | reference:BinRef | A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. | |
fabricMode | analytics:CModeT (scalar:Enum8) | Mode to Indicate Platform Type | SELECTION: 0 - aci 1 - standalone DEFAULT: aci |
numTcamEnt | analytics:numTcamEntT (scalar:Uint32) | Number of TCAM Entries | RANGE: [1 , 65535] DEFAULT: 1024 |
numTcamEntPerV4 | analytics:numTcamEntV4T (scalar:Uint16) | Number of TCAM Entries per V4 type | RANGE: [1 , 256] DEFAULT: 1 |
numTcamEntPerV6 | analytics:numTcamEntV6T (scalar:Uint16) | Number of TCAM Entries per V6 type | RANGE: [1 , 256] DEFAULT: 4 |
oclassSupport | analytics:oportSupportT (scalar:Enum8) | Ability to expose Oclass information | SELECTION: 0 - disable 1 - enable DEFAULT: disable |
oportSupport | analytics:oportSupportT (scalar:Enum8) | Ability to expose Oport information | SELECTION: 0 - disable 1 - enable DEFAULT: disable |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
Querying an O-Class
Querying an O-Class
GET http://<mgmt0_IP>/api/mo/sys/analytics/inst-analytics/slot-0/oclass-9.json
{
"totalCount": "1",
"imdata": [
{
"analyticsOclass": {
"attributes": {
"dn": "sys/analytics/inst-analytics/slot-0/oclass-9",
"id": "9",
"priorityMapping": "Class Traffic"
}
}
}
]
}
To enable O-Class and O-Port information, first create a cluster then enable analytics.
Note:
- The class number range is 0 to 9.
- This example was added in Release 9.2(2).
Note: The property information for this example was added in Release 9.3(3).
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.
MO | DN |
---|---|
analyticsOclass | sys/analytics/inst-{mode}/slot-{slotid}/oclass-{id} |
analyticsOclass Properties
The following table contains information about the analyticsOclass 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 Name | Data Type | Description | Values |
---|---|---|---|
dn | reference:BinRef | A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. | |
id | analytics:OclassId (scalar:Uint16) | Egress Port Class ID | RANGE: [0 , 256] DEFAULT: 0 |
priorityMapping | string:Basic | Egree Port Priority Mapping | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
Querying O-Port Information
Querying O-Port Information
GET http://<mgmt0_IP>/api/mo/sys/intf/phys-[eth1/37]/nfmphysif.json
{
"totalCount": "1",
"imdata": [
{
"nfmPhysIf": {
"attributes": {
"asicNum": "0",
"dn": "sys/intf/phys-[eth1/37]/nfmphysif",
"sliceNum": "0",
"sliceSrcId": "40",
"slotNum": "0"
}
}
}
]
}
To enable O-Class and O-Port information, first create a cluster then enable analytics.
Note:
- The interface Id can vary.
- This example was added in Release 9.2(2).
Note: The property information for this example was added in Release 9.3(3).
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.
MO | DN |
---|---|
nfmPhysIf | sys/intf/phys-{[id]}/nfmphysif |
nfmPhysIf Properties
The following table contains information about the nfmPhysIf 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 Name | Data Type | Description | Values |
---|---|---|---|
asicNum | scalar:Uint32 | Asic ID | RANGE: [0, 4294967295] |
dn | reference:BinRef | A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. | |
sliceNum | scalar:Uint32 | Slice ID | RANGE: [0, 4294967295] |
sliceSrcId | scalar:Uint32 | Slice Src ID | RANGE: [0, 4294967295] |
slotNum | scalar:Uint32 | Slot ID | RANGE: [0, 4294967295] |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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: