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.
How to monitor on another network
-
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: How to monitor on another network
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?
https://assets.nagios.com/downloads/nag ... e/NRPE.pdf
Is that what you are looking for?
Previous Nagios employee
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: How to monitor on another network
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.
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.
Re: How to monitor on another network
Hi ecksa20,
Did the responses above help resolve your problem? If so, are we good to lock the thread?
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.
Re: How to monitor on another network
This should take care of it, thanks all
Re: How to monitor on another network
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.
Indirect checks will accomplish this, as according to 2b on the above documents.
Re: How to monitor on another network
What you've described are "passive checks". Here's some info about passive checks:ecksa02 wrote:i was curious if i could make the pfsense box ping these boxes, and report back to our main nagios server.
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/
https://www.mcapra.com/