Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute check_ms_win_tasks: 87: Incorrect Parameter #11

Closed
luxaivo opened this issue Jun 22, 2018 · 1 comment
Closed

Failed to execute check_ms_win_tasks: 87: Incorrect Parameter #11

luxaivo opened this issue Jun 22, 2018 · 1 comment

Comments

@luxaivo
Copy link

luxaivo commented Jun 22, 2018

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 !

@willemdh
Copy link
Collaborator

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants