Share via


az network network-watcher connection-monitor

Manage connection monitor.

Connection monitor provides unified, end-to-end connection monitoring in Network Watcher. The Connection monitor feature supports hybrid and Azure cloud deployments.

Commands

Name Description Type Status
az network network-watcher connection-monitor create

Create a connection monitor.

Core GA
az network network-watcher connection-monitor delete

Delete the specified connection monitor.

Core GA
az network network-watcher connection-monitor list

List all connection monitors for the specified Network Watcher.

Core GA
az network network-watcher connection-monitor show

Get a connection monitor by name.

Core GA
az network network-watcher connection-monitor wait

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

Core GA

az network network-watcher connection-monitor create

Create a connection monitor.

az network network-watcher connection-monitor create --connection-monitor-name
                                                     --network-watcher-name
                                                     --resource-group
                                                     [--auto-start {0, 1, f, false, n, no, t, true, y, yes}]
                                                     [--endpoints]
                                                     [--location]
                                                     [--migrate]
                                                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                     [--notes]
                                                     [--outputs]
                                                     [--tags]
                                                     [--test-configurations]
                                                     [--test-groups]

Examples

Create connection monitor

az network network-watcher connection-monitor create --name cm12 --network-watcher-name networkwatcher_eastus --resource-group networkwatcherrg --location eastus --endpoints "[{name:vmName,type:AzureVM,resourceId:/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/TESTVM-LINUX},{address:8.8.8.8,name:google,type:ExternalAddress}]" --test-configurations "[{name:TestConfiguration04,protocol:Tcp,successThreshold:{},tcpConfiguration:{disableTraceRoute:false,port:53},testFrequencySec:30}]" --test-groups "[{destinations:[google],disable:false,name:TestingGroup04,sources:[vmName],testConfigurations:[TestConfiguration04]}]"

Create Connection Monitor

az network network-watcher connection-monitor create --name cm12 --network-watcher-name networkwatcher_eastus --resource-group networkwatcherrg --location eastus --endpoints "[{name:vmName,type:AzureVM,resourceId:/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/TESTVM-LINUX},{address:8.8.8.8,name:google,type:ExternalAddress}]" --test-configurations "[{name:TestConfiguration04,protocol:Tcp,successThreshold:{},tcpConfiguration:{disableTraceRoute:false,port:53},testFrequencySec:30}]" --test-groups "[{destinations:[google],disable:false,name:TestingGroup04,sources:[vmName],testConfigurations:[TestConfiguration04]}]" --outputs "[{type:Workspace,workspaceSettings:{workspaceResourceId:/subscriptions/subid/resourceGroups/DefaultResourceGroup-EUS/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-sub-id-region}}]"

Required Parameters

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

The name of the connection monitor.

--network-watcher-name

The name of the Network Watcher resource.

--resource-group -g

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

Optional Parameters

--auto-start

Determines if the connection monitor will start automatically once created.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--endpoints

List of connection monitor endpoints. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--location

Connection monitor location.

--migrate

Value indicating whether connection monitor V1 should be migrated to V2 format.

--no-wait

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

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

Optional notes to be associated with the connection monitor.

--outputs

List of connection monitor outputs. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--tags

Connection monitor tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--test-configurations

List of connection monitor test configurations. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--test-groups

List of connection monitor test groups. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az network network-watcher connection-monitor delete

Delete the specified connection monitor.

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

Optional Parameters

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

The name of the connection monitor.

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

--network-watcher-name

The name of the Network Watcher resource.

--no-wait

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

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

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

--subscription

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

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az network network-watcher connection-monitor list

List all connection monitors for the specified Network Watcher.

az network network-watcher connection-monitor list --network-watcher-name
                                                   --resource-group

Required Parameters

--network-watcher-name

The name of the Network Watcher resource.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az network network-watcher connection-monitor show

Get a connection monitor by name.

az network network-watcher connection-monitor show [--connection-monitor-name]
                                                   [--ids]
                                                   [--network-watcher-name]
                                                   [--resource-group]
                                                   [--subscription]

Optional Parameters

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

The name of the connection monitor.

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

--network-watcher-name

The name of the Network Watcher resource.

--resource-group -g

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az network network-watcher connection-monitor wait

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

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

Optional Parameters

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

The name of the connection monitor.

--created

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

Default value: False
--custom

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

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

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.

--interval

Polling interval in seconds.

Default value: 30
--network-watcher-name

The name of the Network Watcher resource.

--resource-group -g

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

--subscription

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

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.