[Nagiosplug-devel] Bug in check_disk?

Ben Clewett Ben at clewett.org.uk
Fri May 7 07:50:00 CEST 2004


Voon,

Thanks for the complement.  I hope my work will be enjoyed by somebody. 
  But I would really prefer it to become part of Nagios one day.  I know 
you are keen to get this data into MySQL.  Please let me know any 
problems you are having, and I can try and make it work better for the 
next person.

-----------------------------

My problem with 'check-disk':

Looking at check_disk for my /boot partition, where 'df' returns:

Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda1                46636      8850     35378  21% /boot

$ check_disk -w 10% -c 1% /boot

Gives:

DISK OK - free space: /boot 35 MB (76%);| /boot=34MB;40;44;0;45

The variables given, according to 
http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 are 
therefore:

Value = 34 MB
Warn  = 40 MB
Crit  = 44 MB
Min   =  0 MB
Max   = 45 MB

First there is an errors.  Either the Value is 35 and not 34, or the 
free space is 34 and not 35.  Maybe one is in x1000 and other in x1024? 
  Also the percentages (21% and 76%) hardly add to 100%  Somebody is lying..

Basically, from:

http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT

The metric must be 'ok when low, bad when big'.  This is not the case 
here, the value reports disk space and not disk use!

Which is interesting, as the other metrics report disk use:

Value = Disk Space.
Warn  = Disk Use.
Crit  = Disk Use.

So, firstly, they cannot be compared.  So not much use on a graph.

This is all hugely annoying!!

Another note:  Should the Max value return the size of the partition? It 
would certainly be more useful this way.  I am not sure what it's 
currently reporting.

------------------------------------

As well as making a polite request to the author of this plugin to 
examine these points.  I was also suggesting some extensions to the 
specification given in the URL above:


1.	All values should be a recording of the same thing, and in the same 
direction.  Therefore directly comparable.

2.	Just to reinforce the point: Values below 'crit' should be in state 
'ok'.  Between 'crit' and 'warn' should be in state 'warning'.  Above 
'crit' should be in state 'critical'.  (Accepting special cases where 
the '[@]start:end' format is used.)

3.	The 'max' and 'min', if used, should reflect the theoretical upper 
and lower limits of the metric.  Eg, the size of a disk, or the 
bandwidth of a connection.


This would be useful for future development, as there would be no 
argument about whether the plugin, or the reader, is in error when crap 
data comes out.


Regards, Ben.





Voon, Ton wrote:

> Ben,
> 
> Just seen your performance graph - looks good! 
> 
> This is a worthy discussion as you are probably the first to try and graph
> the perf data. Can you give an example of what you mean?
> 
> Ton
> 
> -----Original Message-----
> From: Ben Clewett [mailto:Ben at clewett.org.uk] 
> Sent: Friday, May 07, 2004 11:16 AM
> To: nagiosplug-devel at lists.sourceforge.net
> Subject: [Nagiosplug-devel] Bug in check_disk?
> 
> 
> I believe there may be an issue with the latest check_disk plugin.
> 
> In the binary data, the disk size is reported as the space *unused* on 
> the device.  However, the warning and critical sizes are reported as the 
> space *used* on the device.  This makes the metrics very hard to compare.
> 
> Although not exactly specified in the documents, other plugins seem to 
> return absolute and comparable values for all cases.  This does make the 
> data far more accessible.
> 
> If possible, I would also like to suggest to those who decide such 
> things, that exactly specifying that the given numbers should be 
> absolute and comparable, in the documentation, would avoid these type of 
> problems happening again.
> 
> Hope this is of some help,
> 
> Regards, Ben
> 
> 
> 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
> is authorised and regulated by the Financial Services Authority. Egg
> Investments Ltd. is entered in the FSA register under number 190518. 
> 
> 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.
> 





More information about the Devel mailing list