Page 1 of 1

NagiosXI monitoring multiple windows servers on the same ip

Posted: Fri Feb 25, 2011 6:04 am
by dan912
We are an IT company looking to use nagios to monitor all of our customers servers. The only problem we have come accross is how to set up so that it will monitor each server. Is there a way to monitor several servers which have the same external ip

For example

External IP = 254.176.65.34
On this IP there is a:
Terminal Server
Mail Server
SQL Server

How would i monitor all three servers?

Re: NagiosXI monitoring multiple windows servers on the same

Posted: Fri Feb 25, 2011 10:57 am
by rdedon
Just to clarify, this would be 3 different machines running correct? I just want to be sure as if all of these were running on one machine the answers will be greatly different than 3 separate ones.

Re: NagiosXI monitoring multiple windows servers on the same

Posted: Fri Feb 25, 2011 3:24 pm
by tonyyarusso
The easiest way would be to set up a port forwarding rule to NRPE for each of the servers behind the NAT.

Re: NagiosXI monitoring multiple windows servers on the same

Posted: Mon Feb 28, 2011 3:33 am
by dan912
Yes it would be for 3 different machines on the same external ip. And is there any guide on how to set up the port forwarding in nagios as i am a not the best with linux.

Re: NagiosXI monitoring multiple windows servers on the same

Posted: Tue Mar 01, 2011 10:22 am
by tonyyarusso
Port forwarding is something done on your router, not in Nagios. You would want to check the documentation for your router's firmware for instructions.

Re: NagiosXI monitoring multiple windows servers on the same

Posted: Wed Mar 02, 2011 5:58 am
by dan912
I know how to configure port forwarding on the router but how do i configure nagios to use different ports for each server?

Re: NagiosXI monitoring multiple windows servers on the same

Posted: Wed Mar 02, 2011 10:37 am
by tonyyarusso
To quote the check_nrpe plugin help text in part,
[root@demo ~]# /usr/local/nagios/libexec/check_nrpe -h

NRPE Plugin for Nagios

Usage: check_nrpe -H <host> [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
<host> = The address of the host running the NRPE daemon
[port] = The port on which the daemon is running (default=5666)
As you see here, just include the -p switch in your command definition followed by the external port number. So for instance, if machine Thomas is behind the NAT and you want to check it, you could set up a port forward from 56125 external to 5666 on Thomas, and have a service defined with check_nrpe -H NAT_Gateway -p 56125.