Page 1 of 1

Monitoring remote servers

Posted: Wed Feb 01, 2012 1:07 pm
by kiddbios
Hello,

We are currently evaluating Nagios XI and the salesperson told me to post here for pre-sales support questions.

We are a managed service provider and all of our monitored hosts are external to our network. My question is this: If we have the NS++ client installed on a remote server that is behind a firewall, can we create a NAT forward and configure Nagios and the client to communicate on that port? For instance:

Nagios Server on public IP x.x.x.x ---------------> Internet ------------------> Remote firewall with public IP y.y.y.y with port 9677 forwarded to internal Windows Server with NS++ installed and listening on port 9677.

So there would be no need to configure passive checks and each individual service on each individual monitored host via the local config file.

Thanks,

Brad

Re: Monitoring remote servers

Posted: Wed Feb 01, 2012 2:46 pm
by scottwilkerson
Sure. You can do this with both the check_nrpe command as well as the check_nt when using with NSClient++

In Nagios XI you would want to do the following to change the checks to use a different port.

Configure -> Core Config Manager -> Commands -> Modify the check_nt command

change

Code: Select all

$USER1$/check_nt -H $HOSTADDRESS$ -p $USER7$ -s $USER8$ -v $ARG1$ $ARG2$
to

Code: Select all

$USER1$/check_nt -H $HOSTADDRESS$ -p $ARG3$ -s $USER8$ -v $ARG1$ $ARG2$
Now on your service checks you will need to provide the port in the $ARG3$ field
Configure -> Core Config Manager -> Services -> Modify
$ARG3$ = 9677

Re: Monitoring remote servers

Posted: Wed Feb 01, 2012 3:22 pm
by lmiltchev
In addition to what scottwilkerson said, I would like to add that the default port for NSClient++ is 12489. You can change the NSClient++ port by modifying the NSC.ini file, located at C:\Program Files\NSClient++

Code: Select all

;# NSCLIENT PORT NUMBER
;  This is the port the NSClientListener.dll will listen to.
port=12489
After changing the port, you must restart the NSClient++ service, so that the changes can take effect.

Re: Monitoring remote servers

Posted: Wed Feb 01, 2012 4:01 pm
by kiddbios
Awesome. Thank you so much for the replies. So it sounds like I can just install the NS++ client on the server, configure the ports, configure the check_nt command and then it can communicate through the firewall and monitor just like it was on the local LAN?

Thanks,

Brad

Re: Monitoring remote servers

Posted: Wed Feb 01, 2012 4:46 pm
by lmiltchev
So it sounds like I can just install the NS++ client on the server, configure the ports, configure the check_nt command and then it can communicate through the firewall and monitor just like it was on the local LAN?
That's correct. Please, let us know if you have any issues setting up NSClient++. You can open a new post - I will be locking this one. Thank you!