f2ffa8b8b4ef98a94aac4f3c82d4e839.ppt
- Количество слайдов: 37
Embedding Nagios in the Raspberry Pi 26 th September Dave Williams 2012 Lead Technical Architect © Bull, 2012 1
Agenda © Bull, 2012 2
Agenda Background The Raspberry Pi Nagios Recipe Using DNX on the Raspberry Pi Demonstration Futures & ‘Blue Sky thinking’ Conclusion © Bull, 2012 3
Background UK based Mainframe (IBM & Honeywell) Unix (HP-UX, AIX, Solaris) Network (CASE, 3 COM, CISCO) Working for Bull French Computer Manufacturer Mainframes, Unix, HPC, Security, Managed Services © Bull, 2012 4
Background System Monitoring Open. View Netview Open Master Open Source Monitoring Net. Saint on AIX Nagios © Bull, 2012 5
The Raspberry Pi Eben Upton and his colleagues at the University of Cambridge’s Computer Laboratory, became concerned about the year-on-year decline in the numbers and skills levels of the A Level students applying to read Computer Science in each academic year The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, wordprocessing and games. It also plays high-definition video. © Bull, 2012 6
The Raspberry Pi © Bull, 2012 7
The Raspberry Pi’s are nearly everywhere http: //rastrack. co. uk © Bull, 2012 8
The Raspberry Pi The demo / sample system is running Debian – Squeeze Soon to be updated to Wheezy © Bull, 2012 9
The Raspberry Pi Nagios Recipe See http: //exchange. nagios. org/directory/Documentation/Nagios. Core-Documentation/Nagios-and-Raspberry-PI/details Yes it’s already in the Nagios Core documentation set ! © Bull, 2012 10
The Raspberry Pi Nagios Recipe #apt-get update #apt-get install php 5 apache 2 libgd 2 -xpm-dev libgd 2 -dev libpng 12 -dev libjpeg 62 -dev libgd-tools libpng 12 dev libgd 2 -xpm-dev libssl-dev gnutls-bin iputils #groupadd www-data #groupadd nagios #adduser nagios #usermod -G www-data, nagios www-data #mkdir /usr/local/nagios #chown -R nagios: nagios /usr/local/Nagios © Bull, 2012 11
The Raspberry Pi Nagios Recipe Whoops ! We also need GD-Utils…. root@raspberrypi: /tmp# wget http: //www. boutell. com/gd/http/gd-2. 0. 33. tar. gz root@raspberrypi: /tmp# tar -zxvf gd-2. 0. 33. tar. gz root@raspberrypi: /tmp/gd-2. 0. 33#. /configure root@raspberrypi: /tmp/gd-2. 0. 33# make && make install © Bull, 2012 12
The Raspberry Pi Nagios Recipe Now we need to get on and install: root@raspberrypi: /tmp# wget http: //prdownloads. sourceforge. net/sourceforge/nagios/na gios-3. 4. 1. tar. gz root@raspberrypi: /tmp# tar xzf nagios-3. 4. 1. tar. gz root@raspberrypi: /tmp/nagios#. /configure – prefix=/usr/local/nagios –with-cgiurl=/nagios/cgi-bin –withhtmurl=/nagios/ –with-nagios-user=nagios –with-nagiosgroup=nagios –with-command-group=nagios And then make: root@raspberrypi: /tmp/nagios# make all © Bull, 2012 13
The Raspberry Pi Nagios Recipe root@raspberrypi: /tmp/nagios# make install-init Install and configure the directory for that holds the external command file: root@raspberrypi: /tmp/nagios# make install-commandmode Install the apache configuration: root@raspberrypi: /tmp/nagios# make install-webconf And at the end install the sample config files: root@raspberrypi: /tmp/nagios# make install-config Restart the apache daemon: root@raspberrypi: /tmp/nagios# /etc/init. d/apache 2 reload © Bull, 2012 14
The Raspberry Pi Nagios Recipe Now for the plugins : apt-get install nagios-plugins nagios-snmp-plugins Or by compiling them: root@raspberrypi: /tmp# wget http: //prdownloads. sourceforge. net/sourceforge/nagiosplug /nagios-plugins-1. 4. 15. tar. gz root@raspberrypi: /tmp# tar xzf nagios-plugins-1. 4. 15. tar. gz root@raspberrypi: /tmp/nagios-plugins-1. 4. 15#. /configure root@raspberrypi: /tmp/nagios-plugins-1. 4. 15# make && make install © Bull, 2012 15
Using DNX 1. Download the automated installation script to the /tmp directory: # cd /tmp 2. # wget http: //assets. nagios. com/downloads/nagiosxi/scripts/Nagios. XI 3. Make the script executable: # chmod +x Nagios. XI-DNX. sh 4. Run the script in client mode #. /Nagios. XI-DNX. sh -c 5. Repeat steps 1 -4 for each slave system. 6. Repeat steps 1 -3 on the master Nagios server. 7. Run the script in server mode, optionally enabling automatic synchronization © Bull, 2012 16
Using DNX Of course it’s not that easy : Modify the script to run under Debian, 206 c 206 < # iptables -I INPUT -p udp --dport 12480: 12482 -j ACCEPT --> iptables -I INPUT -p udp --dport 12480: 12482 -j ACCEPT 246 c 246 < wget -c $DOWNLOAD_URL -o dnx-$DNX_VERSION. tar. gz --> wget -c $DOWNLOAD_URL © Bull, 2012 17
Using DNX © Bull, 2012 18
Demonstration First the Raspberry Pi running Nagios & DNX Oh – just one more thing…. . © Bull, 2012 19
Futures & ‘Blue Sky thinking’ No limits to the possible uses for the Raspberry. PI: Remember it has a GPIO output capability so…. • For example true ‘traffic light displays’ © Bull, 2012 20
Raspberry Pi , Nagios & Traffic Lights © Bull, 2012 21
Raspberry. Pi, Nagios & Traffic Lights © Bull, 2012 22
Futures & ‘Blue Sky thinking’ No limits to the possible uses for the Raspberry. PI: • Rolling text displays • Digital Signage – Screenly-ose (on github. com) © Bull, 2012 23
Futures & ‘Blue Sky thinking’ 3 D image of Tera 100 You could build a supercomputer like this © Bull, 2012 24
Futures & ‘Blue Sky thinking’ Futures & ‘Blue Sky thinking Iridis-pi But with Raspberry PI it might look like this – 64 nodes using Message Passing Interface © Bull, 2012 25
Futures & ‘Blue Sky thinking’ Futures & ‘Blue Sky thinking Iridis-pi Pair of Raspberry PI compute nodes in their Lego racking enclosure © Bull, 2012 26
Futures & ‘Blue Sky thinking’ How about adding a simple PBX to your current Nagios set-up? Or just two lines that tell you something ? © Bull, 2012 27
Futures & ‘Blue Sky thinking’ Take data from a weather station and post Twitter feeds & web site info © Bull, 2012 28
Conclusions For $35 this is a ‘fire & forget’ solution Quite capable of monitoring SME’s and with DNX support even larger environments Possibly the easiest way to drive / monitor exotic devices Only limited by your imagination © Bull, 2012 29
Questions © Bull, 2012 30
© Bull, 2012 31
© Bull, 2012 32
Standard slide with title, text over two columns First level text Second level text – Third level text § Fourth level text © Bull, 2012 First level text Second level text – Third level text § Fourth level text 33
Colour palette Core colours BOOST colours R 178 V 178 B 178 R 95 V 95 B 95 R 41 V 41 B 41 R 0 V 117 B 182 R 96 V 52 B 129 R 151 V 191 B 13 R 119 V 185 B 0 R 0 V 128 B 0 R 238 V 134 B 0 R 182 V 0 B 34 R 255 V 204 B 102 © Bull, 2012 34
Click to add title click to add text © Bull, 2012 35
Standard slide with image Le cloud by Bull logo © Bull, 2012 36
Standard slide with title and image 3 D image of Tera 100 © Bull, 2012 37
f2ffa8b8b4ef98a94aac4f3c82d4e839.ppt