nscp icon indicating copy to clipboard operation
nscp copied to clipboard

Characters between : (colon) and ; (semi-colon) gets removed in performance data output, including the colon

Open johanthoren opened this issue 4 years ago • 0 comments

Issue and Steps to Reproduce

  1. Create a powershell script containing:
Write-Output "OK: All is well|'FOO'=10;4:5;6:9;"
  1. Add it as an external command named check_colon.
  2. 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

johanthoren avatar Sep 16 '21 09:09 johanthoren