Connection Monitor Reference
This page provides a detailed reference for the configuration, metrics, and best practices associated with Azure Connection Monitor.
Configuration Reference
Connection Monitor allows you to monitor network connectivity between various endpoints in Azure and beyond. Here's a breakdown of its configurable components:
Connection Monitor Resource
The core resource for managing connectivity tests.
| Property | Type | Description | Required | 
|---|---|---|---|
| name | String | The name of the Connection Monitor resource. | Yes | 
| location | String | The Azure region where the resource is deployed. | Yes | 
| tags | Object | Key-value pairs for resource tagging. | No | 
| properties.autoDetectChanges | Boolean | Automatically detect and add new endpoints to monitoring. | No | 
| properties.endpoints | Array of Endpoint Objects | List of endpoints to monitor. | Yes | 
| properties.monitoredGroups | Array of MonitoredGroup Objects | Groups of tests to run. | Yes | 
| properties.notes | String | Optional descriptive notes. | No | 
Endpoint Object
Represents a source or destination for a connectivity test.
| Property | Type | Description | Required | 
|---|---|---|---|
| name | String | Unique name for the endpoint. | Yes | 
| type | String | Type of endpoint (e.g., AzureVM,AzureSubnet,AzurePublicIPAddress,AzureIPGroup,AzureLocation,Workspace,VMGuestAgent). | Yes | 
| resourceId | String | The Azure Resource ID for Azure-based endpoints. | Conditional (Yes for Azure resources) | 
| address | String | IP address or hostname for non-Azure endpoints or specific configurations. | Conditional (Yes for VM Guest Agent, Workspace) | 
| scope | String | The scope of the endpoint, e.g., a resource group or subscription for auto-detection. | No | 
| excludedVnets | Array of Vnet References | Virtual networks to exclude from monitoring for this endpoint. | No | 
MonitoredGroup Object
Defines a set of tests to be performed.
| Property | Type | Description | Required | 
|---|---|---|---|
| name | String | Unique name for the monitored group. | Yes | 
| sources | Array of Endpoint References | Endpoints that initiate the monitoring tests. | Yes | 
| destinations | Array of Endpoint References | Endpoints that are targets for the monitoring tests. | Yes | 
| testConfigurations | Array of TestConfiguration Objects | The parameters for the monitoring tests. | Yes | 
TestConfiguration Object
Specifies the parameters for a single monitoring test.
| Property | Type | Description | Required | 
|---|---|---|---|
| name | String | Unique name for the test configuration. | Yes | 
| protocol | String | The protocol to use ( TCP,ICMP). Defaults toTCP. | No | 
| port | Integer | The port number to use for TCP tests. Required if protocolisTCP. | Conditional | 
| frequencyInSeconds | Integer | How often the test is run (e.g., 60 seconds). Minimum value is 1. | Yes | 
| thresholdInMs | Integer | The maximum acceptable latency in milliseconds. | No | 
| failednsicount | Integer | The number of consecutive failed tests before the test is considered failed. | No | 
| preferredDataCenter | String | Specifies a preferred Azure region for testing if multiple endpoints exist in different regions. | No | 
Key Metrics
Connection Monitor collects several key metrics to help you understand network performance and identify issues:
- Success Rate: Percentage of successful tests over a period.
- Average Latency: Average round-trip time in milliseconds.
- Packet Loss: Percentage of packets lost during tests.
- HTTP Status Code: For HTTP/S tests, the status code returned by the destination.
- HTTP/S Latency: Latency specific to the HTTP/S request.
Best Practices
- Start Simple: Begin with a few critical endpoints and gradually expand your monitoring scope.
- Utilize Guest Agent: For monitoring specific virtual machines or workloads, ensure the Connection Monitor guest agent is installed and configured.
- Leverage IP Groups: For monitoring connectivity to a large set of IP addresses (e.g., third-party services), use Azure IP Groups to simplify management.
- Set Realistic Thresholds: Configure latency and failure thresholds based on your application's requirements.
- Monitor Critical Ports: Ensure you are testing connectivity on the ports your applications rely on.
- Regularly Review Results: Periodically analyze the collected metrics to proactively identify and address network issues.
- Use `autoDetectChanges` Wisely: Enable this feature to automatically include new resources but be mindful of potential increases in monitoring load.
Common Troubleshooting Scenarios
High Latency:
- Check the thresholdInMssetting.
- Examine the network path between source and destination.
- Look for network congestion or suboptimal routing.
Packet Loss:
- Investigate underlying network infrastructure issues.
- Check for intermittent connectivity problems.
- Ensure firewall rules are not dropping packets.
Test Failures (e.g., Port Closed):
- Verify that the destination endpoint is running and listening on the specified port.
- Confirm that Network Security Groups (NSGs) and Azure Firewall rules allow traffic on the monitored port.
- Check if the destination is publicly accessible if it's an internet-facing endpoint.
For detailed API specifications, refer to the Azure REST API Reference.
Back to Top