Page 1 of 3

install Filesys::SmbClient (Filesys/SmbClient)

Posted: Tue May 30, 2017 2:41 pm
by SavaSC
Hello,

Trying to set up Windows share monitoring on a new Naigos box. The old box is using check_smb_share.pl to do the checks so I installed this plugin on the new box. Unfortunately, this box is telling me:
(No output on stdout) stderr: Can't locate Filesys/SmbClient.pm in @INC (@INC contains: /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/libex

BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_smb_share.pl line 42.
Looking at the check_smb_share.pl file, I see line 42 says:
use Filesys::SmbClient;
Apparently, I need to install something in order for this to work. How do I need to go about getting this installed?

Thanks!

Re: install Filesys::SmbClient (Filesys/SmbClient)

Posted: Tue May 30, 2017 3:06 pm
by dwhitfield
It's possible you'll need to install other prereqs, but

Code: Select all

cpan
install Filesys::SmbClient
seems to be doing it for me.

Please let us know if you run into further issues. Also, what OS are you on?

Re: install Filesys::SmbClient (Filesys/SmbClient)

Posted: Tue May 30, 2017 3:36 pm
by SavaSC
Thanks for your response.

I tried that and it told me I needed Samba installed. So I tried:

Code: Select all

install  File::Samba
That told me I needed to install Module::Build (but did it in the background).

Unfortunately, it seems there was a problem with the /usr/bin/perl Makefile.PL file that killed both the Samba and SmbClient install. (I have attached a screenshot.) I have no idea how to address this. Do I need another version of this file? Is there some configuration that I should do first?

Thanks!!

Re: install Filesys::SmbClient (Filesys/SmbClient)

Posted: Tue May 30, 2017 3:44 pm
by dwhitfield
Could you use https://exchange.nagios.org//directory/ ... re/details ? That doesn't require Perl dependencies, at least not directly.

Please let us know if that is not an option.

Re: install Filesys::SmbClient (Filesys/SmbClient)

Posted: Wed May 31, 2017 9:58 am
by SavaSC
That looks like it fixed that issue. All of the Windows servers are now reporting except one. That one gives me the following error:

Code: Select all

 protocol negotiation failed: NT_STATUS_CONNECTION_RESET
I tried a couple different shares on that server with the same result. The user is a domain admin and I can map to shares on that server with that user.

Any ideas on where I need to look?

Thanks!

Re: install Filesys::SmbClient (Filesys/SmbClient)

Posted: Wed May 31, 2017 10:15 am
by dwhitfield
SavaSC wrote:That looks like it fixed that issue.
Are you using the non-perl plugin I suggested or still the perl plugin?

Re: install Filesys::SmbClient (Filesys/SmbClient)

Posted: Wed May 31, 2017 10:47 am
by SavaSC
dwhitfield wrote:
SavaSC wrote:That looks like it fixed that issue.
Are you using the non-perl plugin I suggested or still the perl plugin?
The non-perl one you suggested.

Re: install Filesys::SmbClient (Filesys/SmbClient)

Posted: Wed May 31, 2017 10:54 am
by dwhitfield
What is the output of rpm -qa | grep samba?

Based on that error message, it's possible you just need to upgrade, though that doesn't explain why it only happens on one. Is that server a different version of Windows by chance?

Re: install Filesys::SmbClient (Filesys/SmbClient)

Posted: Wed May 31, 2017 11:45 am
by SavaSC
dwhitfield wrote:What is the output of rpm -qa | grep samba?

Based on that error message, it's possible you just need to upgrade, though that doesn't explain why it only happens on one. Is that server a different version of Windows by chance?
All of the servers are running Server 2012R2. I have attached a screenshot of the results of the code you requested I run.

Re: install Filesys::SmbClient (Filesys/SmbClient)

Posted: Wed May 31, 2017 12:42 pm
by SavaSC
Incidentally, I ran the command you requested on the old Nagios server that I am retiring (and which doesn't have this issue). I have attached a screenshot of the results. As you can see, the version of samba is older on the working Nagios server. I hate to go back to old versions and hope that isn't the answer to my issues.