Monitoring externally through proxy?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
JMac87
Posts: 3
Joined: Mon May 16, 2016 9:48 am

Monitoring externally through proxy?

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitoring externally through proxy?

Post 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.
Former Nagios Employee.
me.
JMac87
Posts: 3
Joined: Mon May 16, 2016 9:48 am

Re: Monitoring externally through proxy?

Post 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitoring externally through proxy?

Post 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
Former Nagios Employee.
me.
JMac87
Posts: 3
Joined: Mon May 16, 2016 9:48 am

Re: Monitoring externally through proxy?

Post by JMac87 »

Thanks! I'll have a go at this and see what I can do.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Monitoring externally through proxy?

Post by mcapra »

Let us know what you results are!
Former Nagios employee
https://www.mcapra.com/
Locked