district09/check_ms_win_tasks

Failed to execute check_ms_win_tasks: 87: Incorrect Parameter

Closed this issue · 1 comments

Hello,

When I try to execute this command
check_nrpe -H 192.168.0.30 -p 5666 -c check_ms_win_tasks -a '-H 127.0.0.1 -ET Microsoft'

I get : Failed to execute check_ms_win_tasks: 87: Incorrect Parameter

If I add -n:
check_nrpe -H 192.168.0.30 -n -p 5666 -c check_ms_win_tasks -a '-H 127.0.0.1 -ET Microsoft'

I get:
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

What I've done:

Add into NSClient.ini:

[/settings/external scripts/scripts]
check_ms_win_tasks=cmd /c echo scripts/powershell/check_ms_win_tasks.ps1 $ARG1$; exit $LastExitCode | powershell.exe /noprofile -command -

Created a new command in the CCM named "check_ms_win_tasks" with this command "$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 60 -c check_ms_win_tasks $ARG1$"

Disable UAC and DEP on the Windows Server, allow execution of script with: set-executionpolicy remotesigned.
When I execute the script in local, it works.

Can you help me ?

Thank you !

@luxaivo As the script works locally, this seems more like a Nagios / NRPE problem.. Please make a thread at https://support.nagios.com/forum/viewforum.php?f=6