Page 1 of 1

Monitoring externally through proxy?

PostPosted: Mon May 16, 2016 9:59 am
by JMac87
I'm wondering if this is possible and if so, how would I set it up?

Currently I monitor a few public-facing servers in our network with Nagios on an offsite VPS. This is easy because, well, they are public. I'm getting to the point where I want to monitor devices that aren't available externally...like wireless access points for example. I obviously don't want to port forward access to these devices.

I can't find any sort of guide that would allow me to have 1 server (nrpe?) that acts as a proxy for doing all of the checking of the internal network and it passes this info to the VPS running Nagios. This would require me to only have one forwarding rule (5666 for nrpe).

So basically:
Internal network hosts <-- Monitoring server in Internal network ---> External Nagios VPS

Re: Monitoring externally through proxy?

PostPosted: Mon May 16, 2016 1:34 pm
by hsmith
NRPE can run any command you want it to.

You could set up something in nrpe.cfg like this:

Code: Select all
#command[check_ssh_somedomain]=/usr/local/nagios/libexec/check_ssh -H HOST1.SOMEDOMAIN.COM


Then from your Nagios server, you could do this:

Code: Select all
./check_nrpe -H Someotherdomain.com -c check_ssh_somedomain


Your Nagios server would now have the results of check_ssh_somedomain that was run on your NRPE server.

Does this make sense? It might be a little work to set up, but it would be secure.

Re: Monitoring externally through proxy?

PostPosted: Mon May 16, 2016 1:51 pm
by JMac87
Thanks! The idea makes sense...yeah.

What am I actually running on the internal monitoring server? Can NRPE be standalone? Maybe what I need is a guide to install that and I'll probably be well on my way.

Re: Monitoring externally through proxy?

PostPosted: Mon May 16, 2016 2:00 pm
by hsmith
There are a few ways you can set up NRPE.

You can have it run as a standalone daemon, or through xinetd.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Monitoring externally through proxy?

PostPosted: Mon May 16, 2016 2:18 pm
by JMac87
Thanks! I'll have a go at this and see what I can do.

Re: Monitoring externally through proxy?

PostPosted: Mon May 16, 2016 2:35 pm
by mcapra
Let us know what you results are!