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

Path not found when pathname contains brackets

Open jschroedertrianel opened this issue 9 months ago • 1 comments

I'm trying to check a directory which contains brackets in the pathname, for example:

c:\temp\test [1]\

I tried several ways of escaping the brackets in the path configuration but nothing seems to work. I always receive

Icinga Invalid Input Error was thrown: Invalid Input Exception: Path not found Invalid Input exception occured: Plugin execution failed because the defined -Path does not exist on this system

jschroedertrianel avatar May 03 '24 11:05 jschroedertrianel

Thank you for the issue. I assume the problem in this case is that the brackets will be handled as regular expression. I will have a look on that.

LordHepipud avatar May 15 '24 11:05 LordHepipud

Could you please try and test the linked PR? this should resolve the issue.

LordHepipud avatar Aug 15 '24 11:08 LordHepipud

Thank you for your help. I tested the provided fix but sadly I still receive the error:

Icinga Invalid Input Error was thrown: Invalid Input Exception: Path not found Invalid Input exception occured: Plugin execution failed because the defined -Path does not exist on this system

jschroedertrianel avatar Aug 23 '24 13:08 jschroedertrianel

Have you rebuild the cache after you made those changes?

icinga -RebuildCache { Restart-IcingaForWindows; };

This should actually resolve the issue.

LordHepipud avatar Aug 29 '24 13:08 LordHepipud