Share via


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

Name Description Type Status
az network watcher connection-monitor create

Create a connection monitor.

Core GA
az network watcher connection-monitor delete

Delete a connection monitor for the given region.

Core GA
az network watcher connection-monitor endpoint

Manage endpoint of a connection monitor.

Core Preview
az network watcher connection-monitor endpoint add

Add an endpoint to a connection monitor.

Core Preview
az network watcher connection-monitor endpoint list

List all endpoints from a connection monitor.

Core Preview
az network watcher connection-monitor endpoint remove

Remove an endpoint from a connection monitor.

Core Preview
az network watcher connection-monitor endpoint show

Show an endpoint from a connection monitor.

Core Preview
az network watcher connection-monitor endpoint wait

Place the CLI in a waiting state until a condition is met.

Core Preview
az network watcher connection-monitor list

List connection monitors for the given region.

Core GA
az network watcher connection-monitor output

Manage output of connection monitor.

Core Preview
az network watcher connection-monitor output add

Add an output to a connection monitor.

Core Preview
az network watcher connection-monitor output list

List all output from a connection monitor.

Core Preview
az network watcher connection-monitor output remove

Remove all outputs from a connection monitor.

Core Preview
az network watcher connection-monitor output wait

Place the CLI in a waiting state until a condition is met.

Core Preview
az network watcher connection-monitor query

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

Core GA
az network watcher connection-monitor show

Shows a connection monitor by name.

Core GA
az network watcher connection-monitor start

Start the specified connection monitor.

Core GA
az network watcher connection-monitor stop

Stop the specified connection monitor.

Core GA
az network watcher connection-monitor test-configuration

Manage test configuration of a connection monitor.

Core Preview
az network watcher connection-monitor test-configuration add

Add a test configuration to a connection monitor.

Core Preview
az network watcher connection-monitor test-configuration list

List all test configurations of a connection monitor.

Core Preview
az network watcher connection-monitor test-configuration remove

Remove a test configuration from a connection monitor.

Core Preview
az network watcher connection-monitor test-configuration show

Show a test configuration from a connection monitor.

Core Preview
az network watcher connection-monitor test-configuration wait

Place the CLI in a waiting state until a condition is met.

Core Preview
az network watcher connection-monitor test-group

Manage a test group of a connection monitor.

Core Preview
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.

Core Preview
az network watcher connection-monitor test-group list

List all test groups of a connection monitor.

Core Preview
az network watcher connection-monitor test-group remove

Remove test group from a connection monitor.

Core Preview
az network watcher connection-monitor test-group show

Show a test group of a connection monitor.

Core Preview
az network watcher connection-monitor test-group wait

Place the CLI in a waiting state until a condition is met.

Core Preview
az network watcher connection-monitor wait

Place the CLI in a waiting state until a condition is met.

Core GA

az network watcher connection-monitor create

Create a connection monitor.

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

Examples

Create a 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
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

--connection-monitor-name --name -n

Connection monitor name.

--endpoint-dest-name

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

Property Value
Parameter group: V2 Endpoint Arguments
--endpoint-source-name

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

Property Value
Parameter group: V2 Endpoint Arguments
--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.

Property Value
Parameter group: V2 Endpoint Arguments
--test-config-name

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

Property Value
Parameter group: V2 Test Configuration Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--endpoint-dest-address

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

Property Value
Parameter group: V2 Endpoint Arguments
--endpoint-dest-coverage-level

Test coverage for the endpoint.

Property Value
Parameter group: V2 Endpoint Arguments
Accepted values: AboveAverage, Average, BelowAverage, Default, Full, Low
--endpoint-dest-resource-id

Resource ID of the destination of connection monitor endpoint.

Property Value
Parameter group: V2 Endpoint Arguments
--endpoint-dest-type

The endpoint type.

Property Value
Parameter group: V2 Endpoint Arguments
Accepted values: AzureArcVM, AzureSubnet, AzureVM, AzureVMSS, AzureVNet, ExternalAddress, MMAWorkspaceMachine, MMAWorkspaceNetwork
--endpoint-source-address

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

Property Value
Parameter group: V2 Endpoint Arguments
--endpoint-source-coverage-level

Test coverage for the endpoint.

Property Value
Parameter group: V2 Endpoint Arguments
Accepted values: AboveAverage, Average, BelowAverage, Default, Full, Low
--endpoint-source-type

The endpoint type.

Property Value
Parameter group: V2 Endpoint Arguments
Accepted values: AzureArcVM, AzureSubnet, AzureVM, AzureVMSS, AzureVNet, ExternalAddress, MMAWorkspaceMachine, MMAWorkspaceNetwork
--frequency

