NSClient++ Help (#1) - NSCP-0.4.0.77-win64 - No data was received from host! (#831) - Message List

NSCP-0.4.0.77-win64 - No data was received from host!

Hi

I am trying to monitor a Win2k8R2 x64, and I use the NSCP-0.4.0.77-win64.zip client(I have tryed with the v3.8, but I got Socket error, and I have not been able to find the problem). I have imported my ini from a Win2k8 x32, that I know is working with my nagios server (Nagios is installed by followin the Quick Start Guide).

But I am not able to get any data from the W2k8R2 client! The status in Nagios is "No data was received from host!", when I run the client with "--test" I get the following message:

d trunk\include\check_nt\server\server.cpp:96   Accepting connection from: MYIP
d k\include\check_nt\server\connection.cpp:37   starting data connection
d k\include\check_nt\server\connection.cpp:61   handle_read data connection
d k\include\check_nt\server\connection.cpp:51   Timeout
d k\include\check_nt\server\connection.cpp:53   Timeout <<<-

Here is the nsclient.ini I use (converted from nsc.ini):

[/modules]
; CheckDisk - CheckDisk can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckDisk=
; Event log Checker. - Check for errors and warnings in the event log. This is only supported through NRPE so if you plan to use only NSClient this wont help you at all.
CheckEventLog=
; Check External Scripts - A simple wrapper to run external scripts and batch files.
CheckExternalScripts=
; Helper function - Various helper function to extend other checks. This is also only supported through NRPE.
CheckHelpers=
; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem=
; CheckTaskSched - CheckTaskSched can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckTaskSched=
; File logger - Writes errors and (if configured) debug info to a text file.
FileLogger=
; NRPE server - A simple server that listens for incoming NRPE connection and handles them. NRPE is preferred over NSClient as it is more flexible. You can of cource use both NSClient and NRPE.
NRPEServer=
; NSClient server - A simple server that listens for incoming NSClient (check_nt) connection and handles them. Although NRPE is the preferred method NSClient is fully supported and can be used for simplicity or for compatibility.
NSClientServer=
; Section for NSClient (NSClientServer.dll) (check_nt) protocol options.
[/settings/NSClient/server]
; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments=true
; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters=true
; BIND TO ADDRESS - Allows you to bind server to a specific local address. This has to be a dotted ip address not a host name. Leaving this blank will bind to all available IP addresses. Parent element can be found under: /settings/default
bind to=
; SSL CERTIFICATE -
certificate=${certificate-path}/nrpe_dh_512.pem
; PERFORMANCE DATA - Send performance data back to nagios (set this to 0 to remove all performance data).
performance data=true
; PORT NUMBER - Port to use for check_nt.
port=12489
; LISTEN QUEUE - Number of sockets to queue before starting to refuse new incoming connections. This can be used to tweak the amount of simultaneous sockets that the server accepts. Parent element can be found under: /settings/default
socket queue size=0
; THREAD POOL -
thread pool=10
; TIMEOUT - Timeout when reading packets on incoming sockets. If the data has not arrived within this time we will bail out.
timeout=30
; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl=false
[/settings/default]
; Undocumented key
allowed hosts=
; Undocumented key
password="""MY_PASSWORD"""
; BIND TO ADDRESS - Allows you to bind server to a specific local address. This has to be a dotted ip address not a host name. Leaving this blank will bind to all available IP addresses. Parent element can be found under: /settings/default
bind to=
; LISTEN QUEUE - Number of sockets to queue before starting to refuse new incoming connections. This can be used to tweak the amount of simultaneous sockets that the server accepts. Parent element can be found under: /settings/default
socket queue size=0
; A list of aliases available. An alias is an internal command that has been "wrapped" (to add arguments). Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/external scripts/alias]
; Undocumented key
alias_cpu=checkCPU warn=80 crit=90 time=5m time=1m time=30s
; Undocumented key
alias_cpu_ex=checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
; Undocumented key
alias_disk=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
; Undocumented key
alias_event_log=alias_event_log_new
; Undocumented key
alias_event_log_new=CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational')" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
; Undocumented key
alias_event_log_old=CheckEventLog file=application file=system filter=new filter=out MaxWarn=1 MaxCrit=1 filter-generated=>2d filter-severity==success filter-severity==informational truncate=800 unique descriptions  "syntax=%severity%: %source%: %message% (%count%)"
; Undocumented key
alias_file_age=checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"
; Undocumented key
alias_file_size=checkFile2 filter=out "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%"
; Undocumented key
alias_file_size_in_dir=checkFile2 filter=out pattern=*.txt "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%"
; Undocumented key
alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=physical
; Undocumented key
alias_process=checkProcState $ARG1$=started
; Undocumented key
alias_service=checkServiceState CheckAll
; Undocumented key
alias_up=checkUpTime MinWarn=1d MinWarn=1h
; Undocumented key
check_ok=CheckOK Everything is fine!
[/settings/external scripts/wrappings]
; Undocumented key
bat=scripts\%SCRIPT% %ARGS%
; Undocumented key
ps1=cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
; Undocumented key
vbs=cscript.exe //T:30 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%
; Section for the EventLog Checker (CHeckEventLog.dll).
[/settings/CheckEventlog]
; BUFFER_SIZE - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
buffer size=131072
; DEBUG - Log all "hits" and "misses" on the eventlog filter chain, useful for debugging eventlog checks but very very very noisy so you don't want to accidentally set this on a real machine.
debug=false
; LOOKUP NAMES -
lookup names=false
; SYNTAX - Set this to use a specific syntax string for all commands (that don't specify one).
syntax=
; Section for external scripts configuration options (CheckExternalScripts).
[/settings/NRPE/client]
; Section for NRPE (NRPEListener.dll) (check_nrpe) protocol options.
[/settings/NRPE/server]
; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments=false
; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters=false
; BIND TO ADDRESS - Allows you to bind server to a specific local address. This has to be a dotted ip address not a host name. Leaving this blank will bind to all available IP addresses. Parent element can be found under: /settings/default
bind to=
; SSL CERTIFICATE -
certificate=${certificate-path}/nrpe_dh_512.pem
; PAYLOAD LENGTH - Length of payload to/from the NRPE agent. This is a hard specific value so you have to "configure" (read recompile) your NRPE agent to use the same value for it to work.
payload length=1024
; PERFORMANCE DATA - Send performance data back to nagios (set this to 0 to remove all performance data).
performance data=true
; PORT NUMBER - Port to use for NRPE.
port=5666
; LISTEN QUEUE - Number of sockets to queue before starting to refuse new incoming connections. This can be used to tweak the amount of simultaneous sockets that the server accepts. Parent element can be found under: /settings/default
socket queue size=0
; THREAD POOL -
thread pool=10
; TIMEOUT - Timeout when reading packets on incoming sockets. If the data has not arrived within this time we will bail out.
timeout=30
; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl=true
; Section for NSCA passive check module.
[/settings/NSCA/agent]
; Configure the NSCA server to report to.
[/settings/NSCA/agent/server]
; ???
[/settings/Task Scheduler]
; Section for system checks and system settings
[/settings/check/system/windows]
; DEFAULT COUNTERS - Load the default counters: cpu, memory commit bytes, memory commit limit and uptime If not you need to specify these manually.
default=true
; DEFAULT INTERVALL - Used to define the default intervall for range buffer checks (ie. CPU).
default buffer length=1h
; Configure crash handling properties.
[/settings/crash]
; ARCHIVE CRASHREPORTS - Archive crash reports in the archive folder
archive=true
; folder - The archive folder for crash dunpes.
archive folder=${shared-path}/crash-dumps
; RESTART - Submit crash reports to nsclient.org (or your configured submission server)
restart=true
; RESTART SERVICE NAME - The url to submit crash reports to
restart target=NSClientpp
; SUBMIT CRASHREPORTS - Submit crash reports to nsclient.org (or your configured submission server)
submit=false
; SUBMISSION URL - The url to submit crash reports to
submit url=http://crash.nsclient.org/submit
; Section for external scripts configuration options (CheckExternalScripts).
[/settings/external scripts]
; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments=false
; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters=false
; SCRIPT DIRECTORY - Load all scripts in a directory and use them as commands. Probably dangerous but useful if you have loads of scripts :)
script path=
; COMMAND TIMEOUT - The maximum time in seconds that a command can execute. (if more then this execution will be aborted). NOTICE this only affects external commands not internal ones.
timeout=60
; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
[/settings/external scripts/scripts]
; Configure loggning properties.
[/settings/log]
; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
date format=%Y-%m-%d %H:%M:%S
; FILENAME - The file to write log data to. If no directory is used this is relative to the NSClient++ binary.
file name=
; LOG LEVEL - Log level to use
level=INFO
; LOG MASK - The log mask information, error, warning, critical, debug
log mask=false
; ROOT - Set this to use a specific syntax string for all commands (that don't specify one).
root=auto
; Section for the Scheduler module.
[/settings/scheduler]
; Schedule defenition for: Default schedule
[/settings/scheduler/default]
; Section for the Scheduler module.
[/settings/scheduler/schedules]
; Section for configuring the shared session.
[/settings/shared session]
; LOG LEVEL - Log level to use
enabled=false

I hope somebody can see a problem :)

Thanks

  • Message #2238

    What command are you using on the nagios side? Could be you are using check_nrpe againast NSCLientServer (which should be accessed from chekc_nt). If you are using check_nrpe then you also need to enable the NRPEServer module (which use a different port).

    Michael Medin

    • Message #2241

      Hi Michael, thanks for your reply

      I have found the problem. SSL was disable on the NSClient side, and '-n' command was not set on the Nagios server.

      Now I just have to found out, how to get the SSL authentication to work :)

      • Message #2246

        Ahh... yes that is also a common issue...

        Michael Medin

Subscriptions