From: Kumar, Ashish [mailto:[email protected]] 
Sent: 06 June 2011 08:53
To: nagios-users ML
Subject: [Nagios-users] Monitoring Windows Mount Points



Dear fellow Nagios users,

I was just wondering if anyone is monitoring Windows mount points?  If
yes, are there any plugins available for it?

I tried searching the archive and Google but couldn't find anything
relevant. 

Any advise/pointers are appreciated.

Thanks
  

________________________________

 


Hi,
 
What do you want to monitor exactly? 
Do you want to check if a share is available remotely or are you running
the check from the Windows machine?
We use Perl scripts running smbclient:
$cmd = '/usr/bin/smbclient //' . $host . '/' . $share . ' -U "' .
$username . '" "' . $password . '" -c "dir" 2>/dev/null';
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.
 
So far these are the error codes I am aware of and what they mean:
 
if ($lastLine =~ m/Error NT_STATUS_BAD_NETWORK_NAME/) {
 print "UNKNOWN: Can't connect to $host\n";
 exit 3;
} elsif ($lastLine =~ m/NT_STATUS_BAD_NETWORK_NAME/) {
 print "UNKNOWN: Can't find share $share\n";
 exit 3;
} elsif ($lastLine =~ m/NT_STATUS_ACCESS_DENIED/) {
 print "UNKNOWN: Could not connect to $host, is SMB enabled and $share
shared?\n";
 exit 3;
} elsif ($lastLine =~ m/NT_STATUS_LOGON_FAILURE/) {
 print "WARNING: Username/Password incorrect\n";
 exit 1;
} elsif ($lastLine =~ m/NT_STATUS_ACCOUNT_LOCKED_OUT/) {
 print "CRITICAL: Account Locked\n";
 exit 2;
} elsif ($lastLine =~ m/NT_STATUS_CONNECTION_REFUSED/) {
 print "UNKNOWN: Connection refused.\n";
 exit 3;
}
 
Hope this helps.
 
Kris

Kristan Webb BSc 
Broadcast Engineer, Projects




http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                        
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Nagios-users mailing list
[email protected]
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

Reply via email to