Problems with check_smb_shares.pl output


#1

Hello all,

I have been running into problems with check_smb_shares.pl.
I have a similar post opened up on nagios-fourm.co.uk too and Jakkedup has been providing great help.

It works fine on the command line…but fails on the nagios web interface.

Here’s the command without passing the parameters ( -r and -t ) :

./check_smb_shares.pl -S FOLDERSIZE -A c$/download -H 10.11.12.9 -U uid -P passwd

Output is : 643463201  (9 Directorys, 54 Files, 0 Links) in smb://10.11.12.9/c$/download | 'FOLDERSIZE'=643463201;1;2

**Note - If -r is not used, the FOLDERSIZE returned is wrong…I guess it’s not doing a recursive check **

Here’s the command ( with the parameter -r ):

./check_smb_shares.pl -S FOLDERSIZE -A c$/download -H 10.11.12.9 -U uid -P passwd  -r

Output = 3347304423  (139 Directorys, 1639 Files, 0 Links) in smb://10.11.12.9/c$/download | 'FOLDERSIZE'=3347304423;1;2

Here’s the command with both -r and -t as parameters:

./check_smb_shares.pl -S FOLDERSIZE -A c$/download -H 10.11.12.9 -U uid -P passwd  -r -t

Tail end of the output is:

! Filesys::SmbClient : _readdir: 151685080
Argument "3.12 GB" isn't numeric in numeric ge (>=) at ./check_smb_shares.pl line 133.
3.12 GB  (139 Directorys, 1639 Files, 0 Links) in smb://10.11.12.9/c$/download | 'FOLDERSIZE'=3.12 GB;1;2

On the nagios web interface, the ** Status Information** shows up as ** set_fn** and does not display the FOLDERSIZE.

Am I passing the commands correctly?..especially the -r and -t parameters.
Please advise.

My attempts to resolve this have been in vain.

Any help/inputs would be appreciated.

Thanks,
Sunny.


#2

make a samba share that does not have a $ sign in it.