Solved

NSClient++ fully automated nagios

Posted on 2014-01-17
13
2,322 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Losing network connectivity 8 77
OpenView NNM: Global Manager to Regional Manager connection fails 7 57
AWS CLI - Issue with name display 2 51
wipe a usb using python 5 30
The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

863 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

22 Experts available now in Live!

Get 1:1 Help Now