check_disk_smb not working

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.
Post Reply
TheidenHD
Posts: 2
Joined: Tue Apr 22, 2025 11:09 am

check_disk_smb not working

Post by TheidenHD »

I'm trying to monitor some SMB shares, but I run into a weird problem.
If I run the plugin in the console, it works, but if Nagios runs it, I get the "Result from smbclient not suitable" message.
I modified it so I can see the actual return message from smbclient :

Code: Select all

/usr/bin/smbclient //192.168.1.10/Drive -U user%password -m SMB3 -c du
Can't load /etc/samba/smb.conf - run testparm to debug it
ERROR: Could not determine network interfaces, you must use a interfaces config line
Result from smbclient not suitable
UNKNOWN
TheidenHD
Posts: 2
Joined: Tue Apr 22, 2025 11:09 am

Re: check_disk_smb not working

Post by TheidenHD »

I did some more experimenting, and it seems to be a permission problem.
I tried with a custom file location, and it always says "Unable to read config file".
I tried multiple locations and double-checked the file and folder permissions; it should be able to read it.

Code: Select all

./check_disk_smb -H 192.168.1.10 -s Drive -u user -p password -m SMB3 -C /tmp/smb.conf

namei -l /tmp/smb.conf
f: /tmp/smb.conf
dr-xr-xr-x root root /
drwxrwxrwt root root tmp
-rwxr-xr-x root root smb.conf
Post Reply