[Nagiosplug-help] Problem with output of check_disk
Ton Voon
ton.voon at altinity.com
Thu Nov 9 23:48:50 CET 2006
Joerg,
On 9 Nov 2006, at 18:15, Joerg Janes wrote:
> Ton Voon schrieb:
>> I think there's two things going on here:
>>
>> 1. The web interface is showing a different output because, I
>> think, you are not running check_disk remotely. All check commands
>> run on the Nagios server. You need NRPE / check_by_ssh / some
>> other mechanism to run check_disk on the monitored server.
> Sauron ist the localhost - therefore I am running the check_disk
> command locally. Do I have to specify the hostname with localhost
> or ti sauron also OK?
I'm afraid that is outside of scope for me. Lookup NRPE or the Nagios
docs for executing plugins remotely.
>> 2. The first set of output from head for /storage/media/video
>> looks correct (bar a rounding error - not sure why that would be
>> true). The /dev is completely wrong though. What OS are you using?
>> Also, can you run df --version to see which version of coreutils
>> you are on.
> I'm running a debian "etch" linux.
>
> I figured out that I have a problem with the permissions. See the
> output below:
>
> sauron:/usr/lib/nagios/plugins# ./check_disk.test
>
> df (GNU coreutils) 5.97
> Copyright © 2006 Free Software Foundation, Inc.
> Dieses Programm ist freie Software. Sie dürfen Kopien davon
> weitergeben gemäß
> der GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
> Es gibt KEINERLEI GARANTIE, so weit das Gesetz es erlaubt.
>
> Geschrieben von Torbjorn Granlund, David MacKenzie und Paul Eggert.
>
> Dateisystem Größe Benut Verf Ben% Eingehängt auf
> /dev/hda3 56G 1,2G 55G 3% /
> udev 10M 72K 10M 1% /dev
> devshm 380M 0 380M 0% /dev/shm
> /dev/hda1 449M 55M 371M 13% /boot
> /dev/hdb1 116G 37G 79G 32% /storage
> df: »/storage/media/video«: Keine Berechtigung
> /dev/hdc2 60G 33M 60G 1% /backup
>
> 1.40:
> DISK CRITICAL - free space: /storage/media/video 0 GB (100%);| /
> storage/media/video=0GB;0;0;0;0
> 1.43:
> DISK CRITICAL - free space: /storage/media/video
> 136365986965471102819798876160 GB (100% inode=105%);| /storage/
> media/video=1793396483GB;1762311124;-1775496369;104;-1018336566
> 1.44:
> DISK OK - free space: /storage/media/video 14202719064 GB (-179268%
> inode=-48%);| /storage/media/
> video=-2147483648GB;-2147483648;-2147483648;0;-2147483648
> head:
> DISK OK - free space: /storage/media/video 2937176920 GB (-179326%
> inode=-48%);| /storage/media/
> video=-2147483648GB;-2147483648;-2147483648;0;-2147483648
Yes, I think the head figures are due to the permission. This is a
bug - the plugin should error when the figures have not been
collected properly.
Please can you fix the permissions problem and retry the plugin.
> 1.40:
> DISK OK - free space: / 54 GB (98%);| /=1GB;44;49;0;55
> 1.43:
> DISK OK - free space: / 54 GB (98% inode=nan%);| /=1GB;
> 44;49;-2147483648;55
> 1.44:
> DISK OK - free space: /dev 0 GB (99% inode=98%);| /dev=0GB;0;0;0;0
> head:
> DISK OK - free space: /dev 0 GB (99% inode=98%);| /dev=0GB;0;0;0;0
I still don't understand this one. The head version is effectively
doing a "df /dev/hda3". This should match to /, but it looks like it
has found /dev. What is the output from "df /dev/hda3"?
There is possibly a bug here in that it should match the device if
there is an exact match before finding the closest path match.
The workaround is to run check_disk against /, not /dev/hda3.
Also, can you run check_disk without the -u GB parameter? I think,
because the inode value is showing 98% and the free space is showing
99%, that there is a rounding of 10MB down to 0GB.
Ton
http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20061109/b9170470/attachment.html>
More information about the Help
mailing list