Global Catalog Search Response Time Data Source

Microsoft.Windows.Server.2012.R2.AD.Performance.GCResponse.DataSource (DataSourceModuleType)

Data Source for the Global Catalog Search Response Time monitors.

Element properties:

TypeDataSourceModuleType
IsolationAny
AccessibilityInternal
RunAsDefault
OutputTypeSystem.PropertyBagData

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource System.CommandExecuterPropertyBagSource Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
IntervalSecondsint$Config/IntervalSeconds$Interval Seconds
TimeoutSecondsint$Config/TimeoutSeconds$Timeout Seconds
WarnThresholdint$Config/WarnThreshold$Threshold for the global catalog search response time to trigger a warning.
ErrorThresholdint$Config/ErrorThreshold$Threshold for the global catalog search response time to trigger an error.
NumSamplesint$Config/NumSamples$Number of Samples

Source Code:

<DataSourceModuleType ID="Microsoft.Windows.Server.2012.R2.AD.Performance.GCResponse.DataSource" Accessibility="Internal" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IntervalSeconds" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WarnThreshold" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ErrorThreshold" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NumSamples" type="xsd:int"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int"/>
<OverrideableParameter ID="WarnThreshold" Selector="$Config/WarnThreshold$" ParameterType="int"/>
<OverrideableParameter ID="ErrorThreshold" Selector="$Config/ErrorThreshold$" ParameterType="int"/>
<OverrideableParameter ID="NumSamples" Selector="$Config/NumSamples$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="DS" TypeID="System!System.CommandExecuterPropertyBagSource">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<ApplicationName>%windir%\system32\cscript.exe</ApplicationName>
<WorkingDirectory/>
<CommandLine>//nologo $file/GC_Search_Performance.vbs$</CommandLine>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files>
<File>
<Name>GC_Search_Performance.vbs</Name>
<Contents><Script>'*************************************************************************
' Script Name - AD Global Catalog Search Response
'
' Purpose - Monitors the responsiveness of global catalog queries
'
' (c) Copyright 2014, Microsoft Corporation, All Rights Reserved
' Proprietary and confidential to Microsoft Corporation
'*************************************************************************

Option Explicit

SetLocale("en-us")

On Error Resume Next

Sub Main()

Dim oAPI, oBag, oSysInfo, sDomain, dtStart, iTime, oADO, sQuery, oResult
Set oAPI = CreateObject("Mom.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()

set oSysInfo = CreateObject("ADSystemInfo")
sDomain = oSysInfo.DomainDNSName

Set oADO = CreateObject("ADODB.Connection")
oADO.Provider = "ADSDsOObject"
oADO.Open "ADs Provider"

sQuery = "&lt;GC://" &amp; sDomain &amp; "&gt;;(objectCategory=DMD);cn;subtree"

dtStart = Now

Set oResult = oADO.Execute(sQuery)

iTime = DateDiff("s", dtStart, Now)

oBag.AddValue "StatusInstance", ""
oBag.AddValue "StatusValue", "" &amp; iTime

Call oAPI.Return(oBag)

End Sub

Call Main()
</Script></Contents>
<Unicode>1</Unicode>
</File>
</Files>
</DataSource>
</MemberModules>
<Composition>
<Node ID="DS"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
</DataSourceModuleType>