1 / 34

The All-in-One Nagios Solution -

The All-in-One Nagios Solution - . 2 nd October 2013. Dave Williams. Technical Architect. Agenda. Background The Raspberry Pi The Raspberry Pi Nagios Recipe All-in-One Demonstration Futures & ‘Blue Sky thinking’ Questions. Background. UK based Mainframe (IBM & Honeywell)

zlhna
Télécharger la présentation

The All-in-One Nagios Solution -

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The All-in-One Nagios Solution - • 2ndOctober 2013 • Dave Williams • Technical Architect

  2. Agenda • Background • The Raspberry Pi • The Raspberry Pi Nagios Recipe • All-in-One • Demonstration • Futures & ‘Blue Sky thinking’ • Questions

  3. Background • UK based • Mainframe (IBM & Honeywell) • Unix (HP-UX,AIX, Solaris) • Linux (RedHat, SLES, Debian) • Network (CASE, 3COM, CISCO) • Working for Bull • French Computer Manufacturer • Mainframes, Unix, HPC, Security, Managed Services, Advisory Services

  4. Background • System Monitoring • OpenView • Netview • Open Master • Open Source Monitoring • NetSaint on AIX • Nagios

  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, word-processing and games. It also plays high-definition video.

  6. The Raspberry Pi • Raspberry Pi’s are nearly everywhere • http://rastrack.co.uk

  7. How big is yours ?

  8. The All-in-One

  9. This is probably big enough

  10. The Raspberry Pi

  11. Raspberry Pi • Because it is a 5V DC device it can be run from a small battery pack – giving the ability to smooth incoming power and also prevent power interruptions. • The SME monitor can survive power outages even when UPS’ are not deployed or are confined to essential equipment. • Open up possibilities of using Out of Band alerts for environmental outages – using a real mobile phone for SMS text alerting would mean that both the Raspberry Pi and the mobile phone could continue to work during a total power loss.

  12. Raspberry Pi • An inexpensive way of powering your Raspberry Pi

  13. Raspberry Pi • Something more elegant to act as a real UPS

  14. The Raspberry Pi Nagios Recipe • Nagios Instance • 3.5.2 • 4.0.0 • Apache2 • Asterix • Motion

  15. All-in-One Alerting

  16. Asterix Configuration • define command{ • command_name notify-service-by-phone • command_line /usr/local/bin/notify-by-phone.sh $CONTACTADDRESS2$ "'This is a Nagios Service alert type $NOTIFICATIONTYPE$. Nagios Service Alarm. $HOSTNAME$ has a problem with $SERVICEOUTPUT$. The problem is $SERVICESTATE$.'" "'$NOTIFICATIONTYPE$:$SERVICEDESC$:$HOSTNAME$:$SERVICESTATE$:$SERVICEOUTPUT$'" $SERVICEEVENTID$ • }

  17. Asterix Configuration • /usr/local/bin/notify-by-phone.sh • #!/bin/bash • channel=$1 • alarmtext=$2 • alarmsub=$3 • alarmid=$4 • cd /tmp • echo $alarmtext > alarm_$alarmid.txt • echo $alarmsub > sub_$alarmid.txt • echo $alarmsub >> alarm_$alarmid.txt

  18. Asterix Configuration • echo 'Press 1 to repeat this message, or press 2 to acknowledge the alert.' >> alarm_$alarmid.txt • /usr/bin/text2wave -o alarm_$alarmid.wav alarm_$alarmid.txt • /usr/bin/soxalarm_$alarmid.wav -r 8000 alarm_$alarmid.ul • /bin/mv -f alarm_$alarmid.ul alarm_$alarmid.ulaw • /bin/rm alarm_$alarmid.wav

  19. Asterix Configuration echo "Channel: $channel • MaxRetries: 2 • RetryTime: 60 • WaitTime: 30 • Context: alarm • Extension: 9999 • Priority: 1 • Set: alarmid=$alarmid" > alarm_$alarmid.call /bin/chmod 777 alarm_$alarmid.call /usr/bin/sudo /bin/mv alarm_$alarmid.call /var/spool/asterisk/outgoing

  20. Asterix Configuration – extension.conf • [alarm] • exten => 9999,1,Answer • exten => 9999,2,NoOp(alarmid: ${alarmid}) • exten => 9999,3,BackGround(/tmp/alarm_${alarmid}) • exten => 9999,4,WaitExten(15) • exten => 9999,5,Hangup() • exten => _1,1,Goto(alarm,9999,3) • exten => _2,1,System(/usr/bin/sudo /bin/cp /tmp/sub_${alarmid}.txt /home/nagios/tmp/) • exten => _2,2,System(/usr/bin/sudo /home/nagios/start.pl ${alarmid}) • exten => _2,3,Background(/usr/local/share/sounds/HAL_goodbye) • exten => _2,4,Hangup()

  21. AsterixConfiguratiosip.conf • [voipfone] • type=peer • secret=????? • username=NNNNNNNN • fromuser=NNNNNNNN • fromdomain=sip.voipfone.net • host=sip.voipfone.net • insecure=very • dtmfmode= rfc2833 • context=fromvoipfone # inbound calls falls in this context of dialplan

  22. Asterix results • 'This is a Nagios Service alert type CUSTOM. Nagios Service Alarm. localhost has a problem with DISK OK - free space: / 1337 MB (38% inode=67%):. The problem is OK.‘ • Press 1 to repeat this message, or press 2 to acknowledge the alert.

  23. Asterix driven acknowledgement

  24. Motion – motion.conf • ; on_event_start value • on_event_start cd /etc/motion/scripts && send_nsca -H localhost -c send_nsca.cfg< passive_camera_warning • Uses send_nsca to send standard alert: • File: passive_camera_warning contains : • localhost Camera Motion Detection 1 WARNING: Motion detected

  25. All-in-One • Demonstration • Viewed using Midori browser • Memory before X & Browser total used free shared buffers cached Mem: 383972 146680 237292 0 16300 79924 -/+ buffers/cache: 50456 333516 Swap: 102396 0 102396 • Memory after X & Browser total used free shared buffers cached Mem: 383972 246860 137112 0 23120 129804 -/+ buffers/cache: 93936 290036 Swap: 102396 0 102396

  26. Futures & ‘Blue Sky thinking’ • The All-in-One commercially could cost less than $1999 • Including all equipment, a days installation / configuration and a limited number (3-5) calls to a helpdesk. • Small & Medium enterprises could have their own system monitors with alerting and visual displays for less than a cost of a small rack server. • Easily extend to Environment Monitoring • Possible European offer by Bull as ‘Vision-Pi’ as part of their Vision Services offer.

  27. Futures & ‘Blue Sky thinking’ • Still more possibilities • Can Nagvis or NagiosTV be implemented on the All-in-One • Can Nagios XI be built and be practical on the All-in-One. • Will the sizing & performance be practical ? • Can a suitable licencing scheme be worked out with Ethan for ARM ? • What other monitoring scenarios can be added ?

  28. Environment Monitoring • Using a 1-wire sensor DS18B20 • Raspberry Pi already has kernel modules for this • t=23062, that is 23 degrees Centigrade

  29. Fancy something bigger ?

  30. Raspberry Pi Development System • Motorola AtrixLapDock & a couple of adapters

  31. Closing Thoughts • Disruption – price / availability / capability • Hoover – the brand for Vacuum Cleaners • Phillips – name for Cross Head screwdrivers • Nagios – the name for system monitors

  32. Questions ?

More Related