1 .. contents:: Table of Contents
8 https://git.opendaylight.org/gerrit/#/q/topic:netvirt-counters
10 The feature enables getting statistics on ports and switches.
16 Being able to ask for statistics, given as input Netvirt identifiers.
17 It will enable filtering the results and having aggregated result.
18 In a later stage, it will be also used to get element to element counters.
19 Examples for possible filters: RX only, TX only, port + VLAN counters...
24 * Getting port counters, given its interface id (ietf interface name).
25 * Getting node counters, given its node id.
27 Port counters can be useful also to get statistics on traffic going into tunnels
28 when requesting it from the tunnel endpoint port.
29 In addition, there will also be support in aggregated results. For example:
30 Getting the total number of transmitted packets from a given switch.
35 Adding a new bundle named "statistics-plugin" to Netvirt.
36 This bundle will be responsible for converting the Netvirt unique identifiers into OpenFlow ones,
37 and will get the relevant statistics by using OpenFlowPlugin capabilities.
38 It will also be responsible of validating and filtering the results.
39 It will be able to provide a wide range of aggregated results in the future.
41 Work flow description: Once a port statistics request is received, it is translated to a port statistics request from openflow plugin. Once the transaction is received, the data is validated and translated to a user friendly data. The user will be notified if a timeout occurs.
42 In case of a request for aggregated counters, the user will receive a single counter result divided to groups (such as "bits", "packets"...). The counters in each group will be the sum of all of the matching counters for all ports.
43 Neither one of the counter request nor the counter response will not be stored in the configuration database. Moreover, requests are not periodic and they are on demand only.
51 The new plugin introduced will have the following models:
79 leaf-list groupFilters {
82 leaf-list counterFilter {
87 rpc getNodeConnectorCounters {
110 rpc getNodeAggregatedCounters {
124 ---------------------
127 Clustering considerations
128 -------------------------
131 Other Infra considerations
132 --------------------------
135 Security considerations
136 -----------------------
139 Scale and Performance Impact
140 ----------------------------
149 Getting the statistics from OpenFlow flows: it would be possible to target the appropriate rules in ingress/egress tables, and count the hits on these flows. The reason we decided to work with ports instead is because we don't want to be dependent on flow structure changes.
153 * Create router, network, VMS, VXLAN tunnel.
154 * Connect to one of the VMs, send ping ping to the other VM.
155 * Use REST to get the statistics.
161 http://10.0.77.135:8181/restconf/operational/ietf-interfaces:interfaces-state/
163 Choose a port id and use the following REST in order to get the statistics:
167 10.0.77.135:8181/restconf/operations/statistics-plugin:getNodeConnectorCounters, input={"input":{"portId":"b99a7352-1847-4185-ba24-9ecb4c1793d9"}}, headers={Authorization=Basic YWRtaW46YWRtaW4=, Cache-Control=no-cache, Content-Type=application/json}]
174 http://10.0.77.135:8181/restconf/config/odl-interface-meta:bridge-interface-info/
176 Choose a node dpId and use the following REST in order to get the statistics:
180 10.0.77.135:8181/restconf/operations/statistics-plugin:getNodeCounters, input=
181 {"input": { "portId": "b99a7352-1847-4185-ba24-9ecb4c1793d9","groups": [{ "name": "byte*",
185 "name": "transmitted*",
189 headers={Authorization=Basic YWRtaW46YWRtaW4=, Cache-Control=no-cache, Content-Type=application/json}]
193 10.0.77.135:8181/restconf/operations/statistics-plugin:getNodeAggregatedCounters, input=
194 {"input": { "portId": "b99a7352-1847-4185-ba24-9ecb4c1793d9","groups": [{ "name": "byte*",
198 "name": "transmitted*",
202 headers={Authorization=Basic YWRtaW46YWRtaW4=, Cache-Control=no-cache, Content-Type=application/json}]
204 Example for a filtered request:
208 10.0.77.135:8181/restconf/operations/statistics-plugin:getPortCounters, input={"input": {"portId":"b99a7352-1847-4185-ba24-9ecb4c1793d9"} }, headers={Authorization=Basic YWRtaW46YWRtaW4=, Cache-Control=no-cache, Content-Type=application/json}]
210 An example for node connector counters result:
218 "id": "openflow:194097926788804:5",
224 "name": "durationNanoSecondCount",
228 "name": "durationSecondCount",
237 "name": "bytesReceivedCount",
241 "name": "bytesTransmittedCount",
250 "name": "packetsReceivedCount",
254 "name": "packetsTransmittedCount",
265 An example for node counters result:
273 "id": "openflow:194097926788804:3",
279 "name": "durationNanoSecondCount",
283 "name": "durationSecondCount",
292 "name": "bytesReceivedCount",
296 "name": "bytesTransmittedCount",
305 "name": "packetsReceivedCount",
309 "name": "packetsTransmittedCount",
317 "id": "openflow:194097926788804:2",
323 "name": "durationNanoSecondCount",
327 "name": "durationSecondCount",
336 "name": "bytesReceivedCount",
340 "name": "bytesTransmittedCount",
349 "name": "packetsReceivedCount",
353 "name": "packetsTransmittedCount",
361 "id": "openflow:194097926788804:1",
367 "name": "durationNanoSecondCount",
371 "name": "durationSecondCount",
380 "name": "bytesReceivedCount",
384 "name": "bytesTransmittedCount",
393 "name": "packetsReceivedCount",
397 "name": "packetsTransmittedCount",
405 "id": "openflow:194097926788804:LOCAL",
411 "name": "durationNanoSecondCount",
415 "name": "durationSecondCount",
424 "name": "bytesReceivedCount",
428 "name": "bytesTransmittedCount",
437 "name": "packetsReceivedCount",
441 "name": "packetsTransmittedCount",
449 "id": "openflow:194097926788804:5",
455 "name": "durationNanoSecondCount",
459 "name": "durationSecondCount",
468 "name": "bytesReceivedCount",
472 "name": "bytesTransmittedCount",
481 "name": "packetsReceivedCount",
485 "name": "packetsTransmittedCount",
498 odl-netvirt-openflowplugin-genius-openstack
514 Guy Regev <guy.regev@hpe.com>
522 https://trello.com/c/ZdoLQWoV/126-netvirt-statistics
524 * Support port counters.
525 * Support node counters.
526 * Support aggregated results.
527 * Support filters on results.
538 Capture details of testing that will need to be added.
557 This template was derived from [2], and has been modified to support our project.
559 This work is licensed under a Creative Commons Attribution 3.0 Unported License.
560 http://creativecommons.org/licenses/by/3.0/legalcode