icinga-powershell-plugins icon indicating copy to clipboard operation
icinga-powershell-plugins copied to clipboard

Invoke-IcingaCheckDirectory: path with \t is interpreted as tab in icingaweb2-pluginoutput

Open tectumopticum opened this issue 4 years ago • 1 comments
trafficstars

Director / Service configuration: put C:\temp (without any quotes) in "Path"-field and test.txt in "FileNames".

resulting output after first monitor-execution:

[CRITICAL] Check package "C:\ emp" (Match All) - [CRITICAL] File Count _ [CRITICAL] File Count: Value "1" is greater than threshold "0"

execution-command: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' '-C' 'try { Use-Icinga -Minimal; } catch { Write-Output '''The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details'''; exit 3; }; Exit-IcingaExecutePlugin -Command '''Invoke-IcingaCheckDirectory''' ' '-Path' 'C:\temp' '-FileNames' ''''test.txt'''' '-Critical' '0' '-ChangeOlderThan' '1m' '-Verbosity' '2'

masking didn't work

tectumopticum avatar May 18 '21 18:05 tectumopticum

Thank you for the report. This is a similar issue to #99 which is something we as plugin developers can not fix. Icinga Web 2 will always parse these as control characters, as many other plugins rely on this behavior.

This is nothing we can fix sadly on a regular basis, besides converting all \ within a path to / for example, which I honestly do not want to do for many other reasons.

LordHepipud avatar May 19 '21 09:05 LordHepipud