Solved

NSClient++ fully automated nagios

Posted on 2014-01-17
13
2,476 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
13 Comments
 
LVL 35

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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 35

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 35

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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

717 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