Page 1 of 1

check_disk_smb reporting wrong percentage

Posted: Wed Feb 18, 2015 10:14 am
by bruno_mar
Hello,

I have setup check_disk_smb ( version 2.0.3 ) to check a network share that is 5TB in size. Here is the command:

/usr/local/nagios/libexec/check_disk_smb -H 192.168.118.226 -s pims_livelink24 -w 90% -c 95% -u <username> -p <password>

Which is returning:

Disk ok - 1023G (100%) free on \\192.168.118.226\pims_livelink24 | 'pims_livelink24'=0B;989545365504;1044520108032;0;1099494850560

1023G are available but it is reporting 100% as the percentage. Also it returns 0B in the perf data. Is there some strange bug related to the sizes of ints? Just an initial guess.

Any help would be appreciated.

Re: check_disk_smb reporting wrong percentage

Posted: Wed Feb 18, 2015 4:18 pm
by abrist
Looking at the perl, it should handle the value sizes just fine. I am unsure about smbclient though (as this is what the script calls).
If you connect manually with smbclient and pass it a "du" command, what is the output?

Re: check_disk_smb reporting wrong percentage

Posted: Wed Feb 18, 2015 4:22 pm
by tgriep
The check_disk_smb is a script that uses the smbclient to report the drive space and it looks like smbclient has a drive size limit and that is why it is reporting the wrong sizes.
You may need to use SNMP or another plugin to test the free space of the share.

What type of device is the share hosted on?

Re: check_disk_smb reporting wrong percentage

Posted: Thu Feb 19, 2015 7:02 am
by bruno_mar
Thanks for that.

It does look like this is an issue with the smbclient. By the way the share is hosted on a NetApp.

Does anyone know of any alternatives to the smbclient that I could use to retrieve the actual size? I can always modify the script :)

Re: check_disk_smb reporting wrong percentage

Posted: Thu Feb 19, 2015 1:07 pm
by tgriep
Here is a link to the Nagios Exchange site filtering for Netapp checks. Take a look and see if one of those will work for you.

http://exchange.nagios.org/index.php?op ... ord=netapp