Applicazione di monitoraggio client - Regola di raccolta prestazioni in base al conteggio totale utenti univoci

Microsoft.SystemCenter.CM.AEM.Internal.AppUserCountPerfCollection (Rule)

Questa regola attiva la raccolta di dati delle prestazioni in relazione al totale degli utenti univoci interessati per applicazione

Knowledge Base article:

Riepilogo

Questa regola viene utilizzata internamente per raccogliere i dati delle prestazioni in relazione al totale dei singoli utenti interessati per applicazione. Tale regola non deve essere sostituita in quanto potrebbe avere un impatto negativo sul monitoraggio.

Cause

Questa sezione non è applicabile per questo tipo di regola.

Soluzioni

Non è richiesta alcuna azione utente per questo tipo di regola.

Element properties:

TargetMicrosoft.SystemCenter.CM.AEM.CrashListener
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
Scheduler DataSource System.Scheduler Default
PerfDataWriter WriteAction Microsoft.SystemCenter.CM.AEM.Internal.MapQueriedPerfData Default

Source Code:

<Rule ID="Microsoft.SystemCenter.CM.AEM.Internal.AppUserCountPerfCollection" Target="AEMLib!Microsoft.SystemCenter.CM.AEM.CrashListener" Enabled="true" 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="PerfDataWriter" TypeID="Microsoft.SystemCenter.CM.AEM.Internal.MapQueriedPerfData">
<Query>DECLARE @TableName NVARCHAR(1000), @Query NVARCHAR(1000);SELECT @TableName = ManagedTypeTableName FROM ManagedType WHERE TypeName = 'Microsoft.SystemCenter.CM.AEM.Application';SET @Query = N'select count(*), SourceEntityId from AemRelationship AR join [' + @TableName + '] A on AR.SourceEntityId = A.BaseManagedEntityId where RelationshipTypeId = 0 and EntityTypeId = 0 group by SourceEntityId';EXEC sp_executesql @Query</Query>
<ObjectName>Application</ObjectName>
<CounterName>ApplicationUniqueUsersAffected</CounterName>
<Value>Columns/Column[1]</Value>
<ManagedEntityId>Columns/Column[2]</ManagedEntityId>
<RuleId>$MPElement[Name="AEMViewsInternal!Microsoft.SystemCenter.CM.AEM.Views.Internal.AppUserCountPerfCollector"]$</RuleId>
</WriteAction>
</WriteActions>
</Rule>