+ Post New Thread
Results 1 to 14 of 14
*nix Thread, Nagios - check_nt help! in Technical; I'm in the process of playing with Nagios. So I've installed the NSClient++ app onto a test server and opened ...
  1. #1

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242

    Nagios - check_nt help!

    I'm in the process of playing with Nagios. So I've installed the NSClient++ app onto a test server and opened the 12489 port in the local firewall.

    I've followed the instructions set out in the docs, but I get an error could not fetch information from server.

    Anyone got any ideas for this? I've used Google but not much look finding anything helpful.

  2. #2


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,704
    Thank Post
    285
    Thanked 788 Times in 615 Posts
    Rep Power
    226
    Is the service running? The nsclient installer doesn't always manage to start the service (on some 2008 boxes).

    If you run the plugin manually, does it give the same error - i.e

    Code:
    pete@server:/usr/local/nagios/libexec$ ./check_nt -H IPADDRESS -p 12489 -v UPTIME
    Should return system uptime.

    Also look at NSC.ini in the nsclient++ program dir and check the allowed_hosts=NAGIOSIPADDRESS line is correct.

  3. #3

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Quote Originally Posted by pete View Post
    Is the service running? The nsclient installer doesn't always manage to start the service (on some 2008 boxes).

    If you run the plugin manually, does it give the same error - i.e

    Code:
    pete@server:/usr/local/nagios/libexec$ ./check_nt -H IPADDRESS -p 12489 -v UPTIME
    Should return system uptime.

    Also look at NSC.ini in the nsclient++ program dir and check the allowed_hosts=NAGIOSIPADDRESS line is correct.
    The service is running. I've tried running that code above (and others) from CLI on nagios box and produces the same error I see in the web GUI.

    Also ensured the password is blank and hosts is blank (which allows everyone access) - but also tried it with a password and with the IP address of the nagios machine.

  4. #4


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,704
    Thank Post
    285
    Thanked 788 Times in 615 Posts
    Rep Power
    226
    Anything useful in the nsclient log on the machine?

  5. #5

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Not sure what to look for. Here's the output from todays events:

    Code:
    2010-02-24 13:01:43: message:.\FileLogger.cpp:92: Starting to log for: NSClient++ - 0.3.5.2 2008-09-24
    2010-02-24 13:01:44: message:CACHE.\NSClient++.cpp:262: Booting: NSClientpp (Nagios) 0.3.5.2 2008-09-24 w32
    2010-02-24 13:01:44: message:CACHE.\NSClient++.cpp:370: Attempting to start NSCLient++ - 0.3.5.2 2008-09-24
    2010-02-24 13:01:44: debug:CACHE.\NSClient++.cpp:773: Loading plugin: CheckDisk...
    2010-02-24 13:01:44: debug:CACHE.\NSClient++.cpp:773: Loading plugin: Event log Checker....
    2010-02-24 13:01:44: debug:CACHE.\NSClient++.cpp:773: Loading plugin: Helper function...
    2010-02-24 13:01:44: debug:CACHE.\NSClient++.cpp:773: Loading plugin: CheckSystem...
    2010-02-24 13:01:44: debug:CACHE.\NSClient++.cpp:773: Loading plugin: File logger...
    2010-02-24 13:01:44: debug:CACHE.\PDHCollector.cpp:66: Autodetected w2k or later, using w2k PDH counters.
    2010-02-24 13:01:44: debug:CACHE.\PDHCollector.cpp:103: Using index to retrive counternames
    2010-02-24 13:01:44: message:CACHE.\FileLogger.cpp:93: Log path is: C:\NSClient++\\nsclient.log
    2010-02-24 13:01:44: debug:CACHE.\NSClient++.cpp:773: Loading plugin: NRPE server...
    2010-02-24 13:01:44: debug:CACHE.\PDHCollector.cpp:123: Found countername: CPU:    \Processor(_total)\% Processor Time
    2010-02-24 13:01:44: debug:CACHE.\PDHCollector.cpp:124: Found countername: UPTIME: \System\System Up Time
    2010-02-24 13:01:44: debug:CACHE.\PDHCollector.cpp:125: Found countername: MCL:    \Memory\Commit Limit
    2010-02-24 13:01:44: debug:CACHE.\PDHCollector.cpp:126: Found countername: MCB:    \Memory\Committed Bytes
    2010-02-24 13:01:44: debug:CACHE.\NSClient++.cpp:773: Loading plugin: NSClient server...
    2010-02-24 13:01:44: error:CACHEd:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:645: bind failed: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.
    
    2010-02-24 13:01:44: debug:CACHE.\NSClient++.cpp:773: Loading plugin: SystemTray...
    2010-02-24 13:01:44: error:d:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:668: Socket did not start properly, we will now do nothing...
    2010-02-24 13:01:44: error:d:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:645: bind failed: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.
    
    2010-02-24 13:01:44: message:.\NSClient++.cpp:476: NSCLient++ - 0.3.5.2 2008-09-24 Started!
    2010-02-24 13:01:44: debug:.\TrayIcon.cpp:53: Failed to load: ChangeWindowMessageFilter aparently we are not on Vista...
    2010-02-24 13:01:44: error:d:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:668: Socket did not start properly, we will now do nothing...
    2010-02-24 13:01:44: message:.\NSClient++.cpp:278: Using settings from: INI-file
    2010-02-24 13:01:44: message:.\NSClient++.cpp:279: Enter command to inject or exit to terminate...
    2010-02-24 13:02:33: message:.\FileLogger.cpp:92: Starting to log for: NSClient++ - 0.3.5.2 2008-09-24
    2010-02-24 13:02:33: message:CACHE.\NSClient++.cpp:262: Booting: NSClientpp (Nagios) 0.3.5.2 2008-09-24 w32
    2010-02-24 13:02:33: message:CACHE.\NSClient++.cpp:370: Attempting to start NSCLient++ - 0.3.5.2 2008-09-24
    2010-02-24 13:02:33: debug:CACHE.\NSClient++.cpp:773: Loading plugin: CheckDisk...
    2010-02-24 13:02:33: debug:CACHE.\NSClient++.cpp:773: Loading plugin: Event log Checker....
    2010-02-24 13:02:33: debug:CACHE.\NSClient++.cpp:773: Loading plugin: Helper function...
    2010-02-24 13:02:34: debug:CACHE.\NSClient++.cpp:773: Loading plugin: CheckSystem...
    2010-02-24 13:02:34: debug:CACHE.\NSClient++.cpp:773: Loading plugin: File logger...
    2010-02-24 13:02:34: debug:CACHE.\PDHCollector.cpp:66: Autodetected w2k or later, using w2k PDH counters.
    2010-02-24 13:02:34: debug:CACHE.\PDHCollector.cpp:103: Using index to retrive counternames
    2010-02-24 13:02:34: message:CACHE.\FileLogger.cpp:93: Log path is: C:\NSClient++\\nsclient.log
    2010-02-24 13:02:34: debug:CACHE.\NSClient++.cpp:773: Loading plugin: NRPE server...
    2010-02-24 13:02:34: debug:CACHE.\PDHCollector.cpp:123: Found countername: CPU:    \Processor(_total)\% Processor Time
    2010-02-24 13:02:34: debug:CACHE.\PDHCollector.cpp:124: Found countername: UPTIME: \System\System Up Time
    2010-02-24 13:02:34: debug:CACHE.\PDHCollector.cpp:125: Found countername: MCL:    \Memory\Commit Limit
    2010-02-24 13:02:34: debug:CACHE.\PDHCollector.cpp:126: Found countername: MCB:    \Memory\Committed Bytes
    2010-02-24 13:02:34: debug:CACHE.\NSClient++.cpp:773: Loading plugin: NSClient server...
    2010-02-24 13:02:34: error:CACHEd:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:645: bind failed: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.
    
    2010-02-24 13:02:34: debug:CACHE.\NSClient++.cpp:773: Loading plugin: SystemTray...
    2010-02-24 13:02:34: error:d:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:645: bind failed: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.
    
    2010-02-24 13:02:34: error:d:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:668: Socket did not start properly, we will now do nothing...
    2010-02-24 13:02:34: message:.\NSClient++.cpp:476: NSCLient++ - 0.3.5.2 2008-09-24 Started!
    2010-02-24 13:02:34: debug:.\TrayIcon.cpp:53: Failed to load: ChangeWindowMessageFilter aparently we are not on Vista...
    2010-02-24 13:02:34: error:d:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:668: Socket did not start properly, we will now do nothing...
    2010-02-24 13:02:34: message:.\NSClient++.cpp:278: Using settings from: INI-file
    2010-02-24 13:02:34: message:.\NSClient++.cpp:279: Enter command to inject or exit to terminate...
    2010-02-24 13:02:58: debug:.\NSClient++.cpp:910: Injecting: exity: 
    2010-02-24 13:02:58: message:.\NSClient++.cpp:961: No handler for command: 'exity'
    2010-02-24 13:03:03: message:.\FileLogger.cpp:92: Starting to log for: NSClient++ - 0.3.5.2 2008-09-24
    2010-02-24 13:03:03: message:CACHE.\NSClient++.cpp:262: Booting: NSClientpp (Nagios) 0.3.5.2 2008-09-24 w32
    2010-02-24 13:03:03: message:CACHE.\NSClient++.cpp:370: Attempting to start NSCLient++ - 0.3.5.2 2008-09-24
    2010-02-24 13:03:03: debug:CACHE.\NSClient++.cpp:773: Loading plugin: CheckDisk...
    2010-02-24 13:03:03: debug:CACHE.\NSClient++.cpp:773: Loading plugin: Event log Checker....
    2010-02-24 13:03:03: debug:CACHE.\NSClient++.cpp:773: Loading plugin: Helper function...
    2010-02-24 13:03:03: debug:CACHE.\NSClient++.cpp:773: Loading plugin: CheckSystem...
    2010-02-24 13:03:03: debug:CACHE.\NSClient++.cpp:773: Loading plugin: File logger...
    2010-02-24 13:03:03: debug:CACHE.\PDHCollector.cpp:66: Autodetected w2k or later, using w2k PDH counters.
    2010-02-24 13:03:03: debug:CACHE.\PDHCollector.cpp:103: Using index to retrive counternames
    2010-02-24 13:03:03: message:CACHE.\FileLogger.cpp:93: Log path is: C:\NSClient++\\nsclient.log
    2010-02-24 13:03:03: debug:CACHE.\NSClient++.cpp:773: Loading plugin: NRPE server...
    2010-02-24 13:03:03: debug:CACHE.\PDHCollector.cpp:123: Found countername: CPU:    \Processor(_total)\% Processor Time
    2010-02-24 13:03:03: debug:CACHE.\PDHCollector.cpp:124: Found countername: UPTIME: \System\System Up Time
    2010-02-24 13:03:03: debug:CACHE.\PDHCollector.cpp:125: Found countername: MCL:    \Memory\Commit Limit
    2010-02-24 13:03:03: debug:CACHE.\PDHCollector.cpp:126: Found countername: MCB:    \Memory\Committed Bytes
    2010-02-24 13:03:03: debug:CACHE.\NSClient++.cpp:773: Loading plugin: NSClient server...
    2010-02-24 13:03:03: debug:CACHEd:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:637: Bound to: 0.0.0.0:5666
    2010-02-24 13:03:03: debug:CACHE.\NSClient++.cpp:773: Loading plugin: SystemTray...
    2010-02-24 13:03:03: debug:d:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:637: Bound to: 0.0.0.0:12489
    2010-02-24 13:03:03: message:.\NSClient++.cpp:476: NSCLient++ - 0.3.5.2 2008-09-24 Started!
    2010-02-24 13:03:03: debug:.\TrayIcon.cpp:53: Failed to load: ChangeWindowMessageFilter aparently we are not on Vista...
    2010-02-24 13:03:03: message:.\NSClient++.cpp:278: Using settings from: INI-file
    2010-02-24 13:03:03: message:.\NSClient++.cpp:279: Enter command to inject or exit to terminate...

  6. #6


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,704
    Thank Post
    285
    Thanked 788 Times in 615 Posts
    Rep Power
    226
    Couple of things.

    1) You're not on the latest version - 0.3.7 is current. Downloads - NSClient++ - Trac. You're missing a few bugfixes.
    2) These lines are of interest:

    Code:
    2010-02-24 13:01:44: error:CACHEd:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:645: bind failed: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.
    2010-02-24 13:01:44: error:d:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:668: Socket did not start properly, we will now do nothing...
    2010-02-24 13:01:44: error:d:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:645: bind failed: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.
    2010-02-24 13:03:03: debug:CACHEd:\documents\Visual Studio 2005\Projects\NSCP\branches\stable\include\Socket.h:637: Bound to: 0.0.0.0:5666
    And that log does seem rather chatty compared to what I'd normally expect.

    If you telnet to 12489 from the Nagios box (or use nmap -p 12489 nsclientIPAddress) does the port show as open?
    Last edited by pete; 24th February 2010 at 05:56 PM.

  7. #7

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Quote Originally Posted by pete View Post
    If you telnet to 12489 from the Nagios box (or use nmap -p 12489 nsclientIPAddress) does the port show as open?
    Code:
    PORT             STATE           SERVICE
    12489/tcp       open             unknown
    
    Nmap done: 1 IP address (1 host up) scanned in....
    Downloading latest version to try that now. Will post back soon!

  8. #8

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Don't want to speak to soon but seems the latest version of NSClient has got it working.

    Will post back soon when definate!

  9. #9

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Yep - that newer version has got it going!

    Just got to spend a little time doing the rest of the servers, and working out what services I need to monitor.

    Having trouble getting it to monitor a HP ProCurve switch too. The ping returns ok but it can't get the uptime through snmp:

    Code:
    External command error: Timeout: No Response from IPADDRESS:161.

  10. #10


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,704
    Thank Post
    285
    Thanked 788 Times in 615 Posts
    Rep Power
    226
    Quote Originally Posted by Hightower View Post
    Yep - that newer version has got it going!

    Just got to spend a little time doing the rest of the servers, and working out what services I need to monitor.

    Having trouble getting it to monitor a HP ProCurve switch too. The ping returns ok but it can't get the uptime through snmp:

    Code:
    External command error: Timeout: No Response from IPADDRESS:161.
    Assuming the community is set correctly on the switch, it has snmp turned on, the switch and nagios are expecting the same version of snmp and the nagios box is allowed snmp access (iirc you can filter access on HP switches). Does snmpwalk send anything useful back?
    Code:
    pete@server:~$ snmpwalk -v 1 -c public SWITCHIP
    (-v = snmp version, -c = community name)

    Should dump a few screens of info similar to
    Code:
    SNMPv2-MIB::sysDescr.0 = STRING: ProCurve J9088A Switch 2610-48, revision R.11.22, ROM R.10.06 (/sw/code/build/nemo(ndx))
    SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.11.2.3.7.11.77
    DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (58377345) 6 days, 18:09:33.45
    SNMPv2-MIB::sysContact.0 = STRING: Redacted 
    SNMPv2-MIB::sysName.0 = STRING: Room 25 Procurve 2610-48G
    SNMPv2-MIB::sysLocation.0 = STRING: Room 25
    SNMPv2-MIB::sysServices.0 = INTEGER: 74
    IF-MIB::ifNumber.0 = INTEGER: 55
    IF-MIB::ifIndex.1 = INTEGER: 1
    IF-MIB::ifIndex.2 = INTEGER: 2
    IF-MIB::ifIndex.3 = INTEGER: 3
    IF-MIB::ifIndex.4 = INTEGER: 4
    IF-MIB::ifIndex.5 = INTEGER: 5
    IF-MIB::ifIndex.6 = INTEGER: 6
    IF-MIB::ifIndex.7 = INTEGER: 7
    IF-MIB::ifIndex.8 = INTEGER: 8
    IF-MIB::ifIndex.9 = INTEGER: 9
    IF-MIB::ifIndex.10 = INTEGER: 10
    IF-MIB::ifIndex.11 = INTEGER: 11
    IF-MIB::ifIndex.12 = INTEGER: 12
    IF-MIB::ifIndex.13 = INTEGER: 13
    IF-MIB::ifIndex.14 = INTEGER: 14
    snipped for brevity

  11. #11

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    I've tried an snmpwalk of all versions (1, 2c, 3) and each one returns Timeout: No response from IPADDRESS.

    As far as I can tell SNMP is enabled, but the only config settings I can find on switch (even when telnetting in) is for the community strings.

    That said, the public community string is already set with read access.

  12. #12


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,704
    Thank Post
    285
    Thanked 788 Times in 615 Posts
    Rep Power
    226
    I've just had a look on a Procurve 2610 here and I can't see anything special about our config.

    Code:
    Startup configuration:
    
    ; J9088A Configuration Editor; Created on release #R.11.22
    
    hostname "Room 25 Procurve 2610-48G" 
    snmp-server contact "Redacted" 
    snmp-server location "Room 25" 
    no telnet-server 
    trunk 49-50 Trk1 Trunk 
    ip default-gateway gatewayIP 
    sntp server dcIP
    timesync sntp 
    sntp unicast 
    snmp-server community "public" 
    vlan 1 
       name "DEFAULT_VLAN" 
       untagged 1-48,51-Trk1 
       ip address IP MASK 
       exit 
    ip authorized-managers serverIP
    ip authorized-managers workstationIP
    ip authorized-managers nagiosboxIP
    ip authorized-managers workstationIP
    spanning-tree Trk1 priority 4
    ip ssh
    password manager
    Can you snmpwalk anything from the nagios box?

  13. #13

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Just did an SNMPWALK from nagios to an APC UPS I have recently setup - works fine to that

  14. #14

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    Hightower: Let me know how you go with nsclient++ on any win7 or win2008R2 servers (if youve got any), I cant get the service to install / auto start on those..



SHARE:
+ Post New Thread

Similar Threads

  1. Nagios - do you use it?
    By somabc in forum *nix
    Replies: 20
    Last Post: 20th August 2008, 09:19 PM
  2. Nagios Headache
    By evrydayzawrkday in forum *nix
    Replies: 6
    Last Post: 14th June 2008, 12:33 AM
  3. Nagios Problems
    By DanW in forum *nix
    Replies: 5
    Last Post: 7th May 2008, 02:56 PM
  4. nagios and snmp
    By uk101man in forum *nix
    Replies: 9
    Last Post: 18th April 2008, 02:58 AM
  5. nagios error
    By dezt in forum *nix
    Replies: 13
    Last Post: 13th March 2008, 03:02 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •