Jump to content

Recommended Posts

Posted

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.

Posted

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

 

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.

Posted
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

 

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.

Posted

Not sure what to look for. Here's the output from todays events:

 

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...

Posted (edited)

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:

 

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?

Edited by pete
Posted
If you telnet to 12489 from the Nagios box (or use nmap -p 12489 nsclientIPAddress) does the port show as open?

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!

Posted

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:

 

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

Posted
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:

 

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?

pete@server:~$ snmpwalk -v 1 -c public SWITCHIP

 

(-v = snmp version, -c = community name)

 

Should dump a few screens of info similar to

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

Posted

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.

Posted

I've just had a look on a Procurve 2610 here and I can't see anything special about our config.

 

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?

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...