NSClient++ Help (#1) - Problems with 0.3.9 and 0.4.0 (#988) - Message List

Problems with 0.3.9 and 0.4.0

I tried to report a problem yesterday. That message appears to have been discarded because I messed up the registration process.

Anyway, I was attempting to report that version 0.4.0.172 on Windows 7 was refusing to load both the nscplistener and the nrpelistener. I no longer have a copy of the specific message. I thought I had taken care of that by posting it.

Since then, I've been trying to use 0.3.9.327 on Window 7 and 0.3.9.328 on Windows 2008 R2. On W7 it seems to work fine. On the server, however, I get the following:

2012-06-06 09:35:40: message:modules\FileLogger\FileLogger.cpp:86: Starting to log for: NSClient++ - 0.3.9.328 2011-08-16
2012-06-06 09:35:41: message:CACHENSClient++.cpp:445: Booting: NSClientpp (Nagios) 0.3.9.328 2011-08-16 x64
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:1216: Enabling debug mode...
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:557: Attempting to start NSCLient++ - 0.3.9.328 2011-08-16
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:1007: Loading plugin: CheckDisk...
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:1007: Loading plugin: Event log Checker....
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:1007: Loading plugin: Helper function...
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:1007: Loading plugin: CheckSystem...
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:1007: Loading plugin: CheckWMI...
2012-06-06 09:35:41: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:73: Autodetected w2k or later, using w2k PDH counters.
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:1007: Loading plugin: File logger...
2012-06-06 09:35:41: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:110: Using index to retrive counternames
2012-06-06 09:35:41: message:CACHEmodules\FileLogger\FileLogger.cpp:87: Log path is: C:\Program Files\NSClient++
nsclient.log
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:1007: Loading plugin: NRPE server (w/ SSL)...
2012-06-06 09:35:41: debug:CACHEmodules\NRPEListener\NRPEListener.cpp:92: Loading all commands (from NRPE)
2012-06-06 09:35:41: debug:CACHEmodules\NRPEListener\NRPEListener.cpp:122: Starting NRPE socket...
2012-06-06 09:35:41: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:130: Found countername: CPU: \Processor(_total)\% Processor Time
2012-06-06 09:35:41: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:131: Found countername: UPTIME: \System\System Up Time
2012-06-06 09:35:41: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:132: Found countername: MCL: \Memory\Commit Limit
2012-06-06 09:35:41: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:133: Found countername: MCB: \Memory\Committed Bytes
2012-06-06 09:35:41: debug:CACHENSClient++.cpp:1007: Loading plugin: NSClient server...
2012-06-06 09:35:41: debug:include\Socket.h:683: Bound to: 0.0.0.0:5666
2012-06-06 09:35:41: debug:NSClient++.cpp:709: NSCLient++ - 0.3.9.328 2011-08-16 Started[[BR]] 2012-06-06 09:35:41: debug:include\Socket.h:683: Bound to: 0.0.0.0:12489
2012-06-06 09:35:41: message:NSClient++.cpp:461: Using settings from: INI-file
2012-06-06 09:35:41: message:NSClient++.cpp:462: Enter command to inject or exit to terminate...
2012-06-06 09:35:43: debug:NSClient++.cpp:1144: Injecting: alias_disk:
2012-06-06 09:35:43: message:NSClient++.cpp:1195: No handler for command: 'alias_disk'`
2012-06-06 09:35:43: message:include\NSCHelper.cpp:238: No handler for command 'alias_disk'.
2012-06-06 09:35:43: message:include\NSCHelper.cpp:238: No handler for command 'alias_disk'.
2012-06-06 09:36:17: debug:NSClient++.cpp:1144: Injecting: alias_cpu:
2012-06-06 09:36:17: message:NSClient++.cpp:1195: No handler for command: 'alias_cpu'
2012-06-06 09:36:17: message:include\NSCHelper.cpp:238: No handler for command 'alias_cpu'.

My config file is (without the comments to shorten the post) :

[modules]
NRPEListener.dll
NSClientListener.dll
CheckWMI.dll
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
CheckEventLog.dll
CheckHelpers.dll

[crash]

[Settings]
use_file=1
allowed_hosts=192.168.1.14/255.255.255.0

[log]
file=nsclient.log
date_mask=%Y-%m-%d %H:%M:%S

[NSClient]

[NRPE]

[Check System]

[External Script]

[Script Wrappings]
vbs=cscript.exe T:30 NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%
ps1=cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
bat=scripts\%SCRIPT% %ARGS%

[External Scripts]

[External Alias]
alias_cpu=checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_cpu_ex=checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=page
alias_up=checkUpTime MinWarn=1d MinWarn=1h

alias_disk=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll? FilterType?=FIXED
alias_disk_loose=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll? FilterType?=FIXED ignore-unreadable
alias_volumes=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll?=volumes FilterType?=FIXED
alias_volumes_loose=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll?=volumes FilterType?=FIXED ignore-unreadable

alias_service=checkServiceState CheckAll?
alias_service_ex=checkServiceState CheckAll? "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvc
alias_process=checkProcState "$ARG1$=started"
alias_process_stopped=checkProcState "$ARG1$=stopped"
alias_process_count=checkProcState MaxWarnCount?=$ARG2$ MaxCritCount?=$ARG3$ "$ARG1$=started"
alias_process_hung=checkProcState MaxWarnCount?=1 MaxCritCount?=1 "$ARG1$=hung"

alias_event_log=CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source != 'SideBySide?'" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"

alias_file_size=CheckFiles "filter=size > $ARG2$" "path=$ARG1$" MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" max-dir-depth=10
alias_file_age=checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"

alias_sched_all=CheckTaskSched "filter=exit_code ne 0" "syntax=%title%: %exit_code%" warn=>0
alias_sched_long=CheckTaskSched "filter=status = 'running' AND most_recent_run_time < -$ARG1$" "syntax=%title% (%most_recent_run_time%)" warn=>0
alias_sched_task=CheckTaskSched "filter=title eq '$ARG1$' AND exit_code ne 0" "syntax=%title% (%most_recent_run_time%)" warn=>0

alias_updates=check_updates -warning 0 -critical 0

check_ok=CheckOK Everything is fine[[BR]]

[Wrapped Scripts]

[NSCA Agent]
[NSCA Commands]

This same config works fine with Windows 7.

Thanks in advance for any clue. Regards Philippe

  • Message #2620

    Just to make sure I follow :)

    First you had issue with 0.4.0 in regards to loading both NRPE and NSClient servers? I shall verify this (I haven't created unit tests for NSClientServer yet so could be something that is broken there)...

    Second issue was command not found right? The commands are not found as the aliases you have are managed by the CheckExternalScripts module which from what I can see is not loaded...

    Try adding

    [modules]
    ...
    CheckExternalScripts.dll
    

    Michael Medin

Subscriptions