Icinga / icinga-powershell-plugins

A collection of Windows check plugins for the Icinga PowerShell Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invoke-IcingaCheckDirectory --Add filenames in output

drapiti opened this issue · comments

The checkDirectory check is missing an important detail. When using wildcards we may have many log files to check however currently there is no way of knowing which file is in an error state because the file names are not included with any verbosity setting. This makes incident management difficult because the users would need to search dozens of files.
Example:
image
image

Using option IcingaCheckDirectory_Switchparameter_ShowFileList true

Reopening to fix output. While using the showFileList true option prints the file names which is essential they are for some reason showing as OK rather than in error and the verbosity is set to 0. It would be useful if the output contained some information about the switch which is being used. For example the output in the following may be easier to read if it said something like _ChangeOlderThan 30m for File Count: 2 with the name of the files. The filesize is irrelevant as it was not included as a check parameter.
image
image

Also the check is occasionally going into an unknown state since adding Switchparameter_ShowFileList true

image