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

Invoke-IcingaCheckDirectory --Add filenames in output

Open drapiti opened this issue 1 year ago • 3 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

drapiti avatar May 12 '23 10:05 drapiti

Using option IcingaCheckDirectory_Switchparameter_ShowFileList true

drapiti avatar May 12 '23 11:05 drapiti

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

drapiti avatar May 12 '23 12:05 drapiti

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

image

drapiti avatar May 12 '23 13:05 drapiti