NSClient++ Help (#1) - NSClient x64 - Injected Performance Result Error (#551) - Message List
Hi,
I'm using nsclient++ x64 on Windows 2008 Standard x64 and Windows 2008 SBS.
I have an issue with CheckServiceState that return unknown state in Nagios. It seems to be a performance result issue.
2010-03-31 12:05:53: debug:NSClient++.cpp:1073: Injecting: CheckServiceState: CheckAll, exclude=SysmonLog, exclude=VSS, exclude=NtmsSvc, exclude=TBS, exclude=swprv 2010-03-31 12:05:53: debug:NSClient++.cpp:1109: Injected Result: OK 'OK: All services are in their appropriate state.' 2010-03-31 12:05:53: debug:NSClient++.cpp:1110: Injected Performance Result: 'ALG: ERRORAppinfo: ERRORAppMgmt: ERRORAudioEndpointBuilder: ERRORAudioSrv: ERRORCertPropSvc: ERRORclr_optimization_v2.0.50727_32: ERRORclr_optimization_v2.0.50727_64: ERRORCOMSysApp: ERRORdot3svc: ERROREapHost: ERRORFCRegSvc: ERRORfdPHost: ERRORFDResPub: ERRORFontCache: ERRORFontCache3.0.0.0: ERRORFSAUA: ERRORhidserv: ERRORhkmsvc: ERRORidsvc: ERRORKeyIso: ERRORlltdsvc: ERRORMMCSS: ERRORMSiSCSI: ERRORmsiserver: ERRORnapagent: ERRORNetman: ERRORNtFrs: ERRORPerfHost: ERRORpla: ERRORProtectedStorage: ERRORRasAuto: ERRORRasMan: ERRORRpcLocator: ERRORRSoPProv: ERRORsacsvr: ERRORSCardSvr: ERRORSCPolicySvc: ERRORSessionEnv: ERRORSLUINotify: ERRORSNMPTRAP: ERRORSstpSvc: ERRORTapiSrv: ERRORTHREADORDER: ERRORTrkWks: ERRORTrustedInstaller: ERRORUI0Detect: ERRORUmRdpService: ERRORvds: ERRORwbengine: ERRORWcsPlugInService: ERRORWdiServiceHost: ERRORWdiSystemHost: ERRORWecsvc: ERRORwercplsupport: ERRORWinHttpAutoProxySvc: ERRORwmiApSrv: ERRORWPDBusEnum: ERRORwudfsvc: ERROR'
I'm using nsclient++ v0.3.8.29 2010-03-11 Thanks for your help, Regards, kinai
-
Message #1687
If I disable performance_data it's working. Perhaps a buffer size problem ?
kinai04/02/10 12:09:54 (23 months ago) -
Message #1712
Sounds like a "buffer length" issue yes...
Michael Medin
mickem04/14/10 21:29:58 (22 months ago)-
Message #1713
You can use the truncate option here...
mickem04/14/10 21:31:01 (22 months ago)-
Message #1724
If I add truncate=800 on the check command like
$USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckServiceState -a CheckAll? exclude=$ARG1$ exclude=$ARG2$ exclude=$ARG3$ exclude=$ARG4$ exclude=$ARG5$ truncate=800
I get
2010-04-15 09:13:09: error:modules\NRPEListener\NRPEListener.cpp:325: NRPESocketException: To much data cant create return packet (truncate datat)
Thanks for help, Kinai
kinai04/15/10 09:17:14 (22 months ago)-
Message #1725
Which version?
Should work from what I can tell. but might be added recently?
Michael Medin
mickem04/15/10 09:57:15 (22 months ago)-
Message #1732
NSClientpp (Nagios) 0.3.8.29 2010-03-11 x64
kinai04/16/10 12:11:50 (22 months ago)-
Message #1733
humm, strange.. let me look into it then...
mickem04/16/10 12:36:04 (22 months ago)-
Message #1742
please up...
kinai04/21/10 08:42:31 (22 months ago)-
Message #1843
Maybe this will help: I've had the same problem a while ago and wrote a patch to Version 0.3.5. The same code should also work in the actual version, because this code-part did not change.
The problem lies in the performance data length (perf), it breaks the NRPE Packet. Give it a try.
Here is a pastebin link, too: http://pastebin.com/xhDQEQ0i
-- NRPEListener.cpp -- Original:
if (msg.length() >= buffer_length_-1) { NSC_LOG_ERROR(_T("Truncating returndata as it is bigger then NRPE allowes :(")); msg = msg.substr(0,buffer_length_-2); } if (perf.empty()||noPerfData_) { return NRPEPacket(NRPEPacket::responsePacket, NRPEPacket::version2, ret, msg, buffer_length_); } else { return NRPEPacket(NRPEPacket::responsePacket, NRPEPacket::version2, ret, msg + _T("|") + perf, buffer_length_); }New:
if (perf.empty()||noPerfData_) { if (msg.length() >= buffer_length_ -1 ) { msg = msg.substr(0, buffer_length_ -2); NSC_DEBUG_MSG(_T("Truncating data, to fit into NRPE packet...")); } return NRPEPacket(NRPEPacket::responsePacket, NRPEPacket::version2, ret, msg, buffer_length_); } else { if (msg.length() + perf.length() >= buffer_length_ -1 ) { msg = msg.substr(0, buffer_length_ - perf.length() -3 ); NSC_DEBUG_MSG(_T("Truncating data, to fit into NRPE packet...")); } return NRPEPacket(NRPEPacket::responsePacket, NRPEPacket::version2, ret, msg + _T("|") + perf, buffer_length_); }joergp06/23/10 15:04:25 (20 months ago)
-
-
-
-
-
-
-







