Solved

NSClient++ fully automated nagios

Posted on 2014-01-17
13
2,295 Views
Last Modified: 2014-01-27
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).
0
Comment
Question by:storktech
  • 5
  • 4
  • 3
13 Comments
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 39789683
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
 
LVL 14

Assisted Solution

by:RickEpnet
RickEpnet earned 250 total points
ID: 39790001
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
 

Author Comment

by:storktech
ID: 39795272
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
 

Author Comment

by:storktech
ID: 39795288
I used this step-by-step guide.

http://everyday-tech.com/archives/1615
0
 
LVL 14

Expert Comment

by:RickEpnet
ID: 39795321
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
 
LVL 14

Expert Comment

by:RickEpnet
ID: 39795330
Sorry I read that wrong. You say you do have it installed. That is normally the reason for connection refused.
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 

Author Comment

by:storktech
ID: 39795357
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
 
LVL 14

Expert Comment

by:RickEpnet
ID: 39795367
Click request attention because I am out of ideas.
0
 
LVL 34

Accepted Solution

by:
Seth Simmons earned 250 total points
ID: 39802053
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
 

Author Comment

by:storktech
ID: 39803469
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
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 39805443
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
 

Author Comment

by:storktech
ID: 39812575
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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now