[Nagiosplug-devel] [ nagiosplug-Bugs-1627970 ] check_disk performance output for more then one partition

SourceForge.net noreply at sourceforge.net
Sun Jan 7 08:14:41 CET 2007


Bugs item #1627970, was opened at 2007-01-04 11:41
Message generated for change (Comment added) made by dermoth
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1627970&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: Release (specify)
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Sebastian Schubert (bauchi)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_disk performance output for more then one partition

Initial Comment:
The Performancedata generated by check_disk seems to inherit the warning/critical values for the last partitions from one of the previous partitions
Version: check_disk (nagios-plugins 1.4.5) 1.79

Example:
/check_disk -w 80% -c 90%
DISK CRITICAL - free space: / 6772 MB (72% inode=90%); /boot 61 MB (66% inode=99%); /dev/shm 1267 MB (100% inode=99%); /usr/WebSphere 2322 MB (62% inode=92%); /var 26311 MB (93% inode=99%);| /=2584MB;1971;985;0;9858 /boot=31MB;19;9;0;98 /dev/shm=0MB;19;9;0;1267 /usr/WebSphere=1414MB;19;9;0;3937 /var=1732MB;19;9;0;29544

another example:
DISK OK - free space: / 6833 MB (98% inode=-); /dev/shm 442 MB (100% inode=99%); /boot 55 MB (59% inode=-); /data 12583 MB (99% inode=-); /tmp 3134 MB (98% inode=-); /usr 4076 MB (91% inode=-); /var 5407 MB (97% inode=-);| /=93MB;6233;6579;0;6926 /dev/shm=0MB;397;419;0;442 /boot=38MB;84;89;0;94 /data=76MB;84;89;0;12660 /tmp=34MB;84;89;0;3168 /usr=355MB;84;89;0;4431 /var=129MB;84;89;0;5537

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

>Comment By: Thomas Guyot (dermoth)
Date: 2007-01-07 02:14

Message:
Logged In: YES 
user_id=375623
Originator: NO

This bug is due the the re-use of warning_high_tide and critical_high_tide
variables in a loop. I moved their initialization into the loop so that get
re-initialized at each run.

What happens is that when we're looking for percent thresholds, we take
the minimum value between warning_high_tide and some other calculation.
It's ok on the first run, but on subsequent loops warning_high_tide still
holds the value from the previous run.

      if (path->freespace_percent->warning != NULL) {
        warning_high_tide = abs( min( (double) warning_high_tide, (double)
(1.0 - path->freespace_percent->warning->end/100)*dtotal_units ));

I'm not sure though why it's done this way but resetting these variables
at each loop can't hurt and fixes this bug.

This has been committed in CVS.
File Added: check_disk.multiple_perfdata.patch

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

Comment By: Hendrik Bäcker (hendrikb)
Date: 2007-01-05 06:57

Message:
Logged In: YES 
user_id=906410
Originator: NO

Hi all,

it seems, that this just happens, if you want to give warning and critical
threshold in percentage.




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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1627970&group_id=29880




More information about the Devel mailing list