Closed djmcd89 closed 6 months ago
Thank you for your pull request :+1:, I will have a look.
Hi @markuslf Can you estimate when this PR may be merged? This is a nice feature, which would be very helpful.
Thanks in advance.
Next week, I'm currently on vacation.
Improved the code afterwards (no need for your function range2human(value)
, since the Nagios range support is built into the Linuxfabrik libraries). I improved the output as well.
Changed the operator to range. Changed the argument type to string for the warning and critical arguments. Added function range2human, which checks for a colon in the given arguments (warning and critical).
Then splits the numeric values from the colon, checks that they contain only digits and uses the lib.human.bytes2human function to translate to a human readable format. Added an error count and adapted the output to contain the number of files which are out of scope instead of listing all files in the directory. Edited the output to contain the accepted ranges if a range is specified.
Original output:
Updated output with error count:
Output with range specified: