SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
Monitoring Remote Locations with Nagios
John Sellens
jsellens@syonex.com
October 3, 2013
Notes PDF at http://www.monbox.com/notes/
Monitoring Remote Locations with Nagios
“There’s More Than
One Way To Do It”
c 2013 John Sellens Nagios World Conference North America 2013 1
Notes:
• Not a great idea for a progreamming language
• But sometimes handy when solving real problems
• I’m not the world’s biggest Perl fan
Monitoring Remote Locations with Nagios
Setting the Scene
• Sometimes everything you care about is on one
network
– Single security zone
– Acceptable latency and loss
• Sometimes things you care about are all over the
place
– Different locations
– Different security zones
– Different owners
– Unpredictable or unstable links
c 2013 John Sellens Nagios World Conference North America 2013 2
Monitoring Remote Locations with Nagios
What Will We Cover?
• Remote monitoring situations you may run into
• Techniques for monitoring remote devices/services
– How can you get there from here?
– How can you get results back?
• How those problems are addressed in the MonBOX
Remote Monitoring Appliance
c 2013 John Sellens Nagios World Conference North America 2013 3
Notes:
• Not meant to be a sales pitch . . .
• These techniques can be implemented in many ways
and in many different environments
• But I would of course enjoy receiving your feedback
on this talk and on the MonBOX Remote Monitoring
Appliance
– http://monbox.com/
Monitoring Remote Locations with Nagios
Real World Examples?
• Multiple locations, disjoint networks
– Firewalls between locations
– Links that won’t reliably pass ICMP, UDP
∗ Slow, unreliable, restricted . . .
• Small, or less secure locations
– e.g. retail chain stores
• Multiple customers
– e.g. managing small customer office networks
c 2013 John Sellens Nagios World Conference North America 2013 4
Notes:
• Small customers may have unsophisticated routers/firewalls
– And no consistent external IP address
Monitoring Remote Locations with Nagios
Why Don’t You Just . . . ?
• Put a Nagios server in each location?
• Open lots of firewall ports?
• Use a global wide open VPN?
• Use mod_gearman?
c 2013 John Sellens Nagios World Conference North America 2013 5
Monitoring Remote Locations with Nagios
Because!
• Another Nagios server requires time and money
• Security considerations may prevent VPN
• Opening firewall ports can quickly get out of hand
• You might be blocked by the OSI Network Model
– Layers 8 (financial) and/or 9 (political)
• You might care about only a subset
– e.g. You provide a managed device or service
• You might have no influence or power or budget
c 2013 John Sellens Nagios World Conference North America 2013 6
Notes:
• Small locations mean that the cost of providing and
managing a separate server may not make sense
Monitoring Remote Locations with Nagios
“All problems in
computer science can
be solved by another
level of indirection”
– David Wheeler
c 2013 John Sellens Nagios World Conference North America 2013 7
Notes:
• I use this idea constantly
Monitoring Remote Locations with Nagios
Traditional: check_nrpe
• Connect to NRPE daemon on remote host, it runs a
command
check_nrpe -H hosta 
-c check_disk -w 60% -c 70% -p /
• Can allow arbitrary arguments and commands
– Some might think that silly and less secure
• And you can hop to another host if you’re clever
– i.e. A proxy via another layer of indirection
• Need to allow NRPE through firewall(s)
• More restricted, more obscure than SSH
c 2013 John Sellens Nagios World Conference North America 2013 8
Monitoring Remote Locations with Nagios
Traditional: check_by_ssh
• SSH to remote host, run local check, use results
check_by_ssh -H hosta -- 
check_disk -w 60% -c 70% -p /
• But the check doesn’t have to be a local check
– The gateway host can probe a different host
– i.e. A proxy via another layer of indirection
• And, you can get just silly:
check_by_ssh -H hosta -- 
check_by_ssh -H hostb -- 
check_by_ssh -H hostc -- 
check_http -H hostd
c 2013 John Sellens Nagios World Conference North America 2013 9
Monitoring Remote Locations with Nagios
Traditional: check_by_ssh (cont’d)
• Need to allow SSH through firewall(s)
• Want to do SNMP or other UDP checks?
– Over a public or lossy link?
– Use check_by_ssh to “tunnel” SNMP over
unreliable links
c 2013 John Sellens Nagios World Conference North America 2013 10
Notes:
• There is an SNMP proxy tool out there, but SSH is easy
Monitoring Remote Locations with Nagios
Traditional: Passive Checks
• Configure each remote machine to run checks and
report back with NSCA
• Need to open a path back to Nagios
– Same problem, different direction
• Need to install software and configure each remote
device
– Do you even have access?
– How do you monitor switches and printers?
c 2013 John Sellens Nagios World Conference North America 2013 11
Notes:
• My preference is to avoid passive checks if I can be-
cause I think they look and act in uncommon ways
– But I can’t always – sometimes a passive check is
best
Monitoring Remote Locations with Nagios
“When the going gets
weird, the weird get
going”
c 2013 John Sellens Nagios World Conference North America 2013 12
Monitoring Remote Locations with Nagios
Getting Weird: SNMP Proxies
• net-snmp’s snmpd lets you run arbitrary commands
– Configure the exec settings
– Commands don’t need to be local checks
• A proxy to other machines
• But . . .
– You can’t pass arbitrary arguments
– You need to configure the SNMP proxy machine
– SNMP is unlikely to be the first thing allowed
through a firewall
– And it is UDP . . .
c 2013 John Sellens Nagios World Conference North America 2013 13
Notes:
• I never said that an SNMP proxy was one of my best
ideas
Monitoring Remote Locations with Nagios
Getting Weird: Web Pages
• Sometimes a remote location will have a web server
– That you have port 80 access to
– And some way to configure the web site
• Many web sites use PHP, CGI, or something similar
– Why can’t you run checks through a web server?
– PHP and CGI can run arbitrary commands
• Another proxy!
• Other protocols? SMTP?
c 2013 John Sellens Nagios World Conference North America 2013 14
Notes:
• There are other protocols that can be subverted
• Can you send mail?
– Put a command payload into a message
– Mail to an alias that pipes to a program
– Mail the check results back to your Nagios server
• If you have access and control, you could put a daemon
on some port and do anything
– But why make a custom protocol and tool when
there are existing tools that do it better?
• Use firewall port knocking to trigger something?
Monitoring Remote Locations with Nagios
Getting Weirder: Phone Calls
• Got an Asterisk PBX in a remote location?
• Call it up, use DTMF to request commands
• It can call you back and report in
• OK, I never said this was a good idea
c 2013 John Sellens Nagios World Conference North America 2013 15
Notes:
• Trying to make the point that if you have some way to
get somewhere, you can do just about anything
– If you’re willing to be creative
Monitoring Remote Locations with Nagios
Flip It Around and Passive Checks
• If you can control a machine in the remote location
– Give it work to do
– Cron jobs, a looping shell script, etc.
• Report back to Nagios with:
– send_nrdp, send_nsca
– SSH back
– SMTP back, web calls
– And so on . . .
c 2013 John Sellens Nagios World Conference North America 2013 16
Monitoring Remote Locations with Nagios
Now You’ve Got a Path, How to Use It?
• You’ve got a mechanism to get somewhere remote
– SSH, NRPE, etc.
• Use mbdivert to get Nagios to use it
• mbdivert diverts checks through SSH, NRPE, etc.
– Method and destination/proxy based on hostname
– And config file rules
• Set $USER1$ to run mbdivert, or use symlinks
named for plugins
– Change what happens with barely a config change
c 2013 John Sellens Nagios World Conference North America 2013 17
Notes:
• mbdivert is listed in the Nagios Exchange
• or at http://www.syonex.com/software/
Monitoring Remote Locations with Nagios
Reflection: Use a Third Party
• Last year Ethan described the Nagios Reflector
service
• NRDP a passive check result to a web server on the
interweb
• Nagios server GETs result from the public server
• No inbound firewall rules needed
– Outbound HTTPS is likely already allowed
• Still need to configure a remote machine somehow
c 2013 John Sellens Nagios World Conference North America 2013 18
Notes:
• send_nrdp to upload results
• Use check_reflector to retrieve the results
Monitoring Remote Locations with Nagios
Reflection: Use a Complete Nagios Server
• Your reflection server could be course be a Nagios
server out on the interweb
• Use an aggregation tool to give a single internal view
– Nagios Fusion
– Thruk and mk_livestatus
• This is not necessarily a lightweight approach
c 2013 John Sellens Nagios World Conference North America 2013 19
Monitoring Remote Locations with Nagios
Remote Configuration
• For many of these, you still need to configure a
remote machine
– You need ongoing access to the remote device
– Which is kind of contrary to my whole premise
• Turn reflection around
– Send config fragments from Nagios to a third party
on the interweb
– Download work from that server into the remote
location
c 2013 John Sellens Nagios World Conference North America 2013 20
Monitoring Remote Locations with Nagios
And That’s It
• Those are my ideas on how you can monitor remote
locations
• I’ll claim most of them are practical
• But you don’t need to take my word for it
– Because I implemented many of these ideas
c 2013 John Sellens Nagios World Conference North America 2013 21
Monitoring Remote Locations with Nagios
Quick Intro: MonBOX RMA
• MonBOX Remote Monitoring Appliance
• Built on the Raspberry Pi, runs with read only /
• Central MonBOX Management Server (MMS)
• MonBOX connects to MMS every 15 minutes
– Gets instructions, things to monitor
– Runs plugins from cron, or a full Nagios instance
– Can relay results back through the MMS
– Or directly with NRDP or NSCA (if allowed)
c 2013 John Sellens Nagios World Conference North America 2013 22
Notes:
• http://monbox.com/
Monitoring Remote Locations with Nagios
Quick Intro: MonBOX RMA (cont’d)
• MonBOX also allows SSH, NRPE inbound
– If the network allows access
– Use mbdivert for ease of implementation
• Local web and console configuration
• API to interact with the MMS
– Maintain your configs as always
– Ship parts out to remote locations
• I would be delighted to tell you more if you’re curious
c 2013 John Sellens Nagios World Conference North America 2013 23
Notes:
• Please ask me, or drop me a line
• Or check out http://monbox.com/
Monitoring Remote Locations with Nagios
And That’s It
• Questions?
• Need more?
– Ask me at lunch
– Mail me
– Check out my sites
• Notes PDF at http://www.monbox.com/notes/
• Thank you!
c 2013 John Sellens Nagios World Conference North America 2013 24

