Bat Unknown command(s)


Hi, i try to use a .bat tu monitor a windows serveur 2008R2, but i have an error: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): check_test

In nsclient.ini i have:

[/settings/external scripts/wrappings]

; POWERSHELL WRAPPING - ps1 = cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -


; VISUAL BASIC WRAPPING - vbs = cscript.exe //T:30 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS% [/settings/external scripts/script] check_test=scripts\test.bat

I tried tu put: check_test=scripts\test.bat and check_test=“C:\Program Files\NSClient++\scripts\test.bat”

But it’s the same.

In this server i tried to execute a .vbs and a .ps1 and it works.

Can you help me ?



Wrapped scripts goes under a different sectioncalled (I think)

[/settings/external scripts/wrappings]
bat = scripts\%SCRIPT% %ARGS%
[/settings/external scripts/wrapped scripts]


Thanks, but i hase the same issue :(sweat:


Which version and what does the log say?


In the nsclient.log i have: 2015-11-10 14:54:52: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): test.bat available commands: commands {, alias_cpu, alias_cpu_ex, alias_disk, alias_disk_loose, alias_event_log, alias_file_age, alias_file_size, alias_mem, alias_process, alias_process_count, alias_process_hung, alias_process_stopped, alias_sched_all, alias_sched_long, alias_sched_task, alias_service, alias_service_ex, alias_up, alias_volumes, alias_volumes_loose, check_always_critical, check_always_ok, check_always_warning, check_counter, check_cpu, check_critical, check_drivesize, check_eventlog, check_files, check_memory, check_multi, check_negate, check_nscp, check_ok, check_os_version, check_pagefile, check_pdh, check_process, check_service, check_test, check_timeout, check_uptime, check_version, check_warning, checkalwayscritical, checkalwaysok, checkalwayswarning, checkcounter, checkcpu, checkcritical, checkdrivesize, checkeventlog, checkfiles, checkmem, checkmultiple, checkok, checkprocstate, checkservicestate, checkuptime, checkversion, checkwarning, filter_perf, negate, nsca_submit, render_perf, timeout, xform_perf}, plugins {, 0, 1, 2, 3, 4, 5, 7} 2015-11-10 14:54:52: error:D:\source\nscp\include\nscapi\nscapi_core_wrapper.cpp:159: Failed to execute command 2015-11-10 14:54:52: error:D:\source\nscp\include\nscapi\nscapi_core_helper.cpp:95: Failed to execute command: test.bat

I use the version X64 on a Windows server 2008R2



Failed to execute command: test.bat

You should be trying to execute check_test not test.bat…


That’s what i execute.

In Nagios, i launch: ./check_nrpe -H vm-XXX -c check_test


Do you have anything under /settings/external scripts/alias that might conflict?


I dont’t think so. It’s a new install of nsclient++. The only thing i’ve changed in the nsclient.ini is the port. (now 1248).

The rest of the nsclient.ini was not changed. I just use one script: test.bat


It’s now working wite the version NSCP-


Hi, sr u have a body the big TTT