Page 1 of 1

Howto check multiple hosts behind NAT

Posted: Tue May 31, 2011 7:52 am
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.

Re: Howto check multiple hosts behind NAT

Posted: Tue May 31, 2011 10:10 am
by tonyyarusso
See the -p switch to check_nrpe.

Re: Howto check multiple hosts behind NAT

Posted: Fri Jun 10, 2011 2:27 am
by cor9957
Sorry for the late response.

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

Regards,
Cor.

Re: Howto check multiple hosts behind NAT

Posted: Mon Jun 18, 2012 1:23 am
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?

Re: Howto check multiple hosts behind NAT

Posted: Mon Jun 18, 2012 7:30 pm
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?