install Filesys::SmbClient (Filesys/SmbClient)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

install Filesys::SmbClient (Filesys/SmbClient)

Post 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!
Last edited by dwhitfield on Wed Jun 07, 2017 11:23 am, edited 1 time in total.
Reason: marking with green check mark
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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?
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

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

Post 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!!
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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.
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

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

Post 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!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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?
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

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

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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?
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

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

Post 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.
You do not have the required permissions to view the files attached to this post.
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

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

Post 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.
You do not have the required permissions to view the files attached to this post.
Locked