<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.17097" name=GENERATOR></HEAD>
<BODY>
<DIV>
<P><FONT face=Tahoma><FONT size=2><STRONG>From:</STRONG> Kumar, Ashish 
[mailto:xml.devel@gmail.com] <BR><B>Sent:</B> 06 June 2011 08:53<BR><B>To:</B> 
nagios-users ML<BR><B>Subject:</B> [Nagios-users] Monitoring Windows Mount 
Points<BR></FONT></FONT><BR></P></DIV>
<DIV></DIV>Dear fellow Nagios users,<BR><BR>I was just wondering if anyone is 
monitoring Windows mount points?  If yes, are there any plugins available 
for it?<BR><BR>I tried searching the archive and Google but couldn't find 
anything relevant. <BR><BR>Any advise/pointers are 
appreciated.<BR><BR>Thanks<BR>  <BR>
<HR tabIndex=-1>
 <BR><BR>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=740062608-06062011>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=740062608-06062011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=740062608-06062011>What 
do you want to monitor exactly? </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=740062608-06062011>Do you 
want to check if a share is available remotely or are you running the check 
from the Windows machine?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=740062608-06062011>We use 
Perl scripts running smbclient:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=740062608-06062011>$cmd = 
'/usr/bin/smbclient //' . $host . '/' . $share . ' -U "' . $username . '" "' . 
$password . '" -c "dir" 2>/dev/null';<BR>In this case this output is the 
parsed to check for the age of a particular file, but once you have the output 
you can do what you want with it.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=740062608-06062011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=740062608-06062011>So far 
these are the error codes I am aware of and what they mean:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=740062608-06062011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=740062608-06062011>if 
($lastLine =~ m/Error NT_STATUS_BAD_NETWORK_NAME/) {<BR> print "UNKNOWN: 
Can't connect to $host\n";<BR> exit 3;<BR>} elsif ($lastLine =~ 
m/NT_STATUS_BAD_NETWORK_NAME/) {<BR> print "UNKNOWN: Can't find share 
$share\n";<BR> exit 3;<BR>} elsif ($lastLine =~ m/NT_STATUS_ACCESS_DENIED/) 
{<BR> print "UNKNOWN: Could not connect to $host, is SMB enabled and $share 
shared?\n";<BR> exit 3;<BR>} elsif ($lastLine =~ 
m/NT_STATUS_LOGON_FAILURE/) {<BR> print "WARNING: Username/Password 
incorrect\n";<BR> exit 1;<BR>} elsif ($lastLine =~ 
m/NT_STATUS_ACCOUNT_LOCKED_OUT/) {<BR> print "CRITICAL: Account 
Locked\n";<BR> exit 2;<BR>} elsif ($lastLine =~ 
m/NT_STATUS_CONNECTION_REFUSED/) {<BR> print "UNKNOWN: Connection 
refused.\n";<BR> exit 3;<BR>}</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=740062608-06062011></SPAN></FONT> </DIV>
<DIV><SPAN class=740062608-06062011><FONT face=Arial color=#0000ff size=2>Hope 
this helps.</FONT></SPAN></DIV>
<DIV><SPAN class=740062608-06062011><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=740062608-06062011><FONT face=Arial color=#0000ff 
size=2>Kris</FONT></SPAN></DIV>
<P><FONT face="Trebuchet MS" size=4><STRONG>Kristan Webb BSc</STRONG> 
</FONT><BR><FONT face="Trebuchet MS" size=2><EM>Broadcast Engineer, 
Projects</EM><BR><BR></FONT></P><DIV> </DIV><br/><font size="3" face="Times New Roman"><a href="http://www.bbc.co.uk">http://www.bbc.co.uk</a><br/>This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.<br/>If you have received it in error, please delete it from your system.<br/>Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.<br/>Please note that the BBC monitors e-mails sent or received.<br/>Further communication will signify your consent to this.</font>
</BODY></HTML>