[Nagiosplug-devel] patches for new features of check_disk

Matthias Eble matthias.eble at mailing.kaufland-informationssysteme.com
Sat Feb 10 23:05:30 CET 2007


Hi list,

I made a few patches fot check_disk that add some functionality we need.
They apply cleanly to latest cvs and 1.4.6 if following order is kept: 
check_disk-clearfix.patch, check_disk-grouping.patch, 
check_disk-regex.patch.

So here are the descriptions what they do..

Patch #1:

To me the -C flag was not flexible enough.
   check_disk -w 10% -c 5% -p /tmp -p /var -C -w 100000 -c 50000 -p /
from the examples is quite a nice feature but -p can't be omitted - so 
not all available partions are checked necessarily.
The clearfix patch lets following work as supposed:
   check_disk -w 10% -c 5% -C -w 5% -c 3% -p /tmp
Prior versions only select /tmp. Now all Partitions except /tmp got 10%/5%.


Patch #1.1:
Is a testcase for the clearfix patch. It hopefully increases the 
probability of an inclusion into cvs :)


Patch #2:
Larger (in our case Oracle) databases have multiple data partitions.
That means that the disk status is fine if there are eg 10 data 
partitions and only two of them are full. check_disk couldn't handle 
this up to now. The patch adds a -g/--group=NAME option which enables 
partitions/pathes to be grouped so that the thresholds of a group apply 
to the freespace of all partitions together.

./check_disk -w 10% -c 5% -g mygroup -p /oracle/ETL/sapdata1/ -p 
/oracle/ETL/sapdata2/
DISK OK - free space: mygroup 22912 MB (29% inode=99%);| 
mygroup=53626MB;72570;76602;0;80634


Patch #3:
The third patch adds regex functionality to check_disk. It makes that 
partitions/pathes can be specified using regular expressions (-r/-R).
This makes check_disk meet all our demands in a flexible way leading to 
this example showing all patch features together:
./check_disk -w 10% -c 5% -C -w 10G -c 5G -g mygroup -r 
'^/oracle/ETL/sapdata.*'
DISK OK - free space: / 751 MB (78% inode=87%);... mygroup 69068 MB (44% 
inode=99%); ..

Regular expressions can also be used to specify thresholds for matching 
partitions/pathes without grouping.


I'd be really glad to see the patches or at least the functionality they 
provide in cvs or one of the next releases. To me they are essential, if 
admins (like me) want to limit disk checks to one nagios service.

Please send any kind of feedback to me. I'm interested, what people 
think about it.


regards
matthias

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_disk-regex.patch
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070210/f78e7962/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_disk-clearfix.patch
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070210/f78e7962/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_disk-grouping.patch
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070210/f78e7962/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_disk.t-clearfix.patch
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070210/f78e7962/attachment-0003.ksh>


More information about the Devel mailing list