| | | Forum Newbie
       
Group: Forum Members Last Login: 8/20/2008 7:58:58 AM Posts: 1, Visits: 2 |
| | Hello, Is there a way to monitor disk space on a volume mount point on a server? I have a root volume on a Windows 2003 server with a drive letter of V:\ under which there are multiple NetApp LUNS mounted. i.e V:\LUN1\volume data, V:\LUN2\volume data Is there a way to monitor each V:\LUNxx individually as opposed to just having an overview of the whole of V:\ ? I'm running version Ipswitch WhatsUp Gold Premium Edition v11.0.3 switch WhatsUp Gold Premium Edition v11.0.3 Thanks and regards Nick Lait |
| | | | 
Time Traveler
       
Group: WhatsUp Gold Expert Last Login: Today @ 4:39:29 AM Posts: 1,490, Visits: 4,682 |
| | I would try to monitor this through the Netapp itself rather than through the win server. I don't think the server will allow this since afaik for him it's just one volume. Or, maybe a wmi script "getting" the directory size for v:\lun1, v:\lun2, and so on. But this is quite resource intensive I think.
Reading, writing and arithmetic - If you need to choose, please take option 1. |
| | | | Junior Member
       
Group: Forum Members Last Login: 8/20/2008 8:57:41 AM Posts: 14, Visits: 36 |
| | I build this script to monitor my Exchange log volumes individually and report a state down if one of the volume is lower in space than the MaxGo expected. Script was build to monitor multiple servers with only one script using the IP addr of the server that called the script. Script is running on v11.0.3 Patrick Belleau Ville de Québec ----- On Error Resume Next Err.Clear 'MaxGo=threshold in Gb MaxGo = 10 FoundOne = 0 Context.SetResult 0, "Sans erreur par défaut" sDeviceAddr = Context.GetProperty("Address") Dim CPath(10) Select Case sDeviceAddr 'yyy your server IP here 'CPath(0) = how many volume to check on that server Case "10.203.57.yyy": CPath(0) = 4 CPath(1) = "E:\\SFS01ALOG\\" CPath(2) = "F:\\SFS01BLOG\\" CPath(3) = "G:\\SFS01CLOG\\" CPath(4) = "H:\\SFS01DLOG\\" Case "10.212.52.yyy": CPath(0) = 2 CPath(1) = "E:\\CIT01ALOG\\" CPath(2) = "F:\\CIT01BLOG\\" End Select sWinUser = Context.GetProperty("CredWindows omainAndUserid") sWinPass = Context.GetProperty("CredWindows assword") Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") Set objWMIService = objSWbemLocator.ConnectServer(sDeviceAddr, "root\cimv2", sWinUser, sWinPass) For i=1 to CPath(0) Set colVolumes = objWMIService.ExecQuery("SELECT * FROM Win32_Volume WHERE Name = '" & CPath(i) & "' ") For Each objVolume in colVolumes FSpace = Round(objvolume.FreeSpace / (1024^3), 0) Next Context.LogMessage CPath(i) & " " & FSpace If FSpace < MaxGo then FoundOne = 1 sDrive = sDrive & " " & CPath(i) End if Next If FoundOne = 1 then Context.SetResult 1, "L'espace restante sur un des volumes de LOG est moins de " & MaxGo & " Go" & " [" & sDrive & "]" Else Context.SetResult 0, "L'espace restante sur les volumes de LOG est supérieur à " & MaxGo & " Go" End If |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 11/4/2008 12:13:33 PM Posts: 2, Visits: 8 |
| I wrote the script below to monitor SAN mount points via an Active Script Monitor. It will generate an alert if the free space on any of the mount points is below 10%. Obviously you can configure this to what ever.
'Sending log message to the WhatsUp Event Viewer
Context.LogMessage "Checking Address=" & Context.GetProperty("Address")
'Set the result code of the check (0=Success, 1=Error)
Context.SetResult 0, "No error"
strComputer = Context.GetProperty("Address")
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Volume")
For Each objItem In colItems
if left(objitem.name,3) = "F:\" then
if len(objitem.name)>3 then
pctfree = round((objItem.freespace/objitem.Capacity)*100,2)
if pctfree < 10 then
Context.SetResult 1, "Free Space below 10%"
end if
end if
end if
Next
|
| |
|
|