Header RSS Feed Twitter
 
If you only want to see the articles of a certain category, please click on the desired category below:
ALL Android Backup Database Hardware Internet Linux Nagios/Monitoring Personal PHP Proxy Shell VMware Windows Wyse

Nagios plugin check_disk_smb outputs Result from smbclient not suitable
Friday - Mar 9th 2012 - 4.40 pm (+0100) - by Claudio Kuenzler - Switzerland - (0 comments)

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

# ./check_disk_smb -H 192.168.13.14 -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 nagios-portal.org 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 192.168.13.14 -s "plans$" -u plans -p myplan -w 30 -c 50
WARNING: Only 20.66G (53%) free on \\192.168.13.14\plans$

 

Add a comment

Show form to leave a comment

Comments (newest first):

No comments yet.

Go to Homepage home
Linux Howtos how to's
Nagios Plugins nagios plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

9006 Days
until Death of Computers
Why?