此規則能根據每個應用程式中受影響的唯一使用者總數,將監視狀態設定為「成功」
此規則為內部使用,用以根據每個應用程式中的總使用者計數,將監視狀態設定為「成功」。 不應覆寫此規則,否則會對監視有負面影響。
本部分不適用此規則類型。
此規則類型不需要任何使用者動作。
Target | Microsoft.SystemCenter.CM.AEM.CrashListener |
Category | PerformanceCollection |
Enabled | False |
Alert Generate | False |
Remotable | True |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
Scheduler | DataSource | System.Scheduler | Default |
SuccessStateSetter | WriteAction | Microsoft.SystemCenter.CM.AEM.Internal.TargetSetSuccessStateAction | Default |
<Rule ID="Microsoft.SystemCenter.CM.AEM.Internal.AppUserCountMonitorSuccessStateSetter" Target="AEMLib!Microsoft.SystemCenter.CM.AEM.CrashListener" Enabled="false" ConfirmDelivery="true">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="Scheduler" TypeID="System!System.Scheduler">
<Scheduler>
<SimpleReccuringSchedule>
<Interval Unit="Minutes">15</Interval>
</SimpleReccuringSchedule>
<ExcludeDates/>
</Scheduler>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="SuccessStateSetter" TypeID="Microsoft.SystemCenter.CM.AEM.Internal.TargetSetSuccessStateAction">
<Query>DECLARE @TableName NVARCHAR(1000), @TableName2 NVARCHAR(1000), @Query NVARCHAR(1000);SELECT @TableName = ManagedTypeTableName FROM ManagedType WHERE TypeName = 'Microsoft.SystemCenter.CM.AEM.Application';SELECT @TableName2 = ManagedTypeTableName FROM ManagedType WHERE TypeName = 'Microsoft.SystemCenter.CM.AEM.MonitorOverride';SET @Query = N'select count(*), AR.SourceEntityId, IsNull(MO.UniqueUserThresholdValue, 50) from AemRelationship AR join [' + @TableName + '] A on AR.SourceEntityId = A.BaseManagedEntityId left join [' + @TableName2 + '] MO on AR.SourceEntityId = MO.ManagedEntityId where AR.RelationshipTypeId = 0 and AR.EntityTypeId = 0 group by AR.SourceEntityId, MO.UniqueUserThresholdValue';EXEC sp_executesql @Query</Query>
<MonitorId>$MPElement[Name="AEMViewsInternal!Microsoft.SystemCenter.CM.AEM.Views.Internal.UsersAffectedAppThreshold"]$</MonitorId>
<ManagedEntityId>Columns/Column[2]</ManagedEntityId>
<Value>Columns/Column[1]</Value>
<Threshold>Columns/Column[3]</Threshold>
</WriteAction>
</WriteActions>
</Rule>