check_disk perfdata as percentages

Holger Weiß holger at zedat.fu-berlin.de
Tue Dec 17 22:24:51 CET 2013


* eponymous alias <eponymousalias at yahoo.com> [2013-12-16 08:07]:
>     % ./check_disk -w 20% -c 10% -p /
>     DISK WARNING - free space: / 1425 MB (13% inode=75%);| /=9299MB;8666;9749;0;10833
> 
> There we see that the space is listed in the message as an absolute
> value in MB (reasonable in that context), and imposing a "-u %"
> option would necessarily default the "MB" measurement for that
> absolute value, by disallowing other -u settings.
> 
> So I propose instead to support a -P (--percentage-perfdata)
> option, with no arguments, to convert the perfdata (only) to all
> percentage values:
> 
>     % ./check_disk -w 20% -c 10% -p / -P
>     DISK WARNING - free space: / 1425 MB (13% inode=75%);| /=86%;80;90;0;100
> 
> Does this seem to folks here like a reasonable design?

Sounds good to me.

> If so, I'll make the code changes, test, and contribute them back here.

Thanks!  (A pull request on GitHub would be preferred.)

Holger



More information about the Devel mailing list