ChadSikorra / nagios-check-smb-file

Nagios plugin to check a file on a SMB share
4 stars 11 forks source link

Issue with SMB Fileshare Monitoring in CentOS7 #6

Open bsivavani opened 4 years ago

bsivavani commented 4 years ago

Hi,

We are using check_smb_file.pl plugin for checking smb fileshare monitoring and getting below error

[root@nagios Filesys-SmbClient-3.2]# /usr/local/nagios/libexec/check_smb_file.pl -H domain -f '/share'-F .* -U username -P password -W domain -c 900seconds Can't locate Filesys/SmbClient.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/check_smb_file.pl line 494. BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_smb_file.pl line 494. [root@nagios Filesys-SmbClient-3.2]#

On CentOS 7, we have smbclient version 4.9.1 packages (libsmbclient.x86_64 and libsmbclient-devel.x86_64) available which is not supporting with current smb perl module. We tried to install Filesys-SmbClient-3.2 on CentOS 7 server, but getting below error

[root@nagios Filesys-SmbClient-3.2]# ./configure checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for working alloca.h... yes checking for alloca... yes checking for smbc_mkdir in -lsmbclient... yes checking for smbc_open in -lsmbclient... yes checking for smbc_fstat in -lsmbclient... yes checking for smbc_init_context in -lsmbclient... yes You don't define SMBCTXX->flags. Samba older than 3.0.11. Filesys::SmbClient::set_flag will not work You use SMBCTXX->close (release < 3.0.20). configure: creating ./config.status config.status: creating config.h config.status: config.h is unchanged [root@nagios Filesys-SmbClient-3.2]#

Kindly advice how to use this plugin in CentOS 7 ?