M365 Teams - Team Presence Monitor

M365ST.Teams.TeamPresence.Monitor (UnitMonitor)

Description for the new unit monitor.

Knowledge Base article:

Summary

Will test the ability to retrieve presence/status of the designated M365 account. It's expected that the status of the account will be "Offline".

Resolutions

Additional

Use the corresponding agent task to test the service functionality.

M365 Supplemental - Teams Presence Test

External

https://MonitoringGuys.com

Overridable Parameters

Name

Description

Default Value

CD_CriticalStatusRegEx

A matching status string from the workflow will trigger this state.

FAILURE

CD_HealthyStatusRegEx

A matching status string from the workflow will trigger this state.

SUCCESS

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:

TargetM365ST.Teams.Presence
Parent MonitorM365ST.Teams.Aggregate.Availability.Monitor
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeM365ST.2StatePropertyMatch.PresenceMon.MT
RemotableTrue
AccessibilityPublic
Alert Message
M365 Teams - Team Presence Monitor Alert
Unable to detect Teams Presence status for M365_AccountName: {0}

Details: {1}

TenantName: {2}
Client/Application ID: {3}
Whoami: {4}
RunAsDefault
Comment.

Source Code:

<UnitMonitor ID="M365ST.Teams.TeamPresence.Monitor" Accessibility="Public" Enabled="true" Target="M365ST.Teams.Presence" ParentMonitorID="M365ST.Teams.Aggregate.Availability.Monitor" Remotable="true" Priority="Normal" TypeID="M365ST.2StatePropertyMatch.PresenceMon.MT" ConfirmDelivery="false" Comment=".">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="M365ST.Teams.TeamPresence.Monitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='M365_AccountName']$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='Message']$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='TenantName']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='M365_ClientID']$</AlertParameter4>
<AlertParameter5>$Data/Context/Property[@Name='Whoami']$</AlertParameter5>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="CriteriaHealthy" MonitorTypeStateID="CriteriaHealthy" HealthState="Success"/>
<OperationalState ID="CriteriaError" MonitorTypeStateID="CriteriaError" HealthState="Error"/>
</OperationalStates>
<Configuration>
<CD_CriticalStatusRegEx>FAILURE</CD_CriticalStatusRegEx>
<CD_HealthyStatusRegEx>SUCCESS</CD_HealthyStatusRegEx>
<CD_HealthStatusPropertyName>Result</CD_HealthStatusPropertyName>
<CD_InstanceFilterPBPropertyName>Category</CD_InstanceFilterPBPropertyName>
<CD_InstanceFilterPBPropertyRegEx>PresenceTest</CD_InstanceFilterPBPropertyRegEx>
<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>