Monitoring Windows Network Share

Crotty, Edward Edward.Crotty at dowjones.com
Mon Dec 1 14:01:42 CET 2003


That does help in getting a quick and dirty script, so thanks!

What I am also interested in however is the rpc information that is
associated with the windows share...

In other words, what would a proper check using check_rpc be to see the rpc
status of a windows share...

IE, for a un*x box, I could -

check_rpc -H 127.0.0.1 -C nfs

Is there an equivalent in the windows world?

If I'm off / this doesnt make sense, feel free to shoot me a message off the
list.

Thanks,
-ed

-----Original Message-----
From: Greg Vickers [mailto:g.vickers at qut.edu.au]
Sent: Sunday, November 30, 2003 6:45 PM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Monitoring Windows Network Share


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


-------------------------------------------------------
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