How to monitor on another network

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
ecksa02
Posts: 3
Joined: Mon Apr 10, 2017 10:13 am

How to monitor on another network

Post by ecksa02 »

So here's my setup. Have a Nagios server running at my office (Host A). Have a pfSense router at a clients location with NRPE installed (Host B).

I need to be able to monitor ips inside Host B's network (Host B can reach these private ips, but Host A cannot since different networks on different ISPs).

I understand how to make NRPE calls from Host A to Host B, but i cannot figure out how to make calls from Host B to other clients on it's network.

Any help would be greatly appreciated.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: How to monitor on another network

Post by avandemore »

In the most generic form, check_nrpe makes a tcp connection to the listener on port 5666. I believe section 2b of this document covers your scenario:

https://assets.nagios.com/downloads/nag ... e/NRPE.pdf

Is that what you are looking for?
Previous Nagios employee
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: How to monitor on another network

Post by tacolover101 »

inception.

have your pfsense machine nat forward to a 'client' machine running internal to the network, that will then pick up to NRPE internally, from there you need to write / proxy your calls to use that 'client' as a middleman.

outside network 100.200.0.1 (nagios) -> 1.2.3.4 (pfsense) :8888 -> 1.2.3.5 (client 'middleman') :5666 -> you now query your internal NRPE agents with this machine to have them report back.

another option might be looking into leveraging a mod_gearman worker internally, depending on how many checks are running.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to monitor on another network

Post by cdienger »

Hi ecksa20,

Did the responses above help resolve your problem? If so, are we good to lock the thread?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ecksa02
Posts: 3
Joined: Mon Apr 10, 2017 10:13 am

Re: How to monitor on another network

Post by ecksa02 »

This should take care of it, thanks all
ecksa02
Posts: 3
Joined: Mon Apr 10, 2017 10:13 am

Re: How to monitor on another network

Post by ecksa02 »

What i am trying to do is monitor if machines are up inside a remote network. The pfsense box itself has nrpe installed, i was curious if i could make the pfsense box ping these boxes, and report back to our main nagios server. Trying to do this as low profile as possible, so nothing can be installed on the remote machines in the private network. Just need a keep_alive, or ping.

Indirect checks will accomplish this, as according to 2b on the above documents.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: How to monitor on another network

Post by mcapra »

ecksa02 wrote:i was curious if i could make the pfsense box ping these boxes, and report back to our main nagios server.
What you've described are "passive checks". Here's some info about passive checks:
https://assets.nagios.com/downloads/nag ... erview.pdf
https://exchange.nagios.org/directory/A ... or/details

In a nutshell, "Active Checks" are Nagios reaching out to a machine to check on something. "Passive Checks" are a machine submitting results to Nagios directly.

Essentially, you would set up an NRDP server on your Nagios Core machine and have that act as an endpoint your pfsense machine could submit check results to. There would likely be a little bit of scripting involved to have your pfsense machine run the plugins then submit the results back to Nagios, but that is one other option.
Former Nagios employee
https://www.mcapra.com/
Locked