Storage Account Replication Monitoring

Anon4343 451 Reputation points

How would we go about being notified that storage account replication is failing or has excessive delays? I see that it's possible to query the date time stamp via powershell, but how do we translate that into an emailed alert?

$lastSyncTime = $(Get-AzStorageAccount -ResourceGroupName <resource-group> -Name <storage-account>

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,936 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,833 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Andrew Blumhardt 9,676 Reputation points Microsoft Employee

    To your point, a simpler solution would be to use Azure Monitor Metrics. Though I do not see replication as a metric at a glance. If this does not work you might try adding it as a custom metric in diagnostic settings. Also, this could be run as an automation runbook or possibly a logic app to log the output or send as an email.

    1 person found this answer helpful.
    0 comments No comments

  2. David Broggy 5,701 Reputation points MVP

    I would do it in azure sentinel. you can create a kql query and generate an alert based on any threshold.