Disk Space Low (Script Poll)

Microsoft.FASTSearch.MP.Monitor.RTSIndexer.DiskSpaceScript (UnitMonitor)

Monitoring of free disk space for the 'indexDir' path configured in rtsplatformrc.xml (using script).

Knowledge Base article:

Summary

There are two different indexer disk space monitors. One monitor checks the 'FAST Search Indexer/Disk low state' performance counter that is reported by the indexer, while the other monitor uses a script to monitor free disk space for the 'indexDir' path configured in the file rtsplatformrc.xml that is located in the \etc folder of your FAST Search Server 2010 for SharePoint installation directory. .

The script version of the monitor has a warning level when there is less than 20% free disk space, and a critical level for when there is less than 10% free disk space. The 'Disk low state' performance counter is controlled by the configuration entry 'diskspaceMBWarning' in the configuration file rtsearchrc.xml (typical path: <FAST Search Server 2010 for SharePoint installation directory>\etc\config_data\RTSearch\webcluster\rtsearchrc.xml).

Causes

The system can run out of disk space for several reasons:

Resolutions

The following actions might help you to fix the problem:

Element properties:

TargetMicrosoft.FASTSearch.MP.Entity.RTSIndexer
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.TimedScript.ThreeStateMonitorType
RemotableFalse
AccessibilityPublic
Alert Message
Disk Space Low (Script Poll)
Indexer : Low disk space detected
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.FASTSearch.MP.Monitor.RTSIndexer.DiskSpaceScript" Accessibility="Public" Enabled="true" Target="Microsoft.FASTSearch.MP.Entity.RTSIndexer" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="false" Priority="Normal" TypeID="Windows!Microsoft.Windows.TimedScript.ThreeStateMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.FASTSearch.MP.Monitor.RTSIndexer.DiskSpaceScript_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="DiskSpaceCrit" MonitorTypeStateID="Error" HealthState="Error"/>
<OperationalState ID="DiskSpaceOk" MonitorTypeStateID="Success" HealthState="Success"/>
<OperationalState ID="DiskSpaceWarn" MonitorTypeStateID="Warning" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>2110</IntervalSeconds>
<SyncTime/>
<ScriptName>IndexerDiskSpaceCheck.vbs</ScriptName>
<Arguments/>
<ScriptBody><Script>On Error Resume Next

SetLocale("en-us")

Const SetupKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FAST Search Server\Setup\"

Dim oAPI, oBag
Set oAPI = CreateObject("MOM.ScriptAPI")

Dim freePct, freeSpace, totalSize, strIndexDir, strPath
freePct = 100
freeSpace = -1
totalSize = -1
strIndexDir = ""
strPath = ""

Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")

strPath = WSHShell.RegRead(SetupKey &amp; "Path")

If (strPath &lt;&gt; "") Then

Dim oXmlDoc
Set oXmlDoc = CreateObject("Msxml2.DOMDocument")
oXmlDoc.load(strPath &amp; "\etc\rtsplatformrc.xml")

Dim oCommonNode
Set oCommonNode = oXmlDoc.selectSingleNode("platform/common")

strIndexDir = oCommonNode.getAttribute("indexDir")

End If


If (strIndexDir &lt;&gt; "") Then

Set oFSO = CreateObject("Scripting.FileSystemObject")
set oDrive = oFSO.GetDrive(oFSO.GetDriveName(strIndexDir))

freeSpace = oDrive.FreeSpace
totalSize = oDrive.TotalSize

End If


If (freeSpace &gt; -1) And (totalSize &gt; 0) Then
freePct = Int(100 * freeSpace / totalSize)
End If

Set oBag = oAPI.CreatePropertyBag()
Call oBag.AddValue("IndexDir", strIndexDir)
Call oBag.AddValue("FreeSpace", Int(freeSpace / 1024 / 1024))
Call oBag.AddValue("TotalSize", Int(totalSize / 1024 / 1024))
Call oBag.AddValue("FreePercentage", freePct)
Call oAPI.Return(oBag)
</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
<ErrorExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='FreePercentage']</XPathQuery>
</ValueExpression>
<Operator>Less</Operator>
<ValueExpression>
<Value Type="Integer">10</Value>
</ValueExpression>
</SimpleExpression>
</ErrorExpression>
<WarningExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='FreePercentage']</XPathQuery>
</ValueExpression>
<Operator>Less</Operator>
<ValueExpression>
<Value Type="Integer">20</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='FreePercentage']</XPathQuery>
</ValueExpression>
<Operator>GreaterEqual</Operator>
<ValueExpression>
<Value Type="Integer">10</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</WarningExpression>
<SuccessExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='FreePercentage']</XPathQuery>
</ValueExpression>
<Operator>GreaterEqual</Operator>
<ValueExpression>
<Value Type="Integer">20</Value>
</ValueExpression>
</SimpleExpression>
</SuccessExpression>
</Configuration>
</UnitMonitor>