Icinga / icinga-powershell-plugins

A collection of Windows check plugins for the Icinga PowerShell Framework
GNU General Public License v2.0
51 stars 28 forks source link

Incorrect result for no-folder , Invoke-IcingaCheckDirectory plugin #407

Open ispmonsupporto opened 3 months ago

ispmonsupporto commented 3 months ago

Hi, we found an anomaly for the Invoke-IcingaCheckDirectory plugin The need is to monitor access to a folder / verify folder presence. As per screen in Icinga the result is OK but it should be different because the indicated folder does not exist on the machine.

On the same machine, running the same command the result is "unknown" (and not critical)

no_folder

ispmonsupporto commented 3 months ago

Here , there are two screen for output on command line and version plugin Icinga :

output plugin_icinga

ispmonsupporto commented 3 months ago

Hi,

the problem is already present also with updated version agent, framework agent and plugins

LordHepipud commented 1 month ago

Thank you for the issue. Are you running JEA on the machine and and/or have the REST-Api Feature enabled?

LordHepipud commented 1 month ago

I tried not all possible combination with icinga for Windows by using JEA/No-JEA and API/No-API.

image

For me the plugin always reports - with the settings mentioned above - that the Path does not exist. Could you please try to update to the latest v1.12.x version and check if the issue still persists?

ispmonsupporto commented 1 month ago

Screenshot 2024-08-27 150159 Screenshot 2024-08-27 150333 Hi,

as in screenshoots, we have executed the command on a server where the current plugin version is 1.12.0 but the problem persists

thank you

LordHepipud commented 1 month ago

Just for clarification, what exactly is the issue here? The message on the screenshot is correct, as the path stats with `\'.

Shouldn't it be

F:\iis_share_ccm1xc