[Nagiosplug-devel] Patch for check_disk (was: post-1.3.0 features)

Voon, Ton Ton.Voon at egg.com
Fri Mar 7 01:20:06 CET 2003


Can't really argue with the project administrator!

For (3), we have a patch to check_disk, written by my colleague Andy Brown,
which we've been using here but I haven't committed to CVS because I wanted
someone else to have a look through. The patch allows different filesystems
to be monitored with different thresholds, eg:

./check_disk -w 10% -c 5% -p /tmp -p /var -w 5% -c 2% -p /

This will also fulfill feature request 607885 re check_disk and quoting in
-p. check_disk will not work any differently if only one -p is passed.

One gotcha about the way the patch is coded is that if you mix absolute
thresholds with percentage thresholds, then it will not check quite what you
expect:

./check_disk -w 10% -c 5% -p /tmp -w 1000 -c 500 -p /

This will alert on / being < 10% OR 1000 free, when it looks like it should
check < 1000 free. My "fix" to this is a -C to clear current threshold
levels, so it should be:

./check_disk -w 10% -c 5% -p /tmp -C -w 1000 -c 500 -p /

Is this a decent way to go? We use it here because then we can have a single
DISK_UNIX service which checks different thresholds.

Ton <<check_disk.c.patch>> 

> -----Original Message-----
> From:	Karl DeBisschop [SMTP:karl at debisschop.net]
> Sent:	Friday, March 07, 2003 6:57 AM
> To:	Jeremy T. Bouse
> Cc:	Nagis Plugin Devel
> Subject:	Re: [Nagiosplug-devel] post-1.3.0 features
> 
> My TODO List:
> 
> 1) performance data
> 
> 2) millisecond timing
> 
> 3) use libc calls for check_disk (also addinode checking)
> 
> 4) use inline comments and embedded docs to creat external docs like man
> pages and a simple list of each plugin and what they do
> 
> 5) replace defines woth enum and const char where we can
> 
> All of these except (3) have been piloted in one or more plugins, so
> they are are of the nature "complete the process of..."
> 
> --
> Karl
> 


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_disk.c.patch
Type: application/octet-stream
Size: 7286 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20030307/0bca76a4/attachment.obj>


More information about the Devel mailing list