M365 License - Active Units (Percent) Monitor

M365SLIC.License.ActiveUnitsPercent.Monitor (UnitMonitor)

Will verify if consumed Licenses is within proper threshold (Percent).

Knowledge Base article:

Summary

Will monitor if consumed Licenses is within proper threshold (Percent).

Resolutions

Additional

None.

External

https://MonitoringGuys.com

Overridable Parameters

Name

Description

Default Value

CD_HighWarningThreshold

The high threshold at which the monitor condition detection will trigger a warning state.

80

CD_HighCriticalThreshold

The high threshold at which the monitor condition detection will trigger a critical state.

90

CD_LowWarningThreshold

The low threshold at which the monitor condition detection will trigger a warning state.

-1

CD_LowCriticalThreshold

The low threshold at which the monitor condition detection will trigger a critical state.

-1

EventIDFilter

This can be used to filter which EventIDs get written by the workflow to the Operations Manager event log. This is only relevant when logging is enabled. See 'WriteToEventLog'. Typically this is for customer support engineer use only.

MatchCount

This determines how many times the monitor condition detection must be matched before triggering a state change. This is only applicable to unhealthy condition detections and is used in union with SampleCount. If left empty or 0 (zero), both have the same effect as 1 (one); requiring only a single match regardless of SampleCount value.

0

PoshLibraryPath

For customer support engineer use only.

ProbeActionTimeoutSeconds

If the workflow module does not exit gracefully by this time limit, the module will be forced to terminate.

180

SampleCount

Indicates how many total samples to store while calculating matches. This value must be greater or equal to the MatchCount value. If it is not, or if it is missing, the sample count is automatically set equal to the MatchCount (therefore only consecutive matching samples will trigger output).

0

SyncTime

This can be set to force a workflow to synchronize its Interval to a specific start time. If no SyncTime value is provided to the workflow, the workflow will be initiated at the agent's earliest opportunity after receiving a configuration change or restarting. Typically no SyncTime is preferred. Format is 00:00. Example for 5:36pm: 17:36. Example for 2:15am: 02:15.

WorkflowName

This value gets passed into the datasource script and becomes noted in logged events (if logging is enabled). The value provided for this parameter gets appended to the ProbeAction/WriteAction name used for the datasource. If the datasource is used by more than one workflow an override value for this parameter could break cookdown. This could be used to differentiate/identify a specific instance of the scripted datasource. Typically this is for customer support engineer use only.

WriteToEventLog

This will enable/disable script logging to the Operations Manager event log.

false

Element properties:

TargetM365SLIC.License.Sku
Parent MonitorM365SLIC.License.Aggregate.Health.Monitor
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeM365SLIC.3StateThreshold.MT
RemotableTrue
AccessibilityPublic
Alert Message
M365 License - Active Units (Percent) Monitor Alert
Licenses Consumed (Percent): {0} has exceeded threshold.

Details: {1}
License Status: {2}
SkuPartNumber: {3}
TenantName: {4}
M365_AccountName: {5}
Client/Application ID: {6}
LicensesAvailableUnits: {7}
PrepaidUnitsEnabled: {8}
RunAsDefault
Comment.

Source Code:

<UnitMonitor ID="M365SLIC.License.ActiveUnitsPercent.Monitor" Accessibility="Public" Enabled="true" Target="M365SLIC.License.Sku" ParentMonitorID="M365SLIC.License.Aggregate.Health.Monitor" Remotable="true" Priority="Normal" TypeID="M365SLIC.3StateThreshold.MT" ConfirmDelivery="false" Comment=".">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="M365SLIC.License.ActiveUnitsPercent.Monitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='LicensesConsumedPercent']$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='Message']$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='CapabilityStatus']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='SkuPartNumber']$</AlertParameter4>
<AlertParameter5>$Data/Context/Property[@Name='TenantName']$</AlertParameter5>
<AlertParameter6>$Data/Context/Property[@Name='M365_AccountName']$</AlertParameter6>
<AlertParameter7>$Data/Context/Property[@Name='M365_ClientID']$</AlertParameter7>
<AlertParameter8>$Data/Context/Property[@Name='LicensesAvailableUnits']$</AlertParameter8>
<AlertParameter9>$Data/Context/Property[@Name='PrepaidUnitsEnabled']$</AlertParameter9>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="CriteriaHealthy" MonitorTypeStateID="CriteriaHealthy" HealthState="Success"/>
<OperationalState ID="CriteriaWarning" MonitorTypeStateID="CriteriaWarning" HealthState="Warning"/>
<OperationalState ID="CriteriaError" MonitorTypeStateID="CriteriaError" HealthState="Error"/>
</OperationalStates>
<Configuration>
<CD_Category>LicensesConsumed</CD_Category>
<CD_HighWarningThreshold>80</CD_HighWarningThreshold>
<CD_HighCriticalThreshold>90</CD_HighCriticalThreshold>
<CD_LowWarningThreshold>-1</CD_LowWarningThreshold>
<CD_LowCriticalThreshold>-1</CD_LowCriticalThreshold>
<CD_PropertyName>LicensesConsumedPercent</CD_PropertyName>
<ApiTokenScopeURL>$Target/Host/Host/Property[Type="M365SL!M365SL.WatcherNode"]/ApiTokenScopeURL$</ApiTokenScopeURL>
<ApiTokenURL>$Target/Host/Host/Property[Type="M365SL!M365SL.WatcherNode"]/ApiTokenURL$</ApiTokenURL>
<ApiURL>$Target/Host/Host/Property[Type="M365SL!M365SL.WatcherNode"]/ApiURL$</ApiURL>
<M365_AccountName>$Target/Property[Type="M365SL!M365SL.M365ServiceComponent"]/M365_AccountName$</M365_AccountName>
<M365_AccountPassword>$Target/Property[Type="M365SL!M365SL.M365ServiceComponent"]/M365_AccountPassword$</M365_AccountPassword>
<M365_ClientID>$Target/Property[Type="M365SL!M365SL.M365ServiceComponent"]/M365_ClientID$</M365_ClientID>
<M365_ClientSecret>$Target/Property[Type="M365SL!M365SL.M365ServiceComponent"]/M365_ClientSecret$</M365_ClientSecret>
<EventIDFilter/>
<IntervalSeconds>$Target/Property[Type="M365SL!M365SL.M365ServiceComponent"]/IntervalSeconds$</IntervalSeconds>
<MatchCount>0</MatchCount>
<PoshLibraryPath/>
<ProbeActionTimeoutSeconds>180</ProbeActionTimeoutSeconds>
<SampleCount>0</SampleCount>
<SyncTime/>
<TenantName>$Target/Property[Type="M365SL!M365SL.M365ServiceComponent"]/TenantName$</TenantName>
<TLSVersion>$Target/Host/Host/Property[Type="M365SL!M365SL.WatcherNode"]/TLSVersion$</TLSVersion>
<WorkflowName/>
<WriteToEventLog>false</WriteToEventLog>
</Configuration>
</UnitMonitor>