icinga-powershell-plugins
icinga-powershell-plugins copied to clipboard
Invoke-IcingaCheckDirectory --Add filenames in output
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:
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.
Also the check is occasionally going into an unknown state since adding Switchparameter_ShowFileList true