Connection refused

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kalyanpabolu
Posts: 246
Joined: Fri Jul 03, 2020 4:18 am

Connection refused

Post by kalyanpabolu »

Hi Team,

We are getting "connection refused" error while monitoring a windows machine using NSClient. We have already opened 12489 port. Also, the config file looks fine to me.

Please suggest how to resolve this error.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Connection refused

Post by vtrac »

Hi,
How are you doing?

Could you please try the below command on your Nagios XI prompt?
Just want to see if you can communicate with the remote NSClient++ machine.
Please upload outputs of this command.

Code: Select all

nmap -Pn -p 12489 x.x.x.x
Example:
nmap -Pn -p 12489 x.x.x.x

Code: Select all

Starting Nmap 6.47 ( http://nmap.org ) at 2021-06-07 13:15 CDT
Nmap scan report for x.x.x.x
Host is up (0.0029s latency).
PORT      STATE SERVICE
12489/tcp open  unknown
MAC Address: F8:0B:CB:27:F4:00 (Unknown)
Install NSClient:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Configure NSClient:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Please run the below command on your Nagios XI prompt and also share outputs:
Please replace "x.x.x.x" with the IP of your remote NSClient machine and "yourNSClientPassword" inside
C:\Program Files\NSClient++\nsclient.ini file.

Code: Select all

/usr/local/nagios/libexec/check_nt -H x.x.x.x -p 12489 -s 'yourNSClientPassword' -v CPULOAD -l 5,80,90
Best Regards,
Vinh
kalyanpabolu
Posts: 246
Joined: Fri Jul 03, 2020 4:18 am

Re: Connection refused

Post by kalyanpabolu »

Hello Team,

I think there are some changes required in config file. I can see two config files and not sure what changes are required.
Could you please check and suggest?
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Connection refused

Post by vtrac »

Hi,
How are you doing?
What version of NSClient++ are you running?

The configuration file in NSClient++ 0.3.x is called "NSC.ini" .... (very old, you might want to rename this to something else like "NSC.ini.old" .... and upgrade if you are still using the 0.3.x version.)

The configuration file in NSClient++ 0.4.x(or newer) is called "nsclient.ini".

I currently have NSClient++ 0.5.x installed and the configuration file is called "nsclient.ini".

Please upgrade your NSCleint++ to the 0.4.x or 0.5.x, if you can.

I have attached my "nsclient.ini" below and can be used as an example.
nsclient.ini
Best Regards,
Vinh
You do not have the required permissions to view the files attached to this post.
Locked