The frequency of test evaluation, in seconds.

Property Value
Parameter group: V2 Test Configuration Arguments
Default value: 60
--http-method

The HTTP method to use.

Property Value
Parameter group: V2 Test Configuration Arguments
Accepted values: Get, Post
--http-path

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

Property Value
Parameter group: V2 Test Configuration Arguments
--http-port

The port to connect to.

Property Value
Parameter group: V2 Test Configuration Arguments
--http-valid-status-codes

Space-separated list of HTTP status codes to consider successful. For instance, '2xx 301-304 418' Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: V2 Test Configuration Arguments
--https-prefer

Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit. Allowed values: false, true.

Property Value
Parameter group: V2 Test Configuration Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--icmp-disable-trace-route

Value indicating whether path evaluation with trace route should be disabled. false is default. Allowed values: false, true.

Property Value
Parameter group: V2 Test Configuration Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--location -l

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

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--notes

Optional notes to be associated with the connection monitor.

Property Value
Parameter group: V2 Arguments
--output-type --type

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

Property Value
Parameter group: V2 Output Arguments
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.

Property Value
Parameter group: V2 Test Configuration Arguments
Accepted values: IPv4, IPv6
--protocol

The protocol to use in test evaluation.

Property Value
Parameter group: V2 Test Configuration Arguments
Accepted values: Http, Icmp, Tcp
--resource-group -g

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

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use ''to clear existing tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--tcp-disable-trace-route

Value indicating whether path evaluation with trace route should be disabled. false is default. Allowed values: false, true.

Property Value
Parameter group: V2 Test Configuration Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--tcp-port

The port to connect to.

Property Value
Parameter group: V2 Test Configuration Arguments
--tcp-port-behavior

Destination port behavior.

Property Value
Parameter group: V2 Test Configuration Arguments
Accepted values: ListenIfAvailable, None
--test-group-disable

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

Property Value
Parameter group: V2 Test Group Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--test-group-name

The name of the connection monitor test group.

Property Value
Parameter group: V2 Test Group Arguments
Default value: DefaultTestGroup
--threshold-failed-percent

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

Property Value
Parameter group: V2 Test Configuration Arguments
--threshold-round-trip-time

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

Property Value
Parameter group: V2 Test Configuration Arguments
--workspace-ids

Space-separated list of ids of log analytics workspace. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: V2 Output Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network watcher connection-monitor delete

Delete a connection monitor for the given region.

az network watcher connection-monitor delete --connection-monitor-name --name
                                             --location
                                             [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

Examples

Delete a connection monitor for the given region.

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

Required Parameters

--connection-monitor-name --name -n

Connection monitor name.

--location -l

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network watcher connection-monitor list

List connection monitors for the given region.

az network watcher connection-monitor list --location

Examples

List a connection monitor for the given region.

az network watcher connection-monitor list -l westus
az 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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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 --connection-monitor-name --name
                                            --location
                                            [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

Examples

List a connection monitor for the given region.

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

Required Parameters

--connection-monitor-name --name -n

Connection monitor name.

--location -l

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network watcher connection-monitor show

Shows a connection monitor by name.

az network watcher connection-monitor show --connection-monitor-name --name
                                           --location

Examples

Show a connection monitor for the given name.

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

Required Parameters

--connection-monitor-name --name -n

Connection monitor name.

--location -l

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network watcher connection-monitor start

Start the specified connection monitor.

az network watcher connection-monitor start --connection-monitor-name --name
                                            --location
                                            [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

Examples

Start the specified connection monitor.

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

Required Parameters

--connection-monitor-name --name -n

Connection monitor name.

--location -l

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network watcher connection-monitor stop

Stop the specified connection monitor.

az network watcher connection-monitor stop --connection-monitor-name --name
                                           --location
                                           [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

Examples

Stop the specified connection monitor.

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

Required Parameters

--connection-monitor-name --name -n

Connection monitor name.

--location -l

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network watcher connection-monitor wait

Place the CLI in a waiting state until a condition is met.

az network watcher connection-monitor wait [--connection-monitor-name --name]
                                           [--created]
                                           [--custom]
                                           [--deleted]
                                           [--exists]
                                           [--ids]
                                           [--interval]
                                           [--network-watcher-name]
                                           [--resource-group-name]
                                           [--subscription]
                                           [--timeout]
                                           [--updated]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--connection-monitor-name --name -n

Connection monitor name.

Property Value
Parameter group: Resource Id Arguments
--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--network-watcher-name

The name of the Network Watcher resource.

Property Value
Parameter group: Resource Id Arguments
--resource-group-name -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False