I have a Powershell script that I'm running via nrpe as an external script. The windows server (2008) is running nsclient++ (nscp.exe) v 0.4.1.102.
The return section of my powershell script looks like this
} else {
write-host "ok $queue|queue = $queue"
exit 0
}
And the wrapper script to call the ps1 file looks like this:
ps1 = cmd /c echo C:\\NetAdmin\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
If I run this from a windows command prompt the output looks something like:
ok 93|queue = 93
But when I run is using check_nrpe from my nagios server the output changes to:
ok 93|'queue''=0 '93'=0
Nagios is having an issue processing the performance data.
UPDATE: After filing a bug report, the software author replied that this is desired behavior, but that there are two options for disabling it in the nsclient.ini:
Globally (All scripts)
[/settings/external scripts/scripts/default]
ignore perfdata = true
Single script
[/settings/external scripts/scripts/check_foo]
ignore perfdata = true