Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hands-on session 2 Monitoring Jose Gonzalez Universidad Politecnica Madrid Attilio Broglio Create-Net

Similar presentations


Presentation on theme: "Hands-on session 2 Monitoring Jose Gonzalez Universidad Politecnica Madrid Attilio Broglio Create-Net"— Presentation transcript:

1 Hands-on session 2 Monitoring Jose Gonzalez Universidad Politecnica Madrid jge@gatv.ssr.upm.es Attilio Broglio Create-Net attilio.broglio@create-net.org

2 Monitoring Dashboard Monitoring single VMs Monitoring inter- domain connectivity Bandwidth Latency Monitoring inter- domain connectivity Bandwidth Latency Overview 25/06/2014Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring2

3 Training Environment (I) Each “node” will be composed of 2 VMs: –Ubuntu 12.04 server 64bit 25/06/2014Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring3 Controller VM Monitoring VM

4 Training Environment (II) Controller VM: –OpenStack (Grizzly) –NRPE Plugin –OpenStack Data Collector-ODC Adapter Monitoring VM: –Nagios (+Event Broker) –NGSI Adapter (+Parsers) –Context Broker (v0.13) –Network Active Monitoring-NAM Adapter 25/06/2014Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring4

5 Training Environment (III) 25/06/2014 Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring5 NGSI Adapter NAM Adapter Monitoring VM ODC Adapter NRPE Plugin Controller VM Event Broker mongoDB Context Broker

6 Steps to follow Download from the FTP the two VMs images Start from a clean Ubuntu 12.04 image Import them in the VirtualBox and … Let’s start!!! 25/06/2014Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring6

7 NAM Installation 1. Check the IP assigned. –$ifconfig 2. Install NAM Adapter in each node Requirements –Install Node.js $ sudo apt-get update $ sudo apt-get install -y python-software-properties python g++ make $ sudo add-apt-repository -y ppa:chris-lea/node.js $ sudo apt-get update $ sudo apt-get install nodejs 25/06/2014Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring7 root@XIFI-SERVER:/home/userxifi# ifconfig eth1 Link encap:Ethernet HWaddr 08:00:27:0e:d8:85 inet addr:192.168.0.80 Bcast:192.168.0.255 Mask:255.255.255.0 ……. root@XIFI-SERVER:/home/userxifi# ifconfig eth1 Link encap:Ethernet HWaddr 08:00:27:0e:d8:85 inet addr:192.168.0.80 Bcast:192.168.0.255 Mask:255.255.255.0 …….

8 –Install mongodb $ sudo apt-get install mongodb –Install iperf $ sudo apt-get install iperf –Install ntp $ sudo apt-get install iperf Install NAM Adapter $ sudo npm nam_adapter 3. Run NAM Adapter $cd node_modules/nam_adapter /nam_adapter/$./NAMadapter start 25/06/2014Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring8 NAM Installation

9 4. Config NAM Adapter http://localhost:3000/config 25/06/2014Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring9 User: userxifi Password: xifiMaster2014 NAM Installation

10 NAM Test Case Each NAM instance will be able to reach other instances 25/06/2014Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring10 NAM

11 Acknowledgments: The research conducted by XIFI receives funding from the European Commission FP7 under grant agreement N°: 604590. The European Commission has no responsibility for the content of this presentation. Thank you for your attention! More information about XIFI: www.fi-xifi.eu/www.fi-xifi.eu/ More information about FI-Ops: www.fi-xifi.eu/fi-opswww.fi-xifi.eu/fi-ops Jose Gonzalez - Universidad Politecnica Madrid jge@gatv.ssr.upm.es jge@gatv.ssr.upm.es Attilio Broglio – CreateNet attilio.broglio@create-net.org 25/06/201411Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

12 Additional information Installation and Setup 25/06/201412Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

13 ContextBroker0.13 on Ubuntu 12.04 ContextBroker installation –cd /home/xifi/madrid_demo –sudo apt-get install alien mongodb git –wget https://forge.fi-ware.org/frs/download.php/1331/contextBroker-0.13.0- 1.x86_64.rpm –no-check-certificate –sudo alien contextBroker-0.13.0-1.x86_64.rpm –sudo dpkg -i contextbroker_0.13.0-2_amd64.deb For installation please look at: –https://forge.fi- ware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broke r_-_Orion_Context_Broker_-_Installation_and_Administration_Guide NOTES: ContextBroker 0.13 rpm is built for CentOS On Ubuntu 12.04 kernel<3.x (only some problems with lib) On Ubuntu 12.04 kernrl>3.0 (must be recompiled.. because of monfo DB driver) 25/06/201413Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

14 ContextBroker0.13 on Ubuntu 12.04 Download additional package –mkdir -p /home/xifi/madrid_demo –cd /home/xifi/madrid_demo –mkdir additional_file –cd additional_file –wget http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.16.tar.gz –wget ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/x86_64/boost141- thread-1.41.0-5.el5.x86_64.rpm –wget ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/x86_64/boost141- filesystem-1.41.0-5.el5.x86_64.rpm –wget ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/x86_64/boost141- system-1.41.0-5.el5.x86_64.rpm 25/06/201414Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

15 ContextBroker0.13 on Ubuntu 12.04 Install additional packages (Tricks for Ubuntu) –tar -xvzf libmicrohttpd-0.9.16.tar.gz –cd libmicrohttpd-0.9.16/ –./configure –make –sudo make install –sudo ln -s /usr/local/lib/libmicrohttpd.so.10 /usr/lib/libmicrohttpd.so.10 –sudo alien boost141-thread-1.41.0-5.el5.x86_64.rpm –sudo dpkg -i boost141-thread_1.41.0-6_amd64.deb –sudo ln -s /usr/lib64/libboost_thread-mt.so.5 /usr/local/lib/libboost_thread-mt.so.5 –sudo alien boost141-filesystem-1.41.0-5.el5.x86_64.rpm –sudo dpkg -i boost141-filesystem_1.41.0-6_amd64.deb –sudo ln -s /usr/lib64/libboost_filesystem-mt.so.5 /usr/lib/libboost_filesystem-mt.so.5 –sudo alien boost141-system-1.41.0-5.el5.x86_64.rpm –sudo dpkg -i boost141-system_1.41.0-6_amd64.deb –sudo ln -s /usr/lib64/libboost_system-mt.so.5 /usr/lib/libboost_system-mt.so.5 25/06/201415Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

16 ContextBroker0.13 on Ubuntu 12.04 Unix user CB listen port Log DB host DB name How to configure the context Broker /etc/sysconfig/contextBroker BROKER_USER=orion BROKER_PORT=1026 BROKER_LOG_DIR=/var/log/contextBroker BROKER_PID_FILE=/var/log/contextBroker/contextBroker.pid BROKER_DATABASE_HOST=localhost BROKER_DATABASE_NAME=orion 25/06/201416Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

17 Monitoring VM- NGSI_ADAPTER NGSI_adapter installation –sudo apt-get install python-software-properties –sudo add-apt-repository ppa:chris-lea/node.js –sudo apt-get update –apt-get install -y python-software-properties python g++ make –sudo apt-get -y install nodejs –sudo apt-get install software-properties-common –git clone https://github.com/Fiware/fiware-monitoring –cd fiware-monitoring/ngsi_adapter/src –npm install –sudo chmod +x adapter –ln -s /home/xifi/madrid_demo/fiware-monitoring/ngsi_adapter/src/adapter /usr/bin/adapter For installation look at: –https://github.com/Fiware/fiware-monitoring/tree/master/ngsi_adapter 25/06/201417Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

18 Monitoring VM- NGSI_ADAPTER NGSI Adapter listen port NGSI Adapter host IP ContextBroker IP How to configure the ngsi_adapter /home/xifi/madrid_demo/fiware- monitoring/ngsi_adapter/src/config/options.js defaults = { brokerUrl: 'http://127.0.0.1:1026/', listenHost: '127.0.0.1', listenPort: 1027, retries: 2 }; Change logger property of the ngsi_adapter /home/xifi/madrid_demo/fiware- monitoring/ngsi_adapter/src/config/logger.js Number of retries 25/06/201418Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

19 Monitoring VM- NGSI_ADAPTER Add parsers... –cd /home/xifi/madrid_demo/fiware-monitoring/ngsi_adapter/src/lib/parsers –cp -rf parsers parsers.old –mkdir parsers –wget -nd -r -l 1 -A js https://xifisvn.res.eng.it/wp3/software/DEM_Adapter/NGSI_Adapter_parsers/ --no-check-certificate –wget -nd -r -l 1 -A js https://xifisvn.res.eng.it/wp3/software/NAM_Adapter/Trunk/Parsers --no- check-certificate –wget -nd -r -l 1 -A js https://xifisvn.res.eng.it/wp3/software/NPM_Adapter/trunk/snmp-ngsi- adapter/ --no-check-certificate –wget -nd -r -l 1 -A js https://xifisvn.res.eng.it/wp3/software/Openstack_Data_Collector/Trunk/OpenstackDataCollector - -no-check-certificate –wget -nd -r -l 1 -A js https://xifisvn.res.eng.it/wp3/software/NPM_Adapter/trunk/host-service- monitoring/ngsi-adapter-parsers/ --no-check-certificate Run as: –service ngsi_adapter start –$ adapter --listenPort 1337 --brokerUrl http://{host}:{port}/ 25/06/201419Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

