Nagios plugin check_disk_smb outputs: Result from smbclient not suitable

Written by - 1 comments

Published on - last updated on March 18th 2021 - Listed in Nagios Linux Monitoring

Just wanted to add a monitoring of a Samba share, when I stumbled over the following error:

# ./check_disk_smb -H -s "plans$" -u plans -p myplan -w 30 -c 50
Result from smbclient not suitable

The plugin seems to have troubles finding the smbclient (which needs to be installed!) or executes it in a bad way.

On the well known Nagios forum I found this topic, which talks about the same problem. Basically a recompilation of the Nagios plugins with smbclient installed should solve the problem. But the recompilation not only needs the smbclient location but seems to also look for Samba header files, which in my case I didn't install.

As an alternative one can manually set the path to the smbclient program in the plugin check_disk_smb. First find out the path to smbclient:

# whereis smbclient
smbclient: /usr/bin/smbclient /usr/bin/X11/smbclient /usr/share/man/man1/smbclient.1.gz

Then modify line 60 (the definition of the $smbclient variable). I copied the original line and commented it:

#my $smbclient = $utils::PATH_TO_SMBCLIENT;
my $smbclient = "/usr/bin/smbclient";

And then the check ran fine:

# ./check_disk_smb -H -s "plans$" -u plans -p myplan -w 30 -c 50
WARNING: Only 20.66G (53%) free on \\\plans$

Other reason: SMB protocol mismatch

Update March 18th 2021

The error "Result from smbclient not suitable" can also be caused by other problems, such as a problem with the SMB protocol version. Take a look at recent article Monitoring of Samba (CIFS) share stops working with error: Result from smbclient not suitable for more information.

Add a comment

Show form to leave a comment

Comments (newest first)

Kyle from wrote on Mar 2nd, 2014:

You will also get this error message if you don't have enough user slots available on the SMB share. I mounted my shared drive, and suddenly the Nagios check was failing. Unmounted it, and it would work just fine. Turns out, there was only 1 connection at a time allowed in Windows Sharing. Moved it up to 2, mounted the drive, and the Nagios check still worked.