Monitoring remote servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kiddbios
Posts: 54
Joined: Wed Feb 01, 2012 12:57 pm

Monitoring remote servers

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitoring remote servers

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring remote servers

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
kiddbios
Posts: 54
Joined: Wed Feb 01, 2012 12:57 pm

Re: Monitoring remote servers

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring remote servers

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked