Monitoring externally through proxy?

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Monitoring externally through proxy?

Postby JMac87 » Mon May 16, 2016 9:59 am

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
JMac87
 
Posts: 3
Joined: Mon May 16, 2016 9:48 am

Re: Monitoring externally through proxy?

Postby hsmith » Mon May 16, 2016 1:34 pm

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

Re: Monitoring externally through proxy?

Postby JMac87 » Mon May 16, 2016 1:51 pm

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

Re: Monitoring externally through proxy?

Postby hsmith » Mon May 16, 2016 2:00 pm

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

Re: Monitoring externally through proxy?

Postby JMac87 » Mon May 16, 2016 2:18 pm

Thanks! I'll have a go at this and see what I can do.
JMac87
 
Posts: 3
Joined: Mon May 16, 2016 9:48 am

Re: Monitoring externally through proxy?

Postby mcapra » Mon May 16, 2016 2:35 pm

Let us know what you results are!
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3587
Joined: Thu May 05, 2016 3:54 pm


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 15 guests