[Nagiosplug-devel] [ nagiosplug-Bugs-2973603 ] disk_check, -g group, failing calculations

SourceForge.net noreply at sourceforge.net
Mon Aug 16 12:34:57 CEST 2010


Bugs item #2973603, was opened at 2010-03-20 12:52
Message generated for change (Comment added) made by bekar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2973603&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: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Bekar (bekar)
Assigned to: Matthias Eble (psychotrahe)
Summary: disk_check, -g group, failing calculations

Initial Comment:
>From a tinderbox build:

#   Failed test 'grouping: exit warning if the sum of free megs on mp1+mp2 is between -w and -c '
#   at ./t/check_disk.t line 312.
#          got: 0
#     expected: 1
# Looks like you failed 1 test of 78.

..

Testing: ./check_disk -w 350 -c 348 -g group -p / -p /boot
not ok 68 - grouping: exit warning if the sum of free megs on mp1+mp2 is between -w and -c

Manually running the test and the check_disk command used to get the amount of disk space in the test shows:

[root at dev00 plugins]# ./check_disk -w 350 -c 348 -p / -p /boot
DISK CRITICAL - free space: / 275 MB (15% inode=91%); /boot 74 MB (80% inode=99%);| /=1518MB;1540;1542;0;1890 /boot=18MB;-252;-250;0;98
[root at dev00 plugins]# ./check_disk -w 350 -c 348 -g group -p / -p /boot
DISK OK - free space: group 500 MB (26% inode=91%);| group=1386MB;1639;1641;0;1989

The test is doing the calculation properly (349), adding one and taking one for warning / critical.

The check_disk it's self is coming up with the wrong number for free space in the group.

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

>Comment By: Bekar (bekar)
Date: 2010-08-16 20:34

Message:
For point-in-time reference, what the check_disk.t uses to get the
available
space, coupled with a 'df' just to make sure I'm not going loony:

]# ./check_disk -w 1 -c 1 -p / -p /boot
DISK OK - free space: / 143 MB (8% inode=90%); /boot 74 MB (79%
inode=99%);|
/=1649MB;1889;1889;0;1890 /boot=19MB;97;97;0;98
]# df -vh
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
                     1.9G  1.7G  144M  92% /
/dev/hda1              99M   20M   75M  21% /boot
tmpfs                 250M     0  250M   0%
/dev/shm

Then the strange output:

]# ./check_disk -vvvv -w 218 -c 216 -g group -p / -p /boot
calling stat on /
calling stat on /boot
Group of /: group
calling stat on /
Group group: add 36758 blocks (/)
calling stat on /
Group group: add 75817 blocks (/boot)
For group, total=585138, available=112575, available_to_root=142779,
used=442359, fsp.fsu_files=525816, fsp.fsu_ffree=479159
For group, used_pct=80 free_pct=20 used_units=1503 free_units=382
total_units=1989 used_inodes_pct=9 free_inodes_pct=91
fsp.fsu_blocksize=3565
mult=1048576
Freespace_units result=0
Freespace% result=0
Usedspace_units result=0
Usedspace_percent result=0
Usedinodes_percent result=0
Freeinodes_percent result=0
Group of /boot: group
DISK OK - free space: group 382 MB (20% inode=91%);|
group=1503MB;1771;1773;0;198

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

Comment By: Matthias Eble (psychotrahe)
Date: 2010-08-16 09:38

Message:
Hi Bekar,

thanks for your report and running the test cases.
Could you please send the failing grouping call with -vvvv added? This
should ease finding the problem.

Matthias

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

Comment By: Bekar (bekar)
Date: 2010-03-20 12:59

Message:
Bloody hell, bad reporting there, sorry.

Plugin Version (-V output): check_disk v1.4.14-65-ge11b (nagios-plugins
1.4.14)
Operating System: Linux (Centos 5)
Architecture: x86_64
Compiler: gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)


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

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




More information about the Devel mailing list