M365 MailFlow - ExchangeHybrid (Exchange to M365) Monitor

M365SMAIL.MailFlow.ExchangeToM365.Monitor (UnitMonitor)

Description for the new unit monitor.

Knowledge Base article:

Summary

Will perform synthetic tests to monitor mail send/receive activity from Exchange (on premises) to M365. 

Resolutions

Additional

None.

External

https://MonitoringGuys.com

Overridable Parameters

Name

Description

Default Value

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.

300

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:

TargetM365SMAIL.MailFlow.ExchangeHybrid
Parent MonitorM365SMAIL.MailFlow.Aggregate.Health.Monitor
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeM365SMAIL.O365MailFlow.MT
RemotableTrue
AccessibilityPublic
Alert Message
M365 MailFlow - ExchangeHybrid (M365 to Exchange) Alert
Email message test failed!

TenantName: {0}
Client/Application ID: {1}
Details: {2}
MailflowDirection: {3} (P=OnPrem, A=O365)
SenderEmailAddress: {4}
ReceiverEmailAddress: {5}
RunAsDefault

Source Code:

<UnitMonitor ID="M365SMAIL.MailFlow.ExchangeToM365.Monitor" Accessibility="Public" Enabled="true" Target="M365SMAIL.MailFlow.ExchangeHybrid" ParentMonitorID="M365SMAIL.MailFlow.Aggregate.Health.Monitor" Remotable="true" Priority="Normal" TypeID="M365SMAIL.O365MailFlow.MT" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="M365SMAIL.MailFlow.ExchangeToM365.Monitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='TenantName']$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='M365_ClientID']$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='Message']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='MailflowDirection']$</AlertParameter4>
<AlertParameter5>$Data/Context/Property[@Name='SenderEmailAddress']$</AlertParameter5>
<AlertParameter6>$Data/Context/Property[@Name='ReceiverEmailAddress']$</AlertParameter6>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="CriteriaHealthy" MonitorTypeStateID="CriteriaHealthy" HealthState="Success"/>
<OperationalState ID="CriteriaError" MonitorTypeStateID="CriteriaError" HealthState="Error"/>
</OperationalStates>
<Configuration>
<CD_CriticalExpression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">HEALTHY</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">CRITICAL</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</CD_CriticalExpression>
<CD_HealthyExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">HEALTHY</Value>
</ValueExpression>
</SimpleExpression>
</CD_HealthyExpression>
<ApiTokenScopeURL>$Target/Host/Property[Type="M365SL!M365SL.WatcherNode"]/ApiTokenScopeURL$</ApiTokenScopeURL>
<ApiTokenURL>$Target/Host/Property[Type="M365SL!M365SL.WatcherNode"]/ApiTokenURL$</ApiTokenURL>
<ApiURL>$Target/Host/Property[Type="M365SL!M365SL.WatcherNode"]/ApiURL$</ApiURL>
<ExchangeURL>$Target/Property[Type="M365SMAIL.MailFlow.ExchangeHybrid"]/ExchangeURL$</ExchangeURL>
<ExchangeWebServicesPath>$Target/Property[Type="M365SMAIL.MailFlow.ExchangeHybrid"]/ExchangeWebServicesPath$</ExchangeWebServicesPath>
<!-- Verify direction ! -->
<MailflowDirection>PtoA</MailflowDirection>
<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="M365SMAIL.MailFlow.ExchangeHybrid"]/Exch_to_M365_IntervalSeconds$</IntervalSeconds>
<MatchCount>0</MatchCount>
<PoshLibraryPath/>
<ProbeActionTimeoutSeconds>300</ProbeActionTimeoutSeconds>
<!-- Make sure Receiver is correct ! -->
<ReceiverEmailAddress>$Target/Property[Type="M365SMAIL.MailFlow"]/M365_ReceiverEmailAddress$</ReceiverEmailAddress>
<ReceiverPassword>$Target/Property[Type="M365SMAIL.MailFlow"]/M365_ReceiverPassword$</ReceiverPassword>
<ReceiveTimeoutSeconds>$Target/Property[Type="M365SMAIL.MailFlow.ExchangeHybrid"]/Exchange_ReceiveTimeoutSeconds$</ReceiveTimeoutSeconds>
<ReceiveRetry_WaitSeconds>$Target/Property[Type="M365SMAIL.MailFlow.ExchangeHybrid"]/M365_to_Exch_ReceiveRetry_WaitSeconds$</ReceiveRetry_WaitSeconds>
<SampleCount>0</SampleCount>
<!-- Make sure Sender is correct ! -->
<SenderEmailAddress>$Target/Property[Type="M365SMAIL.MailFlow.ExchangeHybrid"]/Exchange_SenderEmailAddress$</SenderEmailAddress>
<SenderPassword>$Target/Property[Type="M365SMAIL.MailFlow.ExchangeHybrid"]/Exchange_SenderPassword$</SenderPassword>
<SyncTime/>
<TenantName>$Target/Property[Type="M365SL!M365SL.M365ServiceComponent"]/TenantName$</TenantName>
<TLSVersion>$Target/Host/Property[Type="M365SL!M365SL.WatcherNode"]/TLSVersion$</TLSVersion>
<WorkflowName/>
<WriteToEventLog>false</WriteToEventLog>
</Configuration>
</UnitMonitor>