|
| 1 | +--- |
| 2 | +title: Set up call monitoring |
| 3 | +titleSuffix: An Azure Communication Services concept document |
| 4 | +description: Configure Communications Services call monitoring and alerting |
| 5 | +author: mkhribech |
| 6 | +services: azure-communication-services |
| 7 | + |
| 8 | +ms.author: aakanmu |
| 9 | +ms.date: 3/26/2025 |
| 10 | +ms.topic: conceptual |
| 11 | +ms.service: azure-communication-services |
| 12 | +ms.subservice: data |
| 13 | +--- |
| 14 | + |
| 15 | +# Set up call monitoring and alerting |
| 16 | + |
| 17 | +This article describes how Azure Communication Services Calling customers set-up monitoring and alerting for their calls. Follow these steps to ensure a smooth and effective setup process. |
| 18 | + |
| 19 | +## Prerequisite: enable call logging and diagnostics |
| 20 | + |
| 21 | +Before configuring monitoring, ensure that call logging and diagnostics are enabled for your Direct Routing setup. This process involves configuring Azure Communication Services to collect call data. For detailed instructions, see [Enable Azure Monitor](enable-logging.md). |
| 22 | + |
| 23 | +## Step-by-step instructions |
| 24 | + |
| 25 | +### Access the monitoring dashboard |
| 26 | + |
| 27 | +1. In the Azure portal, navigate to your Azure Communication Service Resource group. |
| 28 | +2. On the navigation blade, click **Monitoring** and then click **Logs**. |
| 29 | +3. In the query editor, enter a Kusto Query Language (KQL) for what you want to monitor. The following sample query checks for call failure rates aggregated per hour and filters the results to show only where the failure rate exceeds 10%: |
| 30 | + |
| 31 | + <pre> |
| 32 | + ACSCallSummary |
| 33 | + | summarize UnsuccessfulCalls = countif(ParticipantEndReason != 0), TotalCalls = count() by bin(TimeGenerated, 1h) |
| 34 | + | extend FailureRate = (UnsuccessfulCalls * 100.0) / TotalCalls |
| 35 | + | where FailureRate > 10</pre> |
| 36 | + |
| 37 | +:::image type="content" source="media\set-up-call-monitoring\sample-query.png" alt-text="Screen capture of an example Kusto query for call failure rates."::: |
| 38 | + |
| 39 | +### Configure alerts |
| 40 | + |
| 41 | +1. On the navigation blade, click **Monitoring** and then click **Alerts**. |
| 42 | +2. Click **Create alert rule**. |
| 43 | +3. For **Signal name**, select **Custom log search**. |
| 44 | +4. For **Search query**, provide the query you ran in the previous section. |
| 45 | +5. Provide measurement criteria, for example: |
| 46 | + * Measure: FailureRate |
| 47 | + * Aggregation Type: Total |
| 48 | + * Aggregation granularity: 1 hour |
| 49 | + |
| 50 | + :::image type="content" source="media\set-up-call-monitoring\create-alert-rule.png" alt-text="Screen capture of the create an alert rule showing signal name, search query, and measurement criteria."::: |
| 51 | + |
| 52 | +6. Adjust the alert logic to suit your requirements. When complete, click **Next: Actions** when done. |
| 53 | + |
| 54 | +:::image type="content" source="media\set-up-call-monitoring\split-by-dimensions.png" alt-text="Screen capture of split by dimensions including alert logic."::: |
| 55 | + |
| 56 | +### Create action group |
| 57 | + |
| 58 | +1. From the Actions screen, click **Create Action Group**. |
| 59 | +2. Select your **Subscription**, **Resource group**, and **Region**. |
| 60 | +3. Provide an Action group name and Display name, then click **Next: Notifications**. |
| 61 | + |
| 62 | +:::image type="content" source="media\set-up-call-monitoring\create-action-group.png" alt-text="Screen capture of create action group showing project details of subscription, resource group, and region."::: |
| 63 | + |
| 64 | +### Set up notifications |
| 65 | + |
| 66 | +1. Choose how you want to be notified. When complete, click **Review + create**, and wait for your alert rule to be created. |
| 67 | + |
| 68 | + :::image type="content" source="media\set-up-call-monitoring\set-up-notifications.png" alt-text="Screen capture of how to set up notifications and review + create the notification."::: |
| 69 | + |
| 70 | +2. When complete, click **Next: Details**. |
| 71 | +3. Provide more details as shown in the following screen. |
| 72 | +4. Click **Review + create**. |
| 73 | + |
| 74 | + :::image type="content" source="media\set-up-call-monitoring\alert-rule-details.png" alt-text="Screen capture showing set up alert rule details."::: |
| 75 | + |
| 76 | + Congratulations, you can now monitor your Azure Communication Services calling! |
| 77 | + |
| 78 | +A sample email alert looks like this when triggered: Email Alert. |
| 79 | + |
| 80 | +:::image type="content" source="media\set-up-call-monitoring\sample-email-alert.png" alt-text="Screen capture of a sample email alert showing the reason and affected resource hierarchy."::: |
| 81 | + |
| 82 | +## Related articles |
| 83 | + |
| 84 | +[Enable logs via Diagnostic Settings in Azure Monitor](./enable-logging.md) |
0 commit comments