check_disk_smb reporting wrong percentage

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
bruno_mar
Posts: 2
Joined: Wed Feb 18, 2015 10:09 am

check_disk_smb reporting wrong percentage

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_disk_smb reporting wrong percentage

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_disk_smb reporting wrong percentage

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
bruno_mar
Posts: 2
Joined: Wed Feb 18, 2015 10:09 am

Re: check_disk_smb reporting wrong percentage

Post 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 :)
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_disk_smb reporting wrong percentage

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked