az network watcher connection-monitor

Manage connection monitoring between an Azure Virtual Machine and any IP resource.

Connection monitor can be used to monitor network connectivity between an Azure virtual machine and an IP address. The IP address can be assigned to another Azure resource or a resource on the Internet or on-premises. To learn more visit https://aka.ms/connectionmonitordoc.

Commands

az network watcher connection-monitor create

Create a connection monitor.

az network watcher connection-monitor delete

Delete a connection monitor for the given region.

az network watcher connection-monitor endpoint

Manage endpoint of a connection monitor.

az network watcher connection-monitor endpoint add

Add an endpoint to a connection monitor.

az network watcher connection-monitor endpoint list

List all endpoints form a connection monitor.

az network watcher connection-monitor endpoint remove

Remove an endpoint from a connection monitor.

az network watcher connection-monitor endpoint show

Show an endpoint from a connection monitor.

az network watcher connection-monitor list

List connection monitors for the given region.

az network watcher connection-monitor output

Manage output of connection monitor.

az network watcher connection-monitor output add

Add an output to a connection monitor.

az network watcher connection-monitor output list

List all output from a connection monitor.

az network watcher connection-monitor output remove

Remove all outputs from a connection monitor.

az network watcher connection-monitor query

Query a snapshot of the most recent connection state of a connection monitor.

az network watcher connection-monitor show

Shows a connection monitor by name.

az network watcher connection-monitor start

Start the specified connection monitor.

az network watcher connection-monitor stop

Stop the specified connection monitor.

az network watcher connection-monitor test-configuration

Manage test configuration of a connection monitor.

az network watcher connection-monitor test-configuration add

Add a test configuration to a connection monitor.

az network watcher connection-monitor test-configuration list

List all test configurations of a connection monitor.

az network watcher connection-monitor test-configuration remove

Remove a test configuration from a connection monitor.

az network watcher connection-monitor test-configuration show

Show a test configuration from a connection monitor.

az network watcher connection-monitor test-group

Manage a test group of a connection monitor.

az network watcher connection-monitor test-group add

Add a test group along with new-added/existing endpoint and test configuration to a connection monitor.

az network watcher connection-monitor test-group list

List all test groups of a connection monitor.

az network watcher connection-monitor test-group remove

Remove test group from a connection monitor.

az network watcher connection-monitor test-group show

Show a test group of a connection monitor.

az network watcher connection-monitor create

Create a connection monitor.

This extension allow to create V1 and V2 version of connection monitor. V1 connection monitor supports single source and destination endpoint which comes with V1 argument groups as usual. V2 connection monitor supports multiple endpoints and several test protocol which comes with V2 argument groups.

az network watcher connection-monitor create --name
                                             [--dest-address]
                                             [--dest-port]
                                             [--dest-resource]
                                             [--do-not-start]
                                             [--endpoint-dest-address]
                                             [--endpoint-dest-coverage-level {AboveAverage, Average, BelowAverage, Default, Full, Low}]
                                             [--endpoint-dest-name]
                                             [--endpoint-dest-resource-id]
                                             [--endpoint-dest-type {AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine, MMAWorkspaceNetwork}]
                                             [--endpoint-source-address]
                                             [--endpoint-source-coverage-level {AboveAverage, Average, BelowAverage, Default, Full, Low}]
                                             [--endpoint-source-name]
                                             [--endpoint-source-resource-id]
                                             [--endpoint-source-type {AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine, MMAWorkspaceNetwork}]
                                             [--frequency]
                                             [--http-method {Get, Post}]
                                             [--http-path]
                                             [--http-port]
                                             [--http-valid-status-codes]
                                             [--https-prefer {false, true}]
                                             [--icmp-disable-trace-route {false, true}]
                                             [--location]
                                             [--monitoring-interval]
                                             [--notes]
                                             [--output-type {Workspace}]
                                             [--preferred-ip-version {IPv4, IPv6}]
                                             [--protocol {Http, Icmp, Tcp}]
                                             [--resource-group]
                                             [--source-port]
                                             [--source-resource]
                                             [--subscription]
                                             [--tags]
                                             [--tcp-disable-trace-route {false, true}]
                                             [--tcp-port]
                                             [--tcp-port-behavior {ListenIfAvailable, None}]
                                             [--test-config-name]
                                             [--test-group-disable {false, true}]
                                             [--test-group-name]
                                             [--threshold-failed-percent]
                                             [--threshold-round-trip-time]
                                             [--workspace-ids]

Examples

Create a connection monitor for a virtual machine.

az network watcher connection-monitor create -g MyResourceGroup -n MyConnectionMonitorName \
    --source-resource MyVM

Create a V2 connection monitor

az network watcher connection-monitor create --name MyV2ConnectionMonitor --endpoint-source-name "vm01" --endpoint-source-resource-id MyVM01ResourceID --endpoint-dest-name bing --endpoint-dest-address bing.com --test-config-name TCPTestConfig --protocol Tcp --tcp-port 2048

Create a connection monitor. (autogenerated)

az network watcher connection-monitor create --endpoint-dest-address bing.com --endpoint-dest-name bing --endpoint-source-name "vm01" --endpoint-source-resource-id MyVM01ResourceID --location westus2 --name MyConnectionMonitorName --protocol Tcp --tcp-port 2048 --test-config-name TCPTestConfig

Required Parameters

--name -n

Connection monitor name.

Optional Parameters

--dest-address

The IP address or URI at which to receive traffic.

--dest-port

Port number on which to receive traffic.

--dest-resource

Currently only Virtual Machines are supported.

--do-not-start

Create the connection monitor but do not start it immediately.

--endpoint-dest-address

Address of the destination of connection monitor endpoint (IP or domain name).

--endpoint-dest-coverage-level

Test coverage for the endpoint.

accepted values: AboveAverage, Average, BelowAverage, Default, Full, Low
--endpoint-dest-name

The name of the destination of connection monitor endpoint. If you are creating a V2 Connection Monitor, it's required.

--endpoint-dest-resource-id

Resource ID of the destination of connection monitor endpoint.

--endpoint-dest-type

The endpoint type.

accepted values: AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine, MMAWorkspaceNetwork
--endpoint-source-address

Address of the source of connection monitor endpoint (IP or domain name).

--endpoint-source-coverage-level

Test coverage for the endpoint.

accepted values: AboveAverage, Average, BelowAverage, Default, Full, Low
--endpoint-source-name

The name of the source of connection monitor endpoint. If you are creating a V2 Connection Monitor, it's required.

--endpoint-source-resource-id

Resource ID of the source of connection monitor endpoint. If endpoint is intended to used as source, this option is required.

--endpoint-source-type

The endpoint type.

accepted values: AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine, MMAWorkspaceNetwork
--frequency

The frequency of test evaluation, in seconds.

default value: 60
--http-method

The HTTP method to use.

accepted values: Get, Post
--http-path

The path component of the URI. For instance, "/dir1/dir2".

--http-port

The port to connect to.

--http-valid-status-codes

Space-separated list of HTTP status codes to consider successful. For instance, "2xx 301-304 418".

--https-prefer

Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.

accepted values: false, true
--icmp-disable-trace-route

Value indicating whether path evaluation with trace route should be disabled. false is default.

accepted values: false, true
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--monitoring-interval

Monitoring interval in seconds.

default value: 60
--notes

Optional notes to be associated with the connection monitor.

--output-type

Connection monitor output destination type. Currently, only "Workspace" is supported.

accepted values: Workspace
--preferred-ip-version

The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters.

accepted values: IPv4, IPv6
--protocol

The protocol to use in test evaluation.

accepted values: Http, Icmp, Tcp
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--source-port

Port number from which to originate traffic.

--source-resource

Currently only Virtual Machines are supported.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--tcp-disable-trace-route

Value indicating whether path evaluation with trace route should be disabled. false is default.

accepted values: false, true
--tcp-port

The port to connect to.

--tcp-port-behavior

Destination port behavior.

accepted values: ListenIfAvailable, None
--test-config-name

The name of the connection monitor test configuration. If you are creating a V2 Connection Monitor, it's required.

--test-group-disable

Value indicating whether test group is disabled. false is default.

accepted values: false, true
--test-group-name

The name of the connection monitor test group.

default value: DefaultTestGroup
--threshold-failed-percent

The maximum percentage of failed checks permitted for a test to evaluate as successful.

--threshold-round-trip-time

The maximum round-trip time in milliseconds permitted for a test to evaluate as successful.

--workspace-ids

Space-separated list of ids of log analytics workspace.

az network watcher connection-monitor delete

Delete a connection monitor for the given region.

az network watcher connection-monitor delete --location
                                             --name
                                             [--subscription]

Examples

Delete a connection monitor for the given region.

az network watcher connection-monitor delete -l westus -n MyConnectionMonitorName

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name -n

Connection monitor name.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network watcher connection-monitor list

List connection monitors for the given region.

az network watcher connection-monitor list --location
                                           [--query-examples]
                                           [--subscription]

Examples

List a connection monitor for the given region.

az network watcher connection-monitor list -l westus

List connection monitors for the given region. (autogenerated)

az network watcher connection-monitor list --location westus --subscription MySubscription

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network watcher connection-monitor query

Query a snapshot of the most recent connection state of a connection monitor.

az network watcher connection-monitor query --location
                                            --name
                                            [--subscription]

Examples

List a connection monitor for the given region.

az network watcher connection-monitor query -l westus -n MyConnectionMonitorName

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name -n

Connection monitor name.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network watcher connection-monitor show

Shows a connection monitor by name.

az network watcher connection-monitor show --location
                                           --name
                                           [--query-examples]
                                           [--subscription]

Examples

Show a connection monitor for the given name.

az network watcher connection-monitor show -l westus -n MyConnectionMonitorName

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name -n

Connection monitor name.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network watcher connection-monitor start

Start the specified connection monitor.

az network watcher connection-monitor start --location
                                            --name
                                            [--subscription]

Examples

Start the specified connection monitor.

az network watcher connection-monitor start -l westus -n MyConnectionMonitorName

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name -n

Connection monitor name.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network watcher connection-monitor stop

Stop the specified connection monitor.

az network watcher connection-monitor stop --location
                                           --name
                                           [--subscription]

Examples

Stop the specified connection monitor.

az network watcher connection-monitor stop -l westus -n MyConnectionMonitorName

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name -n

Connection monitor name.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.