Howto check multiple hosts behind NAT

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
cor9957
Posts: 2
Joined: Tue May 31, 2011 7:27 am

Howto check multiple hosts behind NAT

Post by cor9957 »

Hi all,

I know, I'm probably stupid but I can't figure out how to check multiple hosts behind a NAT firewall. I know I can have nrpe listen to a different port but I can't figure out how to use those portnumbers with Nagios.

The situation is as follows, I'm trying to monitor 4 Linux servers (192.168.40.1 - 192.168.40.4) behind 1 public IP address. I forwarded ports 5666 to 192.168.40.1 (this one works), 5667 to 192.168.40.2, 5668 to 192.168.40.3 and 5669 to 192.168.40.4
Is there anybody out there who can point me in the right direction of how to get Nagios to use portnumbers other then 5666
Thanks for any help you can give.

Regards,
Cor.
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Howto check multiple hosts behind NAT

Post by tonyyarusso »

See the -p switch to check_nrpe.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
cor9957
Posts: 2
Joined: Tue May 31, 2011 7:27 am

Re: Howto check multiple hosts behind NAT

Post by cor9957 »

Sorry for the late response.

Good news, I've got it working, thanks for your help.

Regards,
Cor.
kirillnud
Posts: 2
Joined: Sun Jun 17, 2012 12:55 pm

Re: Howto check multiple hosts behind NAT

Post by kirillnud »

apart me but i not find how to do it. manually i can do it by change -p xxxx of host but i wont to put it to host-group and check it automatically by running different ports on this ip. how to add port definition to hosts.cfg an put a command wright?
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Howto check multiple hosts behind NAT

Post by jsmurphy »

kirillnud wrote:apart me but i not find how to do it. manually i can do it by change -p xxxx of host but i wont to put it to host-group and check it automatically by running different ports on this ip. how to add port definition to hosts.cfg an put a command wright?
I'm afraid I don't really understand the question.. you want to run NRPE against multiple ports on multiple servers?
Locked