Más contenido relacionado

La actualidad más candente

MySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixMySQL Monitoring with Zabbix
MySQL Monitoring with Zabbix
FromDual GmbH
 

La actualidad más candente (20)

Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
 
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios CoreNagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
 
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
 
Nagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIs
Nagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIsNagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIs
Nagios Conference 2014 - Janice Singh - Real World Uses for Nagios APIs
 
Nagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
Nagios Conference 2014 - Jim Prins - Passive Monitoring with NagiosNagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
Nagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
 
Nagios Conference 2011 - Mike Weber - Training: Reducing Nagios Server Load ...
Nagios Conference 2011 - Mike Weber - Training:  Reducing Nagios Server Load ...Nagios Conference 2011 - Mike Weber - Training:  Reducing Nagios Server Load ...
Nagios Conference 2011 - Mike Weber - Training: Reducing Nagios Server Load ...
 
Nagios Conference 2014 - Jack Chu - How to Think With Nagios to Solve Monitor...
Nagios Conference 2014 - Jack Chu - How to Think With Nagios to Solve Monitor...Nagios Conference 2014 - Jack Chu - How to Think With Nagios to Solve Monitor...
Nagios Conference 2014 - Jack Chu - How to Think With Nagios to Solve Monitor...
 
Nagios Conference 2014 - Mike Weber - Nagios Rapid Deployment Options
Nagios Conference 2014 - Mike Weber - Nagios Rapid Deployment OptionsNagios Conference 2014 - Mike Weber - Nagios Rapid Deployment Options
Nagios Conference 2014 - Mike Weber - Nagios Rapid Deployment Options
 
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
 
