O365 Consumed Units Collection

O365.SMP.O365ActiveUnitsCollection_V1.Script.Performance.Rule (Rule)

This rule uses a script to collect the number of Consumed licenses.

Element properties:

TargetO365.SMP.WatcherNode.Registry.Class
CategoryPerformanceCollection
EnabledFalse
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DataSource DataSource O365.SMP.O365ActiveUnitsCollection_V1.Script.Performance.Rule.DataSourceModuleType Default
System.Performance.DataGenericMapper ConditionDetection System.Performance.DataGenericMapper Default
Microsoft.SystemCenter.CollectPerformanceData WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="O365.SMP.O365ActiveUnitsCollection_V1.Script.Performance.Rule" Enabled="false" Target="O365.SMP.WatcherNode.Registry.Class" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DataSource" TypeID="O365.SMP.O365ActiveUnitsCollection_V1.Script.Performance.Rule.DataSourceModuleType">
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>86400</IntervalSeconds>
<UserPassword>$RunAs[Name="O365SMP.O365.License.Verification.Profile"]/Password$</UserPassword>
<UserCredential>$RunAs[Name="O365SMP.O365.License.Verification.Profile"]/UserName$</UserCredential>
<SkuType>Enter Sku</SkuType>
</DataSource>
</DataSources>
<ConditionDetection ID="System.Performance.DataGenericMapper" TypeID="Performance!System.Performance.DataGenericMapper">
<ObjectName>Licenses</ObjectName>
<CounterName>Consumed Units</CounterName>
<InstanceName/>
<Value>$Data/Property[@Name='Consumed Units']$</Value>
</ConditionDetection>
<WriteActions>
<WriteAction ID="Microsoft.SystemCenter.CollectPerformanceData" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>