SDN Network Statistics and Visualization using Onos and the ELK Stack
1.) Download the SDNFinal.ova VM Image
mkdir ~/sdn-viz && cd ~/sdn-viz
wget https://www.dropbox.com/s/wwzilgm3g3kxebr/SDNFinal.ova?dl=02.) Import the VM Image into VirtualBox
3.) Start the VM and login with the following username and password
username: sdn
password: sdn4.) Build Onos
cd ~/onos
bazel run onos-local Onos has successfully started if you see the following message
Updated node 127.0.0.1 state to READY OR
5.) Use the Onos helper script to start Onos
start-onos-local6.) In a new terminal, clone the repo
cd ~
git clone https://github.com/kprohith/coms6200/7.) Create an Onos app
cd ~/OnosApps
~/onos/tools/dev/bin/onos-create-app Specify the app properties as follows
Define value for property 'groupId': org.hub.app
Define value for property 'artifactId': hub
Define value for property 'version' 1.0-SNAPSHOT: : 1.10.0
Define value for property 'package' org.hub.app8.) Replace hub/pom.xml and src/main/java/org/hub/app/AppComponenet.java with the files from the repo
cp ~/coms6200/pom.xml ~/OnosApps/hub/pom.xml
cp ~/coms6200/AppComponent.java ~/OnosApps/hub/src/main/java/org/hub/app/AppComponent.java9.) Build the app
cd ~/OnosApps/hub
mvn clean install10.) Start Mininet
sudo mno --topo tree,3,2 --mac11.) Sign up for an ElasticCloud account and create a new ElasticCloud deployment
12.) Make a note of the initial configuration details for the deployment - the username and password are show on deployment creation. These arwe your credentials for cloud_auth.
13.) Make a note of the cloud_id bvalue from the deployment details page.
14.) Install logstash
sudo apt-get install logstash15.) Copy logstash configuration file
sudo cp ~/coms6200/logstash.conf /etc/logstash/conf.d/logstash.conf16.) Modify cloud_id and cloud_auth in logstash.conf to your own credentials.
17.) Start logstash
sudo systemctl start logstash.service18.) From a new terminal, Install and activate the app
onos-app localhost install! target/hub-1.10.0.oarThe app has been successfully installed if you see the following message
| 226 - org.hub.app.hub - 1.10.0 | Starting app
| 226 - org.hub.app.hub - 1.10.0 | Writing header19.) Check the log file
cd ~
tail data.csv20.) Go to the ElasticCloud deployment page and click on the Discover tab. You should see the data from the log file.
You can import the Kibana visualizations using the dashboard.json file.