Azure SQL MI: Geo-Replication Lag (seconds)

Microsoft.Azure.ManagedInstance.CollectionRule.Database.GeoReplicationLag (Rule)

Geo-Replication Lag performance collection rule.

Knowledge Base article:

Summary

This rule collects geo-replication lag in seconds which shows time difference between the transactions committed on the primary and persisted on the secondary. This metric is collected for the primary database only.

Overridable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

Yes

Interval (seconds)

The recurring interval of time in seconds in which to run the workflow.

900

Synchronization Time

The synchronization time specified by using a 24-hour format. May be omitted.

Timeout (seconds)

Specifies the time the workflow is allowed to run before being closed and marked as failed.

300

Timeout for database connection (seconds)

The workflow will fail and register an event, if it cannot access the database during the specified period.

15

Element properties:

TargetMicrosoft.Azure.ManagedInstance.Database
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Azure.ManagedInstance.DataSource.GeoReplicationStatusPerf Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.Azure.ManagedInstance.CollectionRule.Database.GeoReplicationLag" Enabled="true" Target="MngdInstD!Microsoft.Azure.ManagedInstance.Database" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.Azure.ManagedInstance.DataSource.GeoReplicationStatusPerf">
<InstanceName>$Target/Host/Property[Type="MngdInstD!Microsoft.Azure.ManagedInstance.DBEngine"]/InstanceName$</InstanceName>
<Tier>$Target/Host/Property[Type="MngdInstD!Microsoft.Azure.ManagedInstance.DBEngine"]/Tier$</Tier>
<HardwareGeneration>$Target/Host/Property[Type="MngdInstD!Microsoft.Azure.ManagedInstance.DBEngine"]/HardwareGeneration$</HardwareGeneration>
<ReadScaleOutReplicaType>$Target/Host/Property[Type="MngdInstD!Microsoft.Azure.ManagedInstance.DBEngine"]/ReadScaleOutReplicaType$</ReadScaleOutReplicaType>
<ConnectionString>$Target/Host/Property[Type="MngdInstD!Microsoft.Azure.ManagedInstance.DBEngine"]/ConnectionString$</ConnectionString>
<AuthType>$Target/Host/Property[Type="MngdInstD!Microsoft.Azure.ManagedInstance.DBEngine"]/AuthType$</AuthType>
<AuthorityDetails>$Target/Host/Property[Type="MngdInstD!Microsoft.Azure.ManagedInstance.DBEngine"]/AuthorityDetails$</AuthorityDetails>
<DatabaseName>$Target/Property[Type="MngdInstD!Microsoft.Azure.ManagedInstance.Database"]/DatabaseName$</DatabaseName>
<ObjectName>SQL Database</ObjectName>
<CounterName>Geo-Replication Lag (sec)</CounterName>
<PerfInstanceName/>
<ValuePropertyName>LagSec</ValuePropertyName>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>