20 Monitoring VM- NAGIOS Log file New controller RegionID Ngsi adapter IP:port NAGIOS INSTALLATION (Nagios core 3.4.1) http://wiki.fi-xifi.eu/Xifi:Wp3:Components:DEM#Installation_Manual NAGIOS CONFIGURATION (Nagios core 3.4.1) /usr/local/nagios/etc nagios.cfg log_file=/usr/local/nagios/var/nagios.log cfg_file=/usr/local/nagios/etc/objects/hostgroup_switch.cfg cfg_file=/usr/local/nagios/etc/objects/localhost.cfg cfg_file=/usr/local/nagios/etc/objects/xifi_controller_1.cfg broker_module=/usr/local/nagios/lib/ngsi_event_broker_xifi.so -r dummyRegion -u http://127.0.0.1:1027 25/06/201420Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

21 Monitoring VM- NAGIOS NAGIOS CONFIGURATION (Nagios core 3.4.1) /usr/local/nagios/etc/objects xifi_controller_1.cfg define host { use linux-server host_name node-1 alias Ubuntu 12.04 address 10.20.0.4 hostgroups Controllers} define service { name xifi-host-service use generic-service _entity_type host_service } ;define service { ;use xifi-host-service ;host_name node-1 ;service_description nova-scheduler ;check_command check_nrpe!check_nova_scheduler ;} define service { use xifi-host-service host_name node-1 service_description nova-api check_command check_nrpe!check_nova_api } 25/06/201421Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

22 Monitoring VM- NAGIOS Define a new entity type Define the service NAGIOS CONFIGURATION (Nagios core 3.4.1) /usr/local/nagios/etc/objects xifi_controller_1.cfg define service { name xifi-host-service use generic-service _entity_type host_service } define service { use xifi-host-service host_name node-1 service_description nova-api check_command check_nrpe!check_nova_api } 25/06/201422Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

23 Monitoring VM- NAGIOS Check name Monitored host IP NAGIOS CONFIGURATION (Nagios core 3.4.1) Just two useful commands Check your configuration:  /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Check your command  /usr/local/nagios/libexec/check_nrpe -H 10.20.0.4 -c check_nova_api 25/06/201423Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

24 CONTROLLER VM - ODC ODC INSTALLATION –mkdir -p /usr/local/ODC –cd /usr/local/ODC –wget https://xifisvn.res.eng.it/wp3/software/Openstack_Da ta_Collector/Trunk/OpenstackDataCollector/opensta ckDataCollector.py --no-check-certificate –wget https://xifisvn.res.eng.it/wp3/software/Openstack_Da ta_Collector/Trunk/OpenstackDataCollector/opensta ckDataCollector.pyodc.conf –no-check-certificate 25/06/201424Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

25 CONTROLLER VM - ODC Look at your nova.conf file Your region info Your NGSI adapter ODC CONFIGURATION vim /ur/local/ODC/odc.conf +username = admin +password = admin +tenant_name = admin +auth_url = http://192.168.0.2:35357/v2.0 +regionName = pseudoRegion +regionId = pseudoRegion +location = IT +latitude = 42.2 +longitude= 1.1 +agentUrl= 10.20.0.10:1027/ python openstackDataCollector.py dump cat results.dumped 25/06/201425Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring

26 CONTROLLER VM - NRPE NRPE NAGIOS INSTALLATION (Nagios core 3.4.1) –http://wiki.fi-xifi.eu/Xifi:Wp3:Components:DEM#Installation_Manual NRPE NAGIOS CONFIGURATION (Nagios core 3.4.1) /usr/local/nagios/etc/nrpe.cfg command[check_nova_api]=/usr/local/nagios/libexec/check_pr ocs -c1: -C nova-api 25/06/201426Madrid FI-Ops Training Sessions: Hands-on session 2 - Monitoring


Download ppt "Hands-on session 2 Monitoring Jose Gonzalez Universidad Politecnica Madrid Attilio Broglio Create-Net"

Similar presentations


Ads by Google