Monitoring Windows Network Share

Greg Vickers g.vickers at qut.edu.au
Mon Dec 1 00:45:26 CET 2003


Edward,

Here is a script (check_share) that I wrote that uses smbclient to check 
shares on Windows hosts:


#!/bin/bash

IPADDRESS=$1
SHARE=$2

smbclient //$IPADDRESS/$SHARE <password> -U <username> -W <workgroup> -c 
"exit" &> /dev/null

if [ $? = "0" ]; then
    EXIT="0" && STDIO="At IP $IPADDRESS, share: \"$SHARE\" present."
else
    EXIT="2" && STDIO="Could not list share: \"$SHARE\" on $IPADDRESS"
fi

echo $STDIO
exit $EXIT


HTH,
Greg

At 04:31 AM 29/11/2003, Crotty, Edward wrote:
>All,
>
>I am looking for any infromation / check suggestions to monitor a Windows
>share.
>
>I am doing the obvious, check_disk_smb, to see if I can mount the disk or
>not at given intervals but I am also trying to find someone that may have a
>similar situation to me.
>
>For whatever reason, a machine is seemingly over time not responding to new
>incoming mount requests for a given share.  However, nothing appears in the
>log (ie a service coming down etc).
>
>Is there a check that is either contrib'd or something I am not thinking of
>besides check_disk_smb that may have a output that would monitor an RPC
>error related to this problem or something along those lines?  I know there
>is the check_rpc, but I am not sure how that will help me drill down to the
>level I need at this point.
>
>Thanks,
>-ed
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>Does SourceForge.net help you be more productive?  Does it
>help you create better code?  SHARE THE LOVE, and help us help
>YOU!  Click Here: http://sourceforge.net/donate/
>_______________________________________________
>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

=================================
Greg Vickers
Computer Systems Officer
Student Support and Systems,
Teaching and Learning Support Systems,
Queensland University of Technology,
Kelvin Grove Campus,
Brisbane,
Australia

CRICOS No 00213J

Ph: 07 3864 8276 Fax: 07 3864 5425
Mob: 0416 001 674 SD: #66147  



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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