FW: Error Found in script check_disk_smb

Niji Ogunbameru Niji.Ogunbameru at phgroup.com
Mon Jun 18 15:36:56 CEST 2012


Dear Nagios_users

The following error have been generated when using the the script check_disk_smb as follows

zenosssrv:/usr/local/zenoss/common/libexec # /usr/local/zenoss/common/libexec/check_disk_smb -H <ServerName>.<DomainName>.com -s fscs

ERROR::
Can't exec "//<ServerName>.<DomainName>.com/fscs": No such file or directory at /usr/local/zenoss/common/libexec/check_disk_smb line 166.

Use of uninitialized value $res in split at /usr/local/zenoss/common/libexec/check_disk_smb line 172.

Use of uninitialized value $_ in pattern match (m//) at /usr/local/zenoss/common/libexec/check_disk_smb line 180.
Result from smbclient not suitable


As the error has stated and on checking the script, line 166 contained the following

   $res = qx/$smbclient \/\/$host\/$share -U $user%$pass $smbclientoptions -c ls/;

but scroll down to line 61 since I was tring to find out where $smbclient was defined, $smbclient was defined on line 61 and line 61 contained the following

 my $smbclient= "$utils::PATH_TO_SMBCLIENT " ;

But strangely line 61 also contained a variable $utils

$utils is not defined anywhere and I believed that because $utils is not defined, in effects causes $smbclient not to exist.
so in line 166 the only command that seems to be ran is


\/\/$host\/$share -U $user%$pass $smbclientoptions -c ls/;

hence forced the OS to return the error specified

Why is $utils not defined and is there any fix for this issue.

IS there any manual for this script?

OS in use::
SuSe Enterprise ver 11
Application:: Zenoss application



I have limited knowledge in perl, please kindly make the solution as clear as possible

Many thanks in anticipation.


Kind Regards
-Niji





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120618/fe55ba53/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_disk_smb
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120618/fe55ba53/attachment.ksh>
-------------- next part --------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list