nscp
nscp copied to clipboard
Characters between : (colon) and ; (semi-colon) gets removed in performance data output, including the colon
Issue and Steps to Reproduce
- Create a powershell script containing:
Write-Output "OK: All is well|'FOO'=10;4:5;6:9;"
- Add it as an external command named check_colon.
- Check using check_nrpe:
# /opt/plugins/check_nrpe -s -H <IP> -c "check_colon"
OK: All is well|'FOO'=10;4;6
Expected Behavior
I expected the output to be:
OK: All is well|'FOO'=10;4:5;6:9
Actual Behavior
Instead, the colons and the number following the colons were removed.
OK: All is well|'FOO'=10;4;6
Details
- NSClient++ version: 0.5.2.35
- OS and Version: Windows Server 2016
- Checking from: OP5 and command line
- Checking with: check_nrpe
Additional Details
NSClient++ log:
2021-09-16 11:22:48: debug:c:\source\master\modules\CheckExternalScripts\CheckExternalScripts.cpp:371: Command line: cmd /c echo scripts\custom\check_colon.ps1; exit($lastexitcode) | powershell.exe -command -
ITRS reference ticket: 240089