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 list List connection monitors for the given region.
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 create

Create a connection monitor.

az network watcher connection-monitor create --name
--source-resource
[--dest-address]
[--dest-port]
[--dest-resource]
[--do-not-start]
[--monitoring-interval]
[--resource-group]
[--source-port]
[--subscription]
[--tags]

Examples

Create a connection monitor for a virtual machine.

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

Required Parameters

--name -n

Connection monitor name.

--source-resource

Currently only Virtual Machines are supported.

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.

--monitoring-interval

Monitoring interval in seconds.

default value: 60
--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.

--subscription

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

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

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
[--subscription]

Examples

List a connection monitor for the given region.

az network watcher connection-monitor list -l westus

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

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

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