4 This page contains high level detail about the statistics collection
5 mechanism in new OpenFlow plugin.
7 [[statistics-collection-in-new-openflow-plugin]]
8 ====== Statistics collection in new OpenFlow plugin
10 New OpenFlow plugin collects following statistics from OpenFlow enabled node(switch):
12 . Individual Flow Statistics
13 . Aggregate Flow Statistics
14 . Flow Table Statistics
27 At a high level statistics collection mechanism is divided into
31 https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=tree;f=opendaylight/md-sal/model/model-flow-statistics;h=3488133625ccf18d023bc59aa35c38e922b17d8d;hb=HEAD[YANG
32 models, service APIs and notification interfaces] are defined in the
35 . Service APIs (RPCs) defined in yang models are implemented by
36 OpenFlow plugin. Notification interfaces are wired up by OpenFlow plugin
39 . Statistics Manager Module: This module use service APIs implemented by OpenFlow
40 plugin to send statistics requests to all the connected OpenFlow enabled
41 nodes. Module also implements notification interfaces to receive
42 statistics response from nodes. Once it receives statistics response, it
43 augment all the statistics data to the relevant element of the node
44 (like node-connector, flow, table,group, meter) and store it in MD-SAL
45 operational data store.
47 [[details-of-statistics-collection]]
48 ====== Details of statistics collection
50 * Current implementation collects above mentioned statistics (except
51 10-14) at a periodic interval of 15 seconds.
52 * Statistics mentioned in 10 to 14 are only fetched when any node
53 connects to the controller because these statistics are just static
54 details about the respective elements.
55 * Whenever any new element is added to node (like flow, group, meter,
56 queue) it sends statistics request immediately to fetch the latest
57 statistics and store it in the operational data store.
58 * Whenever any element is deleted from the node, it immediately remove
59 the relevant statistics from operational data store.
60 * Statistics data are augmented to their respective element stored in
61 the configuration data store. E.g Controller installed flows are stored
62 in configuration data store. Whenever Statistics Manager receive
63 statistics data related to these flow, it search the corresponding flow
64 in the configuration data store and augment statistics in the
65 corresponding location in operational data store. Similar approach is
66 used for other elements of the node.
67 * Statistics Manager stores flow statistics as an unaccounted flow
68 statistics in operational data store if there is no corresponding flow
69 exist in configuration data store. ID format of unaccounted flow
70 statistics is as follows - [#UF$TABLE**Unaccounted-flow-count - e.g
72 * All the unaccounted flows will be cleaned up periodically after every
73 two cycle of flow statistics collection, given that there is no update
74 for these flows in the last two cycles.
75 * Statistics Manager only entertains statistics response for the request
76 sent by itself. User can write its own statistics collector using the
77 statistics service APIs and notification defined in yang models, it
78 won't effect the functioning of Statistics Manager.
79 * OpenFlow 1.0 don't have concept of Meter and Group, so Statistics
80 Manager don't send any group & meter related statistics request to
81 OpenFlow 1.0 enabled switch.
83 [[restconf-uris-to-access-statistics-of-various-node-elements]]
84 ====== RESTCONF Uris to access statistics of various node elements
86 * Aggregate Flow Statistics & Flow Table Statistics
88 ------------------------------------------------------------------------------------------------------------------
89 GET http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/table/{table-id}
90 ------------------------------------------------------------------------------------------------------------------
92 * Individual Flow Statistics from specific table
94 ---------------------------------------------------------------------------------------------------------------------------------
95 GET http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/table/{table-id}/flow/{flow-id}
96 ---------------------------------------------------------------------------------------------------------------------------------
98 * Group Features & Meter Features Statistics
100 -------------------------------------------------------------------------------------------------
101 GET http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}
102 -------------------------------------------------------------------------------------------------
104 * Group Description & Group Statistics
106 ------------------------------------------------------------------------------------------------------------------
107 GET http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/group/{group-id}
108 ------------------------------------------------------------------------------------------------------------------
110 * Meter Configuration & Meter Statistics
112 ------------------------------------------------------------------------------------------------------------------
113 GET http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/meter/{meter-id}
114 ------------------------------------------------------------------------------------------------------------------
116 * Node Connector Statistics
118 ------------------------------------------------------------------------------------------------------------------------------------
119 GET http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/node-connector/{node-connector-id}
120 ------------------------------------------------------------------------------------------------------------------------------------
124 -----------------------------------------------------------------------------------------------------------------------------------------------------
125 GET http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/node-connector/{node-connector-id}/queue/{queue-id}
126 -----------------------------------------------------------------------------------------------------------------------------------------------------
131 For more details and queuries, please send mail to openflowplugin-dev@lists.opendaylight.org or avishnoi@in.ibm.com If you want to report any bug in statistics collection, please use https://bugs.opendaylight.org[bugzilla].