NSClient++ fully automated nagios

I am working with a FAN (fully automated nagios) setup running centreon  2.4.1.  I can't monitor disk space (check_nt) on my server 2003 R2 running SNMP + NSClient++ 0.4.1.102 with port  12489 open to the FAN server.  The error message I get is a connection refused and I haven't added any password to the windows NSClient++ when I set it up.  I also removed the -s commented with in the /etc/nagios/checkcommand.cfg (check_nt_disk).
storktechAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Seth SimmonsConnect With a Mentor Sr. Systems AdministratorCommented:
have you tried running commands on the nagios server itself to that windows server?  essentially running the check_nt command with the parameters to see if that works?
0
 
Seth SimmonsSr. Systems AdministratorCommented:
is the firewall on the 2003 server allowing that port in?
is the nsclient service running?
if you do netstat -at on the 2003 server does it show 12489 listening?
0
 
RickEpnetConnect With a Mentor Commented:
Did you tell NSClient++ to accept request from the Nagios server. In the NCS.ini file you will find a line
allowed_hosts=
That needs to point to the Nagios server.

Example
allowed_hosts=192.168.1.22
0
Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

 
storktechAuthor Commented:
seth2740,

Netstat doesn't show that port being open but the firewall GUI from windows does have that rule in place.  

I've tried this command to add the port but I still don't see it open when I do a netstat -at.
netsh firewall set portopening protocol = TCP port = 12489 name = NSC mode = enable

I don't have a NCS.ini in the program folder I only have a NSClient.ini file.  I do have the allowed host IP address installed.
0
 
storktechAuthor Commented:
I used this step-by-step guide.

http://everyday-tech.com/archives/1615
0
 
RickEpnetCommented:
You said:
I don't have a NCS.ini in the program folder I only have a NSClient.ini file.  I do have the allowed host IP address installed.

This would be why you are getting connection refused. The NSClient.ini and the NCS.inin are basically the same thing. If you do not have the host IP address or the network the host resides in this file it will never connect.

Just to start with I would use the Nagios IP address on the line that says
allowed_hosts=
In this format.
allowed_hosts=xxx.xxx.xxx.xxx
0
 
RickEpnetCommented:
Sorry I read that wrong. You say you do have it installed. That is normally the reason for connection refused.
0
 
storktechAuthor Commented:
So I made sure that the port was open 12489 and it does show up when I do a netstat -an or -at.  The services is running and I rebooted the machine just to make sure.  On Fully Automated Nagios host I've created the host config for a win-2003 check_nt_disk.  What do you re recommend I do.
ConnectionF.jpg
0
 
RickEpnetCommented:
Click request attention because I am out of ideas.
0
 
storktechAuthor Commented:
Seth2740,

No I haven't tried that. If I wanted to use the "check_nt!CPULOAD!-l 5,80,90" command how would I go about doing that? I'm a nobe to Nagios but I have running NagiosXi running and I also have Nagios 4 Core / Plugin running too. I prefer to use the Nagios Core because it's entirely free.

Thanks,
0
 
Seth SimmonsSr. Systems AdministratorCommented:
your command would look something like this:

check_nt -H <windows host name> -v CPULOAD -l 5,80,90

if nagios was installed in default location then the plugins would be under /usr/local/nagios/libexec

on any of the plugins, you can append --help at the end to see a complete command usage
0
 
storktechAuthor Commented:
Turns out I was download the wrong program for nagios4.  I was downloading the NSCP sotware instead of the NSClient++. Once I installed the right program I was able to view my NSC.ini file and my nagios4 system started to receive client information.  I tested this out on all my server 2003/2008 boxes with no problem.

works
http://assets.nagios.com/downloads/nagiosxi/agents/NSClient++/NSClient++-Stable-32.msi

dosn't work
http://files.nsclient.org/stable/NSCP-0.4.1.102-Win32.msi

works
http://files.nsclient.org/0.3.x/NSClient%2B%2B-0.3.9-x64.msi
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.