SNMP disk checking in Windows NTFS mounted system

Paul Weaver paul.weaver at bbc.co.uk
Tue Apr 15 15:54:56 CEST 2008


> The NTFS Mounted Point File System in Windows is a File 
> System mounted 
> in a Subdirectory, but still a Mounted File System., but a 
> got your point.
> 
> Do you Known any other way in other to get the free space percent in 
> this kind of cenario ?

A couple of options
1) Create a second mountpoint for the drive as a letter -- I have a
server that has "C:\mysql\data" as a separate drive. I've additionally
mounted this as "M:", and can use SNMP to look at the M: drive. I've had
issues with SNMP on windows 2000 before, it sometimes fails to report
the correct value.
2) You can also use samba, pass in a host, share, username and password,
the plugin used smbclient to do a "DIR". Seems to work for me, I knocked
up a plugin for internal use which does this, basically it does:

open(PH, "smbclient //$host/$share -U$username \"$password\" -c \"dir\"
2>/dev/null");
While (<PH>) {$lastLine = $_;}
Then checks for /NT_STATUS_BAD_NETWORK_NAME/, /NT_STATUS_ACCESS_DENIED/
and no output, then checks for the "nnn blocks of size xx. Yyy blocks"

If it finds it, it takes the number used as
100*(blockused/(blockused+blockfree))), which gives me x%

It then returns this value, and nagiosgrapher parses it to plot a graph.

(Don't ask why we have mysql on a windows server!)

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.
					

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
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