我尝试使用以下RPC调用来获取统计信息,而不是通过默认的statistics-manager。
POST / restconf / operations / opendaylight - flow - statistics: get - all - flows - statistics - from - all - flow - tables {
"input": {
"node": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id=\"openflow:1000\"]"
}
}
但是,此请求的响应仅为transaction-id
。虽然我可以看到OpenFlow Flow Stat Request
和Flow Stat Reply
消息在控制器和交换机之间交换,但操作数据存储似乎不会因调用上述RPC而更新。我使用以下方法检查运营数据存储区:
GET /restconf/operational/opendaylight-inventory:nodes/node/openflow:1000/table/0
我的问题是:
get-all-flows-statistics-from-all-flow-tables
)获取交换机发送给控制器的流量统计信息?为什么运营数据存储未更新?谢谢!迈克尔。
答案 0 :(得分:1)
使用Boron,您尝试使用的内容已被弃用,因此您应该使用以下内容:
odl-openflowplugin-flow-services
POST /restconf/operations/opendaylight-direct-statistics:get-node-connector-statistics
Host: localhost:8181
Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
{
"input":
{
"node" : "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id=\"openflow:187811733353539\"]" ,
"store-stats" : false
}
}
true
。您还可以仅获取指定端口的统计信息,但在尝试时,它似乎无法正常工作 将其添加到上述有效负载中:
"node-connector-id" : "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id=\"openflow:187811733353539\"]/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:187811733353539:LOCAL']",
而不是LOCAL
,请指定所需的端口。
希望这有帮助, 亚历