Nagios Conference 2014 - Luis Contreras - Monitoring SAP System with Nagios Core
Nagios Conference 2014 - Luis Contreras - Monitoring SAP System with Nagios CoreNagios Conference 2014 - Luis Contreras - Monitoring SAP System with Nagios Core
Nagios Conference 2014 - Luis Contreras - Monitoring SAP System with Nagios Core
 
Andrew Nelson - Zabbix and SNMP on Linux
Andrew Nelson - Zabbix and SNMP on LinuxAndrew Nelson - Zabbix and SNMP on Linux
Andrew Nelson - Zabbix and SNMP on Linux
 
Nagios
NagiosNagios
Nagios
 
MySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixMySQL Monitoring with Zabbix
MySQL Monitoring with Zabbix
 
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios Conference 2013 - Eric Stanley - Whats New Core 4Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
 
Nagios Conference 2014 - Dave Williams - Multi-Tenant Nagios Monitoring
Nagios Conference 2014 - Dave Williams - Multi-Tenant Nagios MonitoringNagios Conference 2014 - Dave Williams - Multi-Tenant Nagios Monitoring
Nagios Conference 2014 - Dave Williams - Multi-Tenant Nagios Monitoring
 
Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...
 
Nagios Conference 2012 - Scott Wilkerson - Passive Monitoring Solutions For R...
Nagios Conference 2012 - Scott Wilkerson - Passive Monitoring Solutions For R...Nagios Conference 2012 - Scott Wilkerson - Passive Monitoring Solutions For R...
Nagios Conference 2012 - Scott Wilkerson - Passive Monitoring Solutions For R...
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance Tuning
 
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
 
