How can I setup an alert for error on Database Sync Group log?

Sang Le 0 Reputation points
2025-01-13T22:22:11.23+00:00

Is there a way to send an alert when the logs of the database sync group have a type=error? Thanks.

This seems to be more complicated that should be.

e.g. https://azure.microsoft.com/es-es/blog/monitoring-azure-sql-data-sync-using-oms-log-analytics/

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Azar 25,935 Reputation points MVP
    2025-01-13T23:05:30.3033333+00:00

    Hi there Sang Le

    Thnks for using QanadA platform

    you can use Azure Monitor and Log Analytics. First, enable diagnostic settings for your SQL Database in the Azure portal and send logs to a Log Analytics workspace. Then, in the workspace, you can use a KQL query to filter logs where the LogType is Error, such as AzureDiagnostics | where ResourceType == "DATABASESYNCCLIENTGROUPS" | where LogType == "Error" | project TimeGenerated, ResourceGroup, Resource, Message. then create an alert rule based on it by configuring a threshold to trigger when the query returns results, setting an evaluation frequency maybe like 10 mins once, and tag it with an action group for notifications.https://learn.microsoft.com/en-us/azure/azure-sql/database/alerts-create?view=azuresql&utm_source=chatgpt.com&tabs=metric

    If this helps kindly accept the answer thanks much,

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.