Control Plane Manager (CPMan) adds management capability to control plane in a way to provide higher availability and reliability for ONOS.
The features of CPMan are comprised of two parts: 1) control plane monitoring, 2) enhanced mastership management.
- Control plane monitoring: CPMan monitors various types of control plane metrics that include control message, system metrics.
We collect stats information for six types of control message and those are PACKET_IN, PACKET_OUT, FLOW_MOD, FLOW_REMOVED, STATS_REQUEST, STATS_REPLY.
We also collect stats information for four types of system metrics that include CPU, memory, disk I/O, network I/O.
Note that the monitoring granularity is 1 minute.
- Enhanced mastership management: Work-In-Progress.
Control message subsystem
This subsystem is used to aggregate and collect various types of control message from network devices. Followings are the components of the subsystem.
- Collect and aggregate OpenFlow messages. Note that message aggregation relies on MetricsService.
- Abstract OpenFlow message into protocol agnostic control message type.
- Transfer the aggregated control message statistics to application layer.
- Query and store control message statistics into Round-Robin-Database (RRD) through ControlPlaneMonitor service.
- Note that, RRD stores the statistic information for 24-hours, and the upcoming data will gradually overwrites the data that is stored previously.
Following table shows the mapping between abstracted message type and OpenFlow message type.
|Abstracted Message Type
|OpenFlow Message Type
Before you start, you will need followings:
- Ubuntu 14.04 64-bit
- 2GB or more RAM
- 2 or more processors
ONOS, mininet Installation and CPMan Activation
Install and run ONOS instance. The detailed procedures can be refer from here.
To collect control message, we also need to deploy a set of devices and connect to ONOS.
This can be realizable by setting up an OpenFlow network using mininet.
Mininet installation and configuration can be referred from http://mininet.org/download/.
After ONOS and mininet get initialized, we can activate CPMan application.
As long as CPMan is activated, it automatically senses control messages and stores stats. into local RRD.
If you want to collect system metrics (e.g., CPU, memory usages, disk I/O, etc.), please refer to this link.
Command Line Interface (CLI)
The statistics information of control metrics can be queried through CLI.
In ONOS console, you can type following command to view control message stats.
You also can query other control metrics by specifying the control metric type such as cpu, memory, disk, network, etc.
We also provide a way to query and collect control metrics through REST API.
Followings are the REST API for collecting and querying control metrics.
|Collects CPU metrics.
|Collects network I/O metrics include in/out-bound packets/bytes statistics.
|Collects disk I/O metrics include read and write bytes.
|Collects system information.
|Collects memory metrics.
|List memory metrics of all network resources.
|List control message metrics of all devices.
|List control message metrics of a given device.
|List CPU metrics.
|List disk metrics of all disk resources.
Web Graphic User Interface (GUI)
CPMan also provides a way to visualize the control metrics using bar/line chart.
You can find the CPMan GUI under network category in ONOS GUI.
By default, CPMan shows a bar chart of control message stats. per device.
A detailed time-series line chart can be visualizable by clicking each bar chart.
Export Metrics to Third-party System
If you already have your own monitoring system, you may want to export ONOS control metrics to third-party system.
ONOS provides two ways to support metrics export.
The first way is pull based approach with which you need to periodically pull the control metrics from your system through ONOS REST API.
The detailed REST API can be referred from this link.
The second way is push based approach with which ONOS periodically reports a set of control metrics to predefined third-party system.
By far, ONOS supports three systems and those are InfluxDB, ganglia and graphite monitoring system.
The detailed explanation on exporting the metrics to those system can be referred from following links.