Alexander Naydenko - Nagios to Zabbix Migration | ZabConf2016
Alexander Naydenko - Nagios to Zabbix Migration | ZabConf2016Alexander Naydenko - Nagios to Zabbix Migration | ZabConf2016
Alexander Naydenko - Nagios to Zabbix Migration | ZabConf2016
 

Destacado

Destacado (11)

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 2012 - John Sellens - Non-Obvious Nagios
Nagios Conference 2012 - John Sellens - Non-Obvious NagiosNagios Conference 2012 - John Sellens - Non-Obvious Nagios
Nagios Conference 2012 - John Sellens - Non-Obvious Nagios
 
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
 
Ganglia Monitoring Tool
Ganglia Monitoring ToolGanglia Monitoring Tool
Ganglia Monitoring Tool
 
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...
 
Sean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient NotificationsSean Falzon - Nagios - Resilient Notifications
Sean Falzon - Nagios - Resilient Notifications
 
Building self-service on demand infrastructure with Puppet and VMware
Building self-service on demand infrastructure with Puppet and VMwareBuilding self-service on demand infrastructure with Puppet and VMware
Building self-service on demand infrastructure with Puppet and VMware
 
Nagios Conference 2012 - John Sellens - Nagios Indirection
Nagios Conference 2012 - John Sellens - Nagios IndirectionNagios Conference 2012 - John Sellens - Nagios Indirection
Nagios Conference 2012 - John Sellens - Nagios Indirection
 
Nagios XI Best Practices
Nagios XI Best PracticesNagios XI Best Practices
Nagios XI Best Practices
 
Ganglia monitoring
Ganglia monitoringGanglia monitoring
Ganglia monitoring
 

Similar a Nagios Conference 2013 - John Sellens - Monitoring Remote Locations with Nagios

SplunkLive! Washington DC May 2013 - Splunk Security Workshop
SplunkLive! Washington DC May 2013 - Splunk Security WorkshopSplunkLive! Washington DC May 2013 - Splunk Security Workshop
SplunkLive! Washington DC May 2013 - Splunk Security Workshop
Splunk
 

Similar a Nagios Conference 2013 - John Sellens - Monitoring Remote Locations with Nagios (20)

Nagios Conference 2012 - Nicolas Brousse - Optimizing your Monitoring and Tre...
Nagios Conference 2012 - Nicolas Brousse - Optimizing your Monitoring and Tre...Nagios Conference 2012 - Nicolas Brousse - Optimizing your Monitoring and Tre...
Nagios Conference 2012 - Nicolas Brousse - Optimizing your Monitoring and Tre...
 
SDN Demystified, by Dean Pemberton [APNIC 38]
SDN Demystified, by Dean Pemberton [APNIC 38]SDN Demystified, by Dean Pemberton [APNIC 38]
SDN Demystified, by Dean Pemberton [APNIC 38]
 
Windows logging workshop - BSides Austin 2014
Windows logging workshop - BSides Austin 2014Windows logging workshop - BSides Austin 2014
Windows logging workshop - BSides Austin 2014
 
glideinWMS, The OSG overlay DHTC system - OSG School 2014
glideinWMS, The OSG overlay DHTC system - OSG School 2014glideinWMS, The OSG overlay DHTC system - OSG School 2014
glideinWMS, The OSG overlay DHTC system - OSG School 2014
 
Go Hack Yourself - 10 Pen Test Tactics for Blue Teamers
Go Hack Yourself - 10 Pen Test Tactics for Blue TeamersGo Hack Yourself - 10 Pen Test Tactics for Blue Teamers
Go Hack Yourself - 10 Pen Test Tactics for Blue Teamers
 
Nagios Conference 2014 - Frank Pantaleo - Nagios Monitoring of Netezza Databases
Nagios Conference 2014 - Frank Pantaleo - Nagios Monitoring of Netezza DatabasesNagios Conference 2014 - Frank Pantaleo - Nagios Monitoring of Netezza Databases
Nagios Conference 2014 - Frank Pantaleo - Nagios Monitoring of Netezza Databases
 
Network Penetration Testing Toolkit - Nmap, Netcat, and Metasploit Basics
Network Penetration Testing Toolkit - Nmap, Netcat, and Metasploit BasicsNetwork Penetration Testing Toolkit - Nmap, Netcat, and Metasploit Basics
Network Penetration Testing Toolkit - Nmap, Netcat, and Metasploit Basics
 
Learning Nagios module 1
Learning Nagios module 1Learning Nagios module 1
Learning Nagios module 1
 
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
 
SplunkLive! Washington DC May 2013 - Splunk Security Workshop
SplunkLive! Washington DC May 2013 - Splunk Security WorkshopSplunkLive! Washington DC May 2013 - Splunk Security Workshop
SplunkLive! Washington DC May 2013 - Splunk Security Workshop
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor Workshop
 
Jan Hloušek, Keen Software House
Jan Hloušek, Keen Software HouseJan Hloušek, Keen Software House
Jan Hloušek, Keen Software House
 
Nagios intro
Nagios intro Nagios intro
Nagios intro
 
Benchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and ResultsBenchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and Results
 
POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...
POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...
POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...
 
Jax Devops 2017 Succeeding in the Cloud – the guidebook of Fail
Jax Devops 2017  Succeeding in the Cloud – the guidebook of FailJax Devops 2017  Succeeding in the Cloud – the guidebook of Fail
Jax Devops 2017 Succeeding in the Cloud – the guidebook of Fail
 
OSMC 2011 | Distributed monitoring using NSClient++ by Michael Medin
OSMC 2011 | Distributed monitoring using NSClient++ by Michael MedinOSMC 2011 | Distributed monitoring using NSClient++ by Michael Medin
OSMC 2011 | Distributed monitoring using NSClient++ by Michael Medin
 
Nagios Conference 2014 - Luke Groschen - Using Nagios Network Analyzer and NS...
Nagios Conference 2014 - Luke Groschen - Using Nagios Network Analyzer and NS...Nagios Conference 2014 - Luke Groschen - Using Nagios Network Analyzer and NS...
Nagios Conference 2014 - Luke Groschen - Using Nagios Network Analyzer and NS...
 
Cloud Device Insecurity
Cloud Device InsecurityCloud Device Insecurity
Cloud Device Insecurity
 
OSMC 2017 | Troubleshooting-icinga 2 by Thomas Widhalm
OSMC 2017 |  Troubleshooting-icinga 2 by Thomas WidhalmOSMC 2017 |  Troubleshooting-icinga 2 by Thomas Widhalm
OSMC 2017 | Troubleshooting-icinga 2 by Thomas Widhalm
 

Más de Nagios

Más de Nagios (17)

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
 
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
 
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
 
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
 
Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...
Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...
Nagios Conference 2014 - Trevor McDonald - Monitoring The Physical World With...
 
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
 
Nagios Conference 2014 - Shamas Demoret - An Overview of Nagios Solutions
Nagios Conference 2014 - Shamas Demoret - An Overview of Nagios SolutionsNagios Conference 2014 - Shamas Demoret - An Overview of Nagios Solutions
Nagios Conference 2014 - Shamas Demoret - An Overview of Nagios Solutions
 
Nagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XI
Nagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XINagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XI
Nagios Conference 2014 - Shamas Demoret - Getting Started With Nagios XI
 
Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...
Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...
Nagios Conference 2014 - Abbas Haider Ali - Proactive Alerting and Intelligen...
 
Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...
Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...
Nagios Conference 2014 - Sam Lansing - Utilizing Data Visualizations in Syste...
 
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XINagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
Nagios Conference 2014 - Sam Lansing - Advanced Features of Nagios XI
 
Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...
Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...
Nagios Conference 2014 - Paloma Galan - Monitoring Financial Protocols With N...
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

Nagios Conference 2013 - John Sellens - Monitoring Remote Locations with Nagios

  • 1. Monitoring Remote Locations with Nagios John Sellens jsellens@syonex.com October 3, 2013 Notes PDF at http://www.monbox.com/notes/
  • 2. Monitoring Remote Locations with Nagios “There’s More Than One Way To Do It” c 2013 John Sellens Nagios World Conference North America 2013 1 Notes: • Not a great idea for a progreamming language • But sometimes handy when solving real problems • I’m not the world’s biggest Perl fan
  • 3. Monitoring Remote Locations with Nagios Setting the Scene • Sometimes everything you care about is on one network – Single security zone – Acceptable latency and loss • Sometimes things you care about are all over the place – Different locations – Different security zones – Different owners – Unpredictable or unstable links c 2013 John Sellens Nagios World Conference North America 2013 2
  • 4. Monitoring Remote Locations with Nagios What Will We Cover? • Remote monitoring situations you may run into • Techniques for monitoring remote devices/services – How can you get there from here? – How can you get results back? • How those problems are addressed in the MonBOX Remote Monitoring Appliance c 2013 John Sellens Nagios World Conference North America 2013 3 Notes: • Not meant to be a sales pitch . . . • These techniques can be implemented in many ways and in many different environments • But I would of course enjoy receiving your feedback on this talk and on the MonBOX Remote Monitoring Appliance – http://monbox.com/
  • 5. Monitoring Remote Locations with Nagios Real World Examples? • Multiple locations, disjoint networks – Firewalls between locations – Links that won’t reliably pass ICMP, UDP ∗ Slow, unreliable, restricted . . . • Small, or less secure locations – e.g. retail chain stores • Multiple customers – e.g. managing small customer office networks c 2013 John Sellens Nagios World Conference North America 2013 4 Notes: • Small customers may have unsophisticated routers/firewalls – And no consistent external IP address
  • 6. Monitoring Remote Locations with Nagios Why Don’t You Just . . . ? • Put a Nagios server in each location? • Open lots of firewall ports? • Use a global wide open VPN? • Use mod_gearman? c 2013 John Sellens Nagios World Conference North America 2013 5
  • 7. Monitoring Remote Locations with Nagios Because! • Another Nagios server requires time and money • Security considerations may prevent VPN • Opening firewall ports can quickly get out of hand • You might be blocked by the OSI Network Model – Layers 8 (financial) and/or 9 (political) • You might care about only a subset – e.g. You provide a managed device or service • You might have no influence or power or budget c 2013 John Sellens Nagios World Conference North America 2013 6 Notes: • Small locations mean that the cost of providing and managing a separate server may not make sense
  • 8. Monitoring Remote Locations with Nagios “All problems in computer science can be solved by another level of indirection” – David Wheeler c 2013 John Sellens Nagios World Conference North America 2013 7 Notes: • I use this idea constantly
  • 9. Monitoring Remote Locations with Nagios Traditional: check_nrpe • Connect to NRPE daemon on remote host, it runs a command check_nrpe -H hosta -c check_disk -w 60% -c 70% -p / • Can allow arbitrary arguments and commands – Some might think that silly and less secure • And you can hop to another host if you’re clever – i.e. A proxy via another layer of indirection • Need to allow NRPE through firewall(s) • More restricted, more obscure than SSH c 2013 John Sellens Nagios World Conference North America 2013 8
  • 10. Monitoring Remote Locations with Nagios Traditional: check_by_ssh • SSH to remote host, run local check, use results check_by_ssh -H hosta -- check_disk -w 60% -c 70% -p / • But the check doesn’t have to be a local check – The gateway host can probe a different host – i.e. A proxy via another layer of indirection • And, you can get just silly: check_by_ssh -H hosta -- check_by_ssh -H hostb -- check_by_ssh -H hostc -- check_http -H hostd c 2013 John Sellens Nagios World Conference North America 2013 9
  • 11. Monitoring Remote Locations with Nagios Traditional: check_by_ssh (cont’d) • Need to allow SSH through firewall(s) • Want to do SNMP or other UDP checks? – Over a public or lossy link? – Use check_by_ssh to “tunnel” SNMP over unreliable links c 2013 John Sellens Nagios World Conference North America 2013 10 Notes: • There is an SNMP proxy tool out there, but SSH is easy
  • 12. Monitoring Remote Locations with Nagios Traditional: Passive Checks • Configure each remote machine to run checks and report back with NSCA • Need to open a path back to Nagios – Same problem, different direction • Need to install software and configure each remote device – Do you even have access? – How do you monitor switches and printers? c 2013 John Sellens Nagios World Conference North America 2013 11 Notes: • My preference is to avoid passive checks if I can be- cause I think they look and act in uncommon ways – But I can’t always – sometimes a passive check is best
  • 13. Monitoring Remote Locations with Nagios “When the going gets weird, the weird get going” c 2013 John Sellens Nagios World Conference North America 2013 12
  • 14. Monitoring Remote Locations with Nagios Getting Weird: SNMP Proxies • net-snmp’s snmpd lets you run arbitrary commands – Configure the exec settings – Commands don’t need to be local checks • A proxy to other machines • But . . . – You can’t pass arbitrary arguments – You need to configure the SNMP proxy machine – SNMP is unlikely to be the first thing allowed through a firewall – And it is UDP . . . c 2013 John Sellens Nagios World Conference North America 2013 13 Notes: • I never said that an SNMP proxy was one of my best ideas
  • 15. Monitoring Remote Locations with Nagios Getting Weird: Web Pages • Sometimes a remote location will have a web server – That you have port 80 access to – And some way to configure the web site • Many web sites use PHP, CGI, or something similar – Why can’t you run checks through a web server? – PHP and CGI can run arbitrary commands • Another proxy! • Other protocols? SMTP? c 2013 John Sellens Nagios World Conference North America 2013 14 Notes: • There are other protocols that can be subverted • Can you send mail? – Put a command payload into a message – Mail to an alias that pipes to a program – Mail the check results back to your Nagios server • If you have access and control, you could put a daemon on some port and do anything – But why make a custom protocol and tool when there are existing tools that do it better? • Use firewall port knocking to trigger something?
  • 16. Monitoring Remote Locations with Nagios Getting Weirder: Phone Calls • Got an Asterisk PBX in a remote location? • Call it up, use DTMF to request commands • It can call you back and report in • OK, I never said this was a good idea c 2013 John Sellens Nagios World Conference North America 2013 15 Notes: • Trying to make the point that if you have some way to get somewhere, you can do just about anything – If you’re willing to be creative
  • 17. Monitoring Remote Locations with Nagios Flip It Around and Passive Checks • If you can control a machine in the remote location – Give it work to do – Cron jobs, a looping shell script, etc. • Report back to Nagios with: – send_nrdp, send_nsca – SSH back – SMTP back, web calls – And so on . . . c 2013 John Sellens Nagios World Conference North America 2013 16
  • 18. Monitoring Remote Locations with Nagios Now You’ve Got a Path, How to Use It? • You’ve got a mechanism to get somewhere remote – SSH, NRPE, etc. • Use mbdivert to get Nagios to use it • mbdivert diverts checks through SSH, NRPE, etc. – Method and destination/proxy based on hostname – And config file rules • Set $USER1$ to run mbdivert, or use symlinks named for plugins – Change what happens with barely a config change c 2013 John Sellens Nagios World Conference North America 2013 17 Notes: • mbdivert is listed in the Nagios Exchange • or at http://www.syonex.com/software/
  • 19. Monitoring Remote Locations with Nagios Reflection: Use a Third Party • Last year Ethan described the Nagios Reflector service • NRDP a passive check result to a web server on the interweb • Nagios server GETs result from the public server • No inbound firewall rules needed – Outbound HTTPS is likely already allowed • Still need to configure a remote machine somehow c 2013 John Sellens Nagios World Conference North America 2013 18 Notes: • send_nrdp to upload results • Use check_reflector to retrieve the results
  • 20. Monitoring Remote Locations with Nagios Reflection: Use a Complete Nagios Server • Your reflection server could be course be a Nagios server out on the interweb • Use an aggregation tool to give a single internal view – Nagios Fusion – Thruk and mk_livestatus • This is not necessarily a lightweight approach c 2013 John Sellens Nagios World Conference North America 2013 19
  • 21. Monitoring Remote Locations with Nagios Remote Configuration • For many of these, you still need to configure a remote machine – You need ongoing access to the remote device – Which is kind of contrary to my whole premise • Turn reflection around – Send config fragments from Nagios to a third party on the interweb – Download work from that server into the remote location c 2013 John Sellens Nagios World Conference North America 2013 20
  • 22. Monitoring Remote Locations with Nagios And That’s It • Those are my ideas on how you can monitor remote locations • I’ll claim most of them are practical • But you don’t need to take my word for it – Because I implemented many of these ideas c 2013 John Sellens Nagios World Conference North America 2013 21
  • 23. Monitoring Remote Locations with Nagios Quick Intro: MonBOX RMA • MonBOX Remote Monitoring Appliance • Built on the Raspberry Pi, runs with read only / • Central MonBOX Management Server (MMS) • MonBOX connects to MMS every 15 minutes – Gets instructions, things to monitor – Runs plugins from cron, or a full Nagios instance – Can relay results back through the MMS – Or directly with NRDP or NSCA (if allowed) c 2013 John Sellens Nagios World Conference North America 2013 22 Notes: • http://monbox.com/
  • 24. Monitoring Remote Locations with Nagios Quick Intro: MonBOX RMA (cont’d) • MonBOX also allows SSH, NRPE inbound – If the network allows access – Use mbdivert for ease of implementation • Local web and console configuration • API to interact with the MMS – Maintain your configs as always – Ship parts out to remote locations • I would be delighted to tell you more if you’re curious c 2013 John Sellens Nagios World Conference North America 2013 23 Notes: • Please ask me, or drop me a line • Or check out http://monbox.com/
  • 25. Monitoring Remote Locations with Nagios And That’s It • Questions? • Need more? – Ask me at lunch – Mail me – Check out my sites • Notes PDF at http://www.monbox.com/notes/ • Thank you! c 2013 John Sellens Nagios World Conference North America 2013 24