8 Replies Latest reply on Nov 16, 2013 11:01 AM by stripet

    how to monitor disk space for mount points

    krfitzgerald

      My exchange server uses mount points for datastores instead of mapped drive letters from my san. I want to monitor the size of the mount points. How can I get the mount points to show up in solarwinds so I can get alerts on disk usage?

        • Re: how to monitor disk space for mount points
          cmgurley

          According to this older thread, you need APM (SAM) to monitor mount points using a component monitor:

           

          http://thwack.solarwinds.com/thread/18617

           

          Hope that helps,

          Chris

          • Re: how to monitor disk space for mount points
            tammyandlee2

            Use WMI and not SNMP. You will then see the mount points.

            • Re: how to monitor disk space for mount points
              dc_san

              I realize this is an old post but thought I'd add how I monitor our Exchange mounted volumes so it may help others.  I do use APM (SAM) as cmgurley mentioned above.

               

              This is a from a template containing a "performance counter monitor" that will provide space remaining returned in GB. In the "instance" section list the full path to your mount point.  Make sure to note the other fields data.

              Edit: screenshot is horrible once posted so i'll list the field data:

              Coponent Type: Performance Counter Monitor

              Counter: Free Megabytes

              Instance:  <list full file path to mount point here>

              Category: LogicalDisk

              Convert Value: YES     Custom conversion - FORMULA: KiloToMega(${Statistic})

              Mounted Volume - FreeGB.JPG

               

               

              This is another "performance counter  monitor" that will provide space remaining returned in a percentage. Again, in the "instance" section list the full path to your mount point and note the other field data.  After creating the SAM template apply it to your exchange server.

              Edit: screenshot is horrible once posted so i'll list the field data:

              Coponent Type: Performance Counter Monitor

              Counter: % Free Space

              Instance:  <list full file path to mount point here>

              Category: LogicalDisk

              Convert Value: YES     Custom conversion - FORMULA: Round(${Statistic},1)

              Mounted Volume - % Free Space.JPG

               

              Now you can create necessary email alerts and summarize the data using the web part labeled "Top XX Components by Statistic Data"if you choose as I have in the shot below for quick viewing. Hope this helps!

               

              Mounted Volume - shot.JPG

               

              Message was edited by: dusty curr Edited screenshot info due to bad screenshots

              • Re: how to monitor disk space for mount points
                stripet

                If you have APM, you can monitor the free space on the Volume Mount Points via a Windows Script Monitor with a VBScript.  WE use this and it works great.  Below is the Monitor Description and the VBScript we use and the Script Arguments.  You will have to manually edit the WarningThreshold and CriticalThreshold variable values before running on the nodes.  As long as you know which nodes have Volume Mount Points, you would then assign this SAM Template to those nodes.  You also may want to set up an Advanced Alert.  :

                 

                Component Description:  This monitor is required only on nodes with Sub-Directory Mount Points.  We are using the out-of-the-box SolarWinds Volume Monitoring instead for regular root level drive monitoring (e.g. C:\).  Logical Disk Freespace check for Sub-Directory Mount Points (where the DriveLetter IS NULL).  If Statistic has a value of 2 then one or more Sub-Directory Mount Point drives are in Warning status and no Sub-Directory Mount nPoint drives in Critical Status (reports on all Sub-Directory Mount Point drives in Warning status).  If Statistic has a value of 3 then one or more Sub-Directory Mount Point  drives are in Critical status (reports on all Sub-Directory Mount Point drives in both Waring or Critical status).  Reports on all Logical Volumes in WMI Win32_Volume object where the DriveLetter IS NULL (designating it as a Sub-Directory Mount Point) AND the DriveType = 3 (Local Disk)

                 

                Script Arguments:  ${IP}

                 

                Script Engine:  vbscript

                 

                ------------start VBScript----------------

                'Option Explicit

                On Error Resume Next

                 

                ' Set Thesholds for this component

                 

                'Set Warning Threshold for all drives

                Const WarningThreshold = 10

                 

                ' Set Critical Threshold for all drives

                Const CriticalThreshold = 5

                 

                ' Required for WMI Query

                Const wbemFlagReturnImmediately = &h10

                Const wbemFlagForwardOnly = &h20

                 

                ' Define Variables

                Dim WshShell, objArgs, strIP, objWMIService, LogicalVolumes

                Dim objItem, strDriveName, IntCapacity, IntFree, DiskFreePct

                Dim strIgnoreFlag

                Dim strMessage, IntStatistic

                 

                ' Analyze Arguments (one argument is expected which is the IP Address of the Node to monitor

                set objArgs = WScript.Arguments

                If objArgs.Count > 0 Then

                    strIP= objArgs(0)

                End If

                 

                ' Set the initial Statistic value to 0 which is all drives normal

                IntStatistic = 0

                 

                ' Set strIgnoreFlag = "No"

                '

                ' If IntStatistic stays at 0 then all Sub-Directory Mount Point drives (DriveLetter IS NULL) are normal

                '

                ' If IntStatistic has a value of 2 then one or more Sub-Directory Mount Point drives are in Warning status and no drives in Critical Status (reports on all drives in Warning status)

                '

                ' If IntStatistic has a value of 3 then one or more Sub-Directory Mount Point drives are in Critical status (reports on all drives in both Waring or Critical status)

                 

                'Set the initial Message to blank

                strMessage = ""

                 

                Set WshShell = CreateObject("WScript.Shell")

                 

                Set objWMIService = GetObject("winmgmts:\\" & strIP & "\root\CIMV2")

                If Err <> 0 Then

                  WScript.Echo "Message: Error Could not connect to  WMI root CIMV2 Namespace on IP " & strIP & ".  The Error Number was: " & Err.Number & ".  The Error Description was: " & Err.Description & "."

                  Wscript.echo "Statistic: 1"

                  Err.Clear

                  Wscript.quit(1)

                Else

                 

                  Set LogicalVolumes = objWMIService.ExecQuery("SELECT * FROM Win32_Volume where DriveType = '3' AND DriveLetter IS NULL", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)

                  If Err <> 0 Then

                  WScript.Echo "Message: Error Could not connect to  WMI Win32_Volume on IP " & strIP & ".  The Error Number was: " & Err.Number & ".  The Error Description was: " & Err.Description & "."

                  Wscript.echo "Statistic: 1"

                  Err.Clear

                  Wscript.quit(1)

                  Else

                 

                  For Each objItem In LogicalVolumes

                     If ( objItem.DriveType = 3 ) Then

                  strDriveName = objItem.Name

                'Checking Drivename for the patterns HarddiskVolume, LiveBackups, MAGLIB, and MagLib, and if found, skips to next drive in loop (zero means the pattern is not found)

                  If strDriveName <> "" AND (InStr(1,strDriveName, "HarddiskVolume", 1) = 0) AND (InStr(1,strDriveName, "Livebackups", 1) = 0) AND (InStr(1,strDriveName, "MAGLIB", 1) = 0) AND (InStr(1,strDriveName, "MagLib", 1) = 0) Then

                 

                ' strMessage = strMessage & " Logical Volume Name: " & strDriveName

                 

                  IntFree = objItem.FreeSpace

                ' strMessage = strMessage & "  Free Space: " & IntFree & " bytes"

                 

                  IntCapacity = objItem.Capacity

                ' strMessage = strMessage & "  Capacity: " & IntCapacity & " bytes"

                 

                  DiskFreePct = ((IntFree/IntCapacity)*100.00)

                  DiskFreePct = Round(DiskFreePct, 2)

                ' strMessage = strMessage & "  Disk_Free_Pct: " & DiskFreePct

                 

                  If ( DiskFreePct <= WarningThreshold ) Then

                '    strMessage = strMessage & "  WarningThreshold LOOP Entered."

                     If DiskFreePct <= CriticalThreshold Then

                ' strMessage = strMessage & "  CriticalThreshold LOOP Entered."

                  IntStatistic = 3

                  strMessage = strMessage & "  ---  " & strDriveName & " Critical " & DiskFreePct & "% <=" & CriticalThreshold & "%."

                     Else

                  If IntStatistic <= 2 Then

                  IntStatistic = 2

                ' strMessage = strMessage & "  Setting IntStatistic to 2.  Warning Threshold exceeded on " & strDriveName & "."

                  strMessage = strMessage & "  --- " & strDriveName & " Warning " & DiskFreePct & "% <=" & WarningThreshold & "%."

                 

                  Else

                ' strMessage = strMessage & "  Warning Threshold exceeded on " & strDriveName & "."

                  strMessage = strMessage & "  ---  " & strDriveName & " Warning " & DiskFreePct & "% <=" & WarningThreshold & "%."

                 

                  End If

                     End If

                  End If

                         Else

                  strIgnoreFlag = "Yes"

                  strMessage = strMessage & "  LogicalDriveName: " & strDriveName & "  has been ignored due to either a blank Drive Name or due to one of the following patterns being in the Drive Name: HarddiskVolume LiveBackups MAGLIB MagLib."

                         End If

                     End If

                  Next

                 

                  If IntStatistic = 0 Then

                  If strIgnoreFlag = "Yes" Then

                  strMessage = "The Disk Free Space for all Sub-Directory Mount Point drives is Normal." & strMessage

                  Else

                  strMessage = "The Disk Free Space for all Sub-Directory Mount Point drives is Normal."

                  End If

                  End If

                 

                  WScript.Echo "Message: " & Date & " " & Time & " " & strMessage & "  Statistic Value is: " & IntStatistic

                  WScript.Echo "Statistic: " & IntStatistic

                  WScript.Quit(IntStatistic)

                  End If

                End If

                WScript.Quit(0)

                ------------end VBScript-----------------