代理程式最近效能探查

Microsoft.SystemCenter.AgentHealth.LastPerf.ProbeType (ProbeActionModuleType)

此探查會收集代理程式最近的效能資料

Element properties:

TypeProbeActionModuleType
IsolationAny
AccessibilityInternal
RunAsDefault
InputTypeSystem.BaseData
OutputTypeSystem.OleDbData

Member Modules:

ID Module Type TypeId RunAs 
OLEDB ProbeAction Microsoft.SystemCenter.AgentHealth.OleDBRMS.ProbeType Default

Source Code:

<ProbeActionModuleType ID="Microsoft.SystemCenter.AgentHealth.LastPerf.ProbeType" Accessibility="Internal" Batching="false" PassThrough="false">
<Configuration>
<xsd:element minOccurs="1" name="QueryTimeout" type="xsd:integer"/>
<xsd:element minOccurs="1" name="WatchPeriodHr" type="xsd:integer"/>
<xsd:element minOccurs="1" name="OneRowPerItem" type="xsd:boolean"/>
<xsd:element minOccurs="1" name="MaxPerfAgeHr" type="xsd:integer"/>
</Configuration>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<ProbeAction ID="OLEDB" TypeID="Microsoft.SystemCenter.AgentHealth.OleDBRMS.ProbeType">
<QueryTimeout>$Config/QueryTimeout$</QueryTimeout>
<Query>
select CAST(ME.Path as nvarchar(255)),
CAST(Max(TimeSampled) As nvarchar(50)) As 'LastSample',
CASE
WHEN Isnull(MAX(TimeSampled),'01-01-80') &lt; DateAdd(hh,-$Config/MaxPerfAgeHr$,getutcdate()) Then 'KO'
Else 'OK'
END
from dbo.ManagedEntityGenericView ME
inner join dbo.ManagedTypeView MT
on ME.MonitoringClassId=MT.Id
AND MT.Name = 'Microsoft.SystemCenter.HealthService'
left join dbo.PerformanceCounterView C
on ME.Id = C.ManagedEntityId
left join dbo.PerformanceDataAllView P
on C.PerformanceSourceInternalId=P.PerformanceSourceInternalId
and P.TimeSampled &gt; dateadd(hh,-$Config/WatchPeriodHr$,getutcdate())
where ME.IsDeleted=0
group by ME.Path
</Query>
<OneRowPerItem>$Config/OneRowPerItem$</OneRowPerItem>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="OLEDB"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.OleDbData</OutputType>
<InputType>System!System.BaseData</InputType>
</ProbeActionModuleType>