Issue using external Plugins


#1

Hello, this is my first post in this community. I will explain my issue in this lines

We are monitoring a lot of servers using NSclient “0.4.1.090” (ping, CPU, HDD spaces, etc) , and 4 server have installed Microsoft Exchange and have specials monitoring (.ps1 files,2 Cas and 2 mailboxes databases servers)

From yesterday at 08:00 AM in the Microsoft Exchange servers, begin to appear some messages in the console in nagios with the Status “UNKNOWN” and the Status Information appear “CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.”

When i see the logs in the servers appear this messages

2019-07-30 17:52:05: l:d:\source\nscp\trunk\modules\checkexternalscripts\commands.hpp:100: Failed to parse arguments for command ‘check_ContentIndexStateHealth’, using old split string method: unknown escape sequence: cmd /c echo Scripts\ExchangeContentIndexStateHealth.ps1 | PowerShell.exe -Command - 2019-07-30 17:52:05: l:d:\source\nscp\trunk\modules\checkexternalscripts\commands.hpp:100: Failed to parse arguments for command ‘check_ReplicationHealth’, using old split string method: unknown escape sequence: cmd /c echo Scripts\ReplicationHealth.ps1 | PowerShell.exe -Command - 2019-07-30 17:52:05: l:d:\source\nscp\trunk\modules\checkexternalscripts\commands.hpp:100: Failed to parse arguments for command ‘check_mbhealth’, using old split string method: unknown escape sequence: cmd /c echo Scripts\MBHealth.ps1 | PowerShell.exe -Command - 2019-07-30 17:52:05: l:d:\source\nscp\trunk\modules\checkexternalscripts\commands.hpp:100: Failed to parse arguments for command ‘check_mxhealth’, using old split string method: unknown escape sequence: cmd /c echo Scripts\check_ms_exchange_2010_health.ps1 -server clsaexmbc01 | PowerShell.exe -Command - 2019-07-30 17:52:05: l:d:\source\nscp\trunk\modules\checkexternalscripts\commands.hpp:100: Failed to parse arguments for command ‘exchange-mapi’, using old split string method: unknown escape sequence: cmd /c echo Scripts\exchange-mapi.ps1 | PowerShell.exe -Command -

It´s strange, we are not do any change in the Servers, no windows update. Just begin to appear yesterday.

I do some tests. Change a older nscp client, a new nscp client, reboot the server…etc.

Thanks in Advanced

Osvaldo


#2

Can you post the commands you are using from nrpe.cfg to run it?

cmd /c echo Scripts\ReplicationHealth.ps1 | PowerShell.exe -Command -

has no ability to pass args to the script from what I can see, I run powershell commands like-

cmd /c echo scripts\powershellescript.ps1 $ARGS$; exit $LastExitCode | powershell.exe -command -

This passes all of the args from nagios to the script