question

Anon4343-9491 avatar image
0 Votes"
Anon4343-9491 asked Anon4343-9491 rolled back

Storage Account Replication Monitoring

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>
-IncludeGeoReplicationStats).GeoReplicationStats.LastSyncTime

https://docs.microsoft.com/en-us/azure/storage/common/last-sync-time-get?tabs=azure-powershell


azure-monitorazure-storage-accounts
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Anon4343-9491 We apologize for the delay in answering this. We are looking into this issue and will update you soon. Thanks!

0 Votes 0 ·
DavidBroggy-5270 avatar image
0 Votes"
DavidBroggy-5270 answered Anon4343-9491 commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks. I feel like that's a bit overkill. We do have a SIEM in place. I feel like that is a bit overkill. Isn't there some sort of alerting built into the Azure platform?

0 Votes 0 ·
AndrewBlumhardt-1137 avatar image
1 Vote"
AndrewBlumhardt-1137 answered AndrewBlumhardt-1137 edited

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.

https://docs.microsoft.com/en-us/azure/storage/common/storage-monitoring-diagnosing-troubleshooting?tabs=dotnet#monitoring-performance
https://docs.microsoft.com/en-us/azure/storage/common/storage-insights-overview
https://docs.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-metric

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.