Statistics
Get Interface Counters
Request URL
api/info/opbport/stats
Description
Use this API to get abridged port statistics.
Method
GET
Request Body
NA
Response Body
{"Ethernet1_1": {"IF_IN_OCTETS": 0, "IF_IN_UCAST_PKTS": 0, "IF_IN_NON_UCAST_PKTS": 0, "IF_IN_DISCARDS": 0, "IF_IN_ERRORS": 0, "IF_OUT_OCTETS": 0, "IF_OUT_UCAST_PKTS": 0, "IF_OUT_NON_UCAST_PKTS": 0, "IF_OUT_DISCARDS": 0, "IF_OUT_ERRORS": 0, "IF_IN_MULTICAST_PKTS": 0, "IF_OUT_MULTICAST_PKTS": 0}, "Ethernet2_1":
<.........>
"Ethernet22_1": {"IF_IN_OCTETS": 0, "IF_IN_UCAST_PKTS": 0, "IF_IN_NON_UCAST_PKTS": 0, "IF_IN_DISCARDS": 0, "IF_IN_ERRORS": 0, "IF_OUT_OCTETS": 0, "IF_OUT_UCAST_PKTS": 0, "IF_OUT_NON_UCAST_PKTS": 0, "IF_OUT_DISCARDS": 0, "IF_OUT_ERRORS": 0, "IF_IN_MULTICAST_PKTS": 0, "IF_OUT_MULTICAST_PKTS": 0}}
Status code
SERVER_ERROR(500) if there is any error with the server
OK(200) if the request completes successfully
Get Interface Counters <eth_name>
Request URL
api/info/opbport/stats/<eth_name>
Description
Use this API to get abridged port statistics for specific port.
Method
GET
Request Body
NA
Response Body
{"Ethernet12_1": {"IF_IN_OCTETS": 0, "IF_IN_UCAST_PKTS": 0, "IF_IN_NON_UCAST_PKTS": 0, "IF_IN_DISCARDS": 0, "IF_IN_ERRORS": 0, "IF_OUT_OCTETS": 0, "IF_OUT_UCAST_PKTS": 0, "IF_OUT_NON_UCAST_PKTS": 0, "IF_OUT_DISCARDS": 0, "IF_OUT_ERRORS": 0, "IF_IN_MULTICAST_PKTS": 0, "IF_OUT_MULTICAST_PKTS": 0}}
Status code
SERVER_ERROR(500) if there is any error with the server
OK(200) if the request completes successfully
Get Flow rule counters
Request URL
/api/info/flows/<flow-name>/rules/<rule-id>/statistics
Description
Use this API to get the statistics details for the specified flow and rule.
Method
GET
Request Body
NA
Response Body
{
"map_name": "flow1",
"ASIC-Stat-Id": "27",
"rule_id": "1",
"Total-packets-mirrored": "0"
}
Status code
SERVER_ERROR(500) if there is any error with the server
OK(200) if the request completes successfully
Clear Flow counters
Request URL
/api/config/stats/clear/all or /api/config/stats/clear/flows/flow1 or /api/config/stats/clear/flows/flow1/rules/10
Description
Use this API to clear the opb flow/rule/all counters
Method
POST
Request Body
NA
Response Body
NA
Status code
SERVER_ERROR(500) if there is any error with the server
OK(200) if the request completes successful
Clear interface counters
Request URL
/api/interfaces/config/stats/clear
Description
Use this API to clear the interface counters
Method
POST
Request Body
NA
Response Body
NA
Status code
SERVER_ERROR(500) if there is any error with the server
OK(200) if the request completes successfully