SlideShare a Scribd company logo
1 of 29
Monitoring the Physical World 
with Nagios and Arduino 
Trevor McDonald 
tmcdonald@nagios.com 
http://github.com/tmcnag
Who Am I? 
● Support Tech at Nagios Enterprises 
– tmcdonald on Support Forum 
– Docs, Bugs, Testing, PPeerrll 
● Other Things I Do: 
– World Languages 
– Computer Security 
– Electronics
Who Am I Not? 
● Affiliated with Arduino 
– Not being paid to advertise 
– All images copyright their respective owners 
– <Legal disclaimer here> 
● Iron Man
Who Am I Not? 
● Affiliated with Arduino 
– Not being paid to advertise 
– All images copyright their respective owners 
– <Legal disclaimer here> 
● Iron Man (yet)
What's This Talk About? 
● Physical Monitors: 
– Temperature 
– Humidity 
– Light 
– Motion 
– Open/Close of Doors/Windows
How Do We Do That? 
● Existing Solutions: 
– Closed-source 
– Limited scope 
– Expensive* ($1,000+) 
● Arduino: 
– 100% open-source 
– Customizable 
– Cheap ($5 to $50)
What is Arduino? 
● Arduino Uno 
– 8-bit Microprocessor 
– 32K Flash Memory 
– 2K RAM 
– 16 MHz Clock Speed 
– Runs on 5V 
– 14 Digital + 6 Analog I/O Pins
Assumptions 
● You know a bit of C/C++ 
● You understand passive checks (NRDP) 
● You understand the following: 
– Flip switch up, light goes on 
– Flip switch down, light goes off 
– AKA “Digital logic”
How Does It Work? 
● Hardware is attached to pins 
● Each I/O pin either reads or writes data 
– Reading might detect if a button is pressed 
– Writing could turn on a LED or motor 
● Pins can be configured for either task 
● Regular C code is used to control pins 
and handle program logic
A Simple Blink 
● [ Picture of LED breadboard ]
A Simple Blink 
● [ Example Blink sketch ]
A Simple Blink
Button Press
Button Press
Button Press
The Missing Link 
● We're able to... 
– Read the state of a button/switch 
– Take action accordingly (light an LED) 
● We want to... 
– Send passive results to Nagios 
● So we need... 
– Networking capability (HTTP for NRDP)
Arduino Shields 
● Stack on top of and expand an Arduino 
– Relay shield for high-powered device control 
– MP3 shield for adding quality audio output 
– LCD + buttons shield for a basic UI 
– Ethernet shield for network connectivity 
● Relatively cheap ($30 to $60 on average) 
● Save on RAM, CPU, code, and time
Ethernet Shield
Introducing Nagduino 
● C++ “library” I built to facilitate NRDP calls 
– No NSCA (not enough RAM for crypto) 
– No SNMP Traps (not enough patience) 
● Very small, very simple code 
– 6 lines to get you going 
● Bells + whistles not included 
– No checking NRDP result 
– Debug code? What debug code?
Putting It All Together 
● Magnetic sensor attached to input 
● Arduino checks sensor on a loop 
● If open, send NRDP Critical to Nagios 
– “Latch” to avoid repeat messages 
● If closed, do nothing and loop 
– Reset latch, re-check every 100ms 
● Alert based on preferences/settings
The Hardware
The Code
The Code
Live Demo
Tying In With Nagios 
● Graphing 
– View historical information 
– Capacity planning (XI) 
– Use multistacked graphs for correlations (XI) 
● Physical Event Handlers 
– Turn on fan if temp is Warning 
– Turn on AC if temp is Critical
Use Cases 
● Applications in: 
– Farming (soil moisture, temp, light) 
– Security (light, motion, sound, contacts) 
– Home Automation (temp, light, infrared LED) 
– Beekeeping (Talk to Sally Reich)
Moving Forward 
● Support for NSCA + SNMP Traps 
● Web interface (CCM for Arduino checks) 
● Beyond Arduino 
– Raspberry Pi (I'm looking at you, Dave) 
– Smartphone (Mobile environment readings) 
– Intel Edison (Very cool)
Questions? 
Thank You!
The End 
Trevor McDonald 
tmcdonald@nagios.com 
http://github.com/tmcnag

More Related Content

Similar to Monitoring Physical World with Arduino & Nagios

Proactive monitoring tools or services - Open Source
Proactive monitoring tools or services - Open Source Proactive monitoring tools or services - Open Source
Proactive monitoring tools or services - Open Source B.A.
 
Ake hedman why we need to unite and why vscp is a solution to a problem
Ake hedman  why we need to unite and why vscp is a solution to a problemAke hedman  why we need to unite and why vscp is a solution to a problem
Ake hedman why we need to unite and why vscp is a solution to a problemWithTheBest
 
Iot with-the-best & VSCP
Iot with-the-best & VSCPIot with-the-best & VSCP
Iot with-the-best & VSCPAke Hedman
 
IPLOG? A beginner's IDS for the WIN!
IPLOG? A beginner's IDS for the WIN!IPLOG? A beginner's IDS for the WIN!
IPLOG? A beginner's IDS for the WIN!Nathan Gibbs
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingEmmanuel Obot
 
Getting started with arduino
Getting started with arduinoGetting started with arduino
Getting started with arduinoGlen
 
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas EricssonOSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas EricssonNETWAYS
 
Ple18 web-security-david-busby
Ple18 web-security-david-busbyPle18 web-security-david-busby
Ple18 web-security-david-busbyDavid Busby, CISSP
 
Intro to the Arduino Entrepreneurial System
Intro to the Arduino Entrepreneurial SystemIntro to the Arduino Entrepreneurial System
Intro to the Arduino Entrepreneurial Systemtodbotdotcom
 
arduino introduction for vocational students
arduino introduction for vocational studentsarduino introduction for vocational students
arduino introduction for vocational studentsanggalima5
 
Porte à puce - Automatic Door based on Arduino UNO R3
Porte à puce - Automatic Door based on Arduino UNO R3Porte à puce - Automatic Door based on Arduino UNO R3
Porte à puce - Automatic Door based on Arduino UNO R3Meifani Sumadijaya
 
Arduino Intro Guide 2
Arduino Intro Guide 2Arduino Intro Guide 2
Arduino Intro Guide 2elketeaches
 
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...David Fowler
 

Similar to Monitoring Physical World with Arduino & Nagios (20)

Proactive monitoring tools or services - Open Source
Proactive monitoring tools or services - Open Source Proactive monitoring tools or services - Open Source
Proactive monitoring tools or services - Open Source
 
Ake hedman why we need to unite and why vscp is a solution to a problem
Ake hedman  why we need to unite and why vscp is a solution to a problemAke hedman  why we need to unite and why vscp is a solution to a problem
Ake hedman why we need to unite and why vscp is a solution to a problem
 
Iot with-the-best & VSCP
Iot with-the-best & VSCPIot with-the-best & VSCP
Iot with-the-best & VSCP
 
IPLOG? A beginner's IDS for the WIN!
IPLOG? A beginner's IDS for the WIN!IPLOG? A beginner's IDS for the WIN!
IPLOG? A beginner's IDS for the WIN!
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and Programming
 
Getting started with arduino
Getting started with arduinoGetting started with arduino
Getting started with arduino
 
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas EricssonOSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
 
Ple18 web-security-david-busby
Ple18 web-security-david-busbyPle18 web-security-david-busby
Ple18 web-security-david-busby
 
Audible Objects
Audible ObjectsAudible Objects
Audible Objects
 
Let's begin io t with $10
Let's begin io t with $10Let's begin io t with $10
Let's begin io t with $10
 
Arduino
ArduinoArduino
Arduino
 
Intro to the Arduino Entrepreneurial System
Intro to the Arduino Entrepreneurial SystemIntro to the Arduino Entrepreneurial System
Intro to the Arduino Entrepreneurial System
 
arduino introduction for vocational students
arduino introduction for vocational studentsarduino introduction for vocational students
arduino introduction for vocational students
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
Arduino Hands-on Workshop
Arduino Hands-on WorkshopArduino Hands-on Workshop
Arduino Hands-on Workshop
 
Porte à puce
Porte à pucePorte à puce
Porte à puce
 
Porte à puce - Automatic Door based on Arduino UNO R3
Porte à puce - Automatic Door based on Arduino UNO R3Porte à puce - Automatic Door based on Arduino UNO R3
Porte à puce - Automatic Door based on Arduino UNO R3
 
Porte à puce
Porte à pucePorte à puce
Porte à puce
 
Arduino Intro Guide 2
Arduino Intro Guide 2Arduino Intro Guide 2
Arduino Intro Guide 2
 
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
 

More from Nagios

Nagios XI Best Practices
Nagios XI Best PracticesNagios XI Best Practices
Nagios XI Best PracticesNagios
 
Jesse Olson - Nagios Log Server Architecture Overview
Jesse Olson - Nagios Log Server Architecture OverviewJesse Olson - Nagios Log Server Architecture Overview
Jesse Olson - Nagios Log Server Architecture OverviewNagios
 
Trevor McDonald - Nagios XI Under The Hood
Trevor McDonald  - Nagios XI Under The HoodTrevor McDonald  - Nagios XI Under The Hood
Trevor McDonald - Nagios XI Under The HoodNagios
 
Sean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient NotificationsSean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient NotificationsNagios
 
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise EditionMarcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise EditionNagios
 
Janice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios PluginsJanice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios PluginsNagios
 
Dave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical ExperienceDave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical ExperienceNagios
 
Mike Weber - Nagios and Group Deployment of Service Checks
Mike Weber - Nagios and Group Deployment of Service ChecksMike Weber - Nagios and Group Deployment of Service Checks
Mike Weber - Nagios and Group Deployment of Service ChecksNagios
 
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
Mike Guthrie - Revamping Your 10 Year Old Nagios InstallationMike Guthrie - Revamping Your 10 Year Old Nagios Installation
Mike Guthrie - Revamping Your 10 Year Old Nagios InstallationNagios
 
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...Nagios
 
Matt Bruzek - Monitoring Your Public Cloud With Nagios
Matt Bruzek - Monitoring Your Public Cloud With NagiosMatt Bruzek - Monitoring Your Public Cloud With Nagios
Matt Bruzek - Monitoring Your Public Cloud With NagiosNagios
 
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.Nagios
 
Eric Loyd - Fractal Nagios
Eric Loyd - Fractal NagiosEric Loyd - Fractal Nagios
Eric Loyd - Fractal NagiosNagios
 
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...Nagios
 
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...Nagios
 
Nagios World Conference 2015 - Scott Wilkerson Opening
Nagios World Conference 2015 - Scott Wilkerson OpeningNagios World Conference 2015 - Scott Wilkerson Opening
Nagios World Conference 2015 - Scott Wilkerson OpeningNagios
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNagios
 
Nagios Log Server - Features
Nagios Log Server - FeaturesNagios Log Server - Features
Nagios Log Server - FeaturesNagios
 
Nagios Network Analyzer - Features
Nagios Network Analyzer - FeaturesNagios Network Analyzer - Features
Nagios Network Analyzer - FeaturesNagios
 
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing NagiosNagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing NagiosNagios
 

More from Nagios (20)

Nagios XI Best Practices
Nagios XI Best PracticesNagios XI Best Practices
Nagios XI Best Practices
 
Jesse Olson - Nagios Log Server Architecture Overview
Jesse Olson - Nagios Log Server Architecture OverviewJesse Olson - Nagios Log Server Architecture Overview
Jesse Olson - Nagios Log Server Architecture Overview
 
Trevor McDonald - Nagios XI Under The Hood
Trevor McDonald  - Nagios XI Under The HoodTrevor McDonald  - Nagios XI Under The Hood
Trevor McDonald - Nagios XI Under The Hood
 
Sean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient NotificationsSean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient Notifications
 
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise EditionMarcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
 
Janice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios PluginsJanice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios Plugins
 
Dave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical ExperienceDave Williams - Nagios Log Server - Practical Experience
Dave Williams - Nagios Log Server - Practical Experience
 
Mike Weber - Nagios and Group Deployment of Service Checks
Mike Weber - Nagios and Group Deployment of Service ChecksMike Weber - Nagios and Group Deployment of Service Checks
Mike Weber - Nagios and Group Deployment of Service Checks
 
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
Mike Guthrie - Revamping Your 10 Year Old Nagios InstallationMike Guthrie - Revamping Your 10 Year Old Nagios Installation
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
 
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
 
Matt Bruzek - Monitoring Your Public Cloud With Nagios
Matt Bruzek - Monitoring Your Public Cloud With NagiosMatt Bruzek - Monitoring Your Public Cloud With Nagios
Matt Bruzek - Monitoring Your Public Cloud With Nagios
 
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
 
Eric Loyd - Fractal Nagios
Eric Loyd - Fractal NagiosEric Loyd - Fractal Nagios
Eric Loyd - Fractal Nagios
 
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
 
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
 
Nagios World Conference 2015 - Scott Wilkerson Opening
Nagios World Conference 2015 - Scott Wilkerson OpeningNagios World Conference 2015 - Scott Wilkerson Opening
Nagios World Conference 2015 - Scott Wilkerson Opening
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
 
Nagios Log Server - Features
Nagios Log Server - FeaturesNagios Log Server - Features
Nagios Log Server - Features
 
Nagios Network Analyzer - Features
Nagios Network Analyzer - FeaturesNagios Network Analyzer - Features
Nagios Network Analyzer - Features
 
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing NagiosNagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Monitoring Physical World with Arduino & Nagios

  • 1. Monitoring the Physical World with Nagios and Arduino Trevor McDonald tmcdonald@nagios.com http://github.com/tmcnag
  • 2. Who Am I? ● Support Tech at Nagios Enterprises – tmcdonald on Support Forum – Docs, Bugs, Testing, PPeerrll ● Other Things I Do: – World Languages – Computer Security – Electronics
  • 3. Who Am I Not? ● Affiliated with Arduino – Not being paid to advertise – All images copyright their respective owners – <Legal disclaimer here> ● Iron Man
  • 4. Who Am I Not? ● Affiliated with Arduino – Not being paid to advertise – All images copyright their respective owners – <Legal disclaimer here> ● Iron Man (yet)
  • 5. What's This Talk About? ● Physical Monitors: – Temperature – Humidity – Light – Motion – Open/Close of Doors/Windows
  • 6. How Do We Do That? ● Existing Solutions: – Closed-source – Limited scope – Expensive* ($1,000+) ● Arduino: – 100% open-source – Customizable – Cheap ($5 to $50)
  • 7. What is Arduino? ● Arduino Uno – 8-bit Microprocessor – 32K Flash Memory – 2K RAM – 16 MHz Clock Speed – Runs on 5V – 14 Digital + 6 Analog I/O Pins
  • 8. Assumptions ● You know a bit of C/C++ ● You understand passive checks (NRDP) ● You understand the following: – Flip switch up, light goes on – Flip switch down, light goes off – AKA “Digital logic”
  • 9. How Does It Work? ● Hardware is attached to pins ● Each I/O pin either reads or writes data – Reading might detect if a button is pressed – Writing could turn on a LED or motor ● Pins can be configured for either task ● Regular C code is used to control pins and handle program logic
  • 10. A Simple Blink ● [ Picture of LED breadboard ]
  • 11. A Simple Blink ● [ Example Blink sketch ]
  • 16. The Missing Link ● We're able to... – Read the state of a button/switch – Take action accordingly (light an LED) ● We want to... – Send passive results to Nagios ● So we need... – Networking capability (HTTP for NRDP)
  • 17. Arduino Shields ● Stack on top of and expand an Arduino – Relay shield for high-powered device control – MP3 shield for adding quality audio output – LCD + buttons shield for a basic UI – Ethernet shield for network connectivity ● Relatively cheap ($30 to $60 on average) ● Save on RAM, CPU, code, and time
  • 19. Introducing Nagduino ● C++ “library” I built to facilitate NRDP calls – No NSCA (not enough RAM for crypto) – No SNMP Traps (not enough patience) ● Very small, very simple code – 6 lines to get you going ● Bells + whistles not included – No checking NRDP result – Debug code? What debug code?
  • 20. Putting It All Together ● Magnetic sensor attached to input ● Arduino checks sensor on a loop ● If open, send NRDP Critical to Nagios – “Latch” to avoid repeat messages ● If closed, do nothing and loop – Reset latch, re-check every 100ms ● Alert based on preferences/settings
  • 25. Tying In With Nagios ● Graphing – View historical information – Capacity planning (XI) – Use multistacked graphs for correlations (XI) ● Physical Event Handlers – Turn on fan if temp is Warning – Turn on AC if temp is Critical
  • 26. Use Cases ● Applications in: – Farming (soil moisture, temp, light) – Security (light, motion, sound, contacts) – Home Automation (temp, light, infrared LED) – Beekeeping (Talk to Sally Reich)
  • 27. Moving Forward ● Support for NSCA + SNMP Traps ● Web interface (CCM for Arduino checks) ● Beyond Arduino – Raspberry Pi (I'm looking at you, Dave) – Smartphone (Mobile environment readings) – Intel Edison (Very cool)
  • 29. The End Trevor McDonald tmcdonald@nagios.com http://github.com/tmcnag

Editor's Notes

  1. - Interested in talking if they speak another lang. - Degree in forensics, work with Spenser on sec. - Electronics hobbyist “which brings me to what this talk is all about”
  2. - Interested in talking if they speak another lang. - Degree in forensics, work with Spenser on sec. - Electronics hobbyist “which brings me to what this talk is all about”
  3. - Interested in talking if they speak another lang. - Degree in forensics, work with Spenser on sec. - Electronics hobbyist “which brings me to what this talk is all about”
  4. - Traditional monitoring targets software - The physical world can be just as critical - What are some things you might want to monitor in the physical world? - Temp without humidity could be problematic - Light + Motion for security system - “But today we are going to focus on detecting the state of a door or window”
  5. - Closed-source prevents modification - Related to closed-source, if they don&amp;apos;t do what you want you either buy another device or make do - Expense is relative, and you get what you pay for, but not everyone can afford it - Hardware and software is open-source - Customizable means no lock-in - Price starts low at $5 for a Micro and goes up for the Mega
  6. - The GPIO is what sets this apart from just a small computer
  7. - Don&amp;apos;t have to be a C guru, but at least be able to read basic code - Experience with other languages could probably fit as well - [ Give brief overview of 1/0, on/off, HIGH/LOW ]
  8. - Hardware can be input: buttons, switches, light sensors, pressure pads; or output: lights, motors, buzzers, speakers
  9. - Explain setup() and loop() sections
  10. - And to do that, we are going to use Shields
  11. - Essentially a piece of hardware of similar shape and size
  12. - Note the pin passthrough and the ethernet jack - Handles all the low-level networking details
  13. - I use the term “library” loosely – it is only a single function right now - More powerful models might be able to handle crypto - Netduino is a library that handles SNMP Get but not Trap - Reiterate: I am not a professional programmer - This was all done in my spare time
  14. - Here&amp;apos;s how the demo will hopefully play out - Nagios takes over at the end and it is just like any other passive check
  15. - Basically a switch just like with the LED example
  16. - Explain the object creation - Explain sendNRDP() call - Explain loop + latching
  17. - Explain the object creation - Explain sendNRDP() call - Explain loop + latching
  18. - Capacity planning could relate to body weight
  19. - Sally&amp;apos;s talk is mostly theory
  20. - Some things I would like to see down the road - Raspberry Pi = Dave Williams
  21. If there is time at the end, talk about personal projects using Arduino?