az network watcher connection-monitor test-configuration

Manage test configuration of a connection monitor.

Commands

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-configuration add

Add a test configuration to a connection monitor.

az network watcher connection-monitor test-configuration add --connection-monitor
                                                             --location
                                                             --name
                                                             --protocol {Http, Icmp, Tcp}
                                                             --test-groups
                                                             [--frequency]
                                                             [--http-method {Get, Post}]
                                                             [--http-path]
                                                             [--http-port]
                                                             [--http-prefer-https {false, true}]
                                                             [--http-request-header]
                                                             [--http-valid-status-codes]
                                                             [--icmp-disable-trace-route {false, true}]
                                                             [--preferred-ip-version {IPv4, IPv6}]
                                                             [--subscription]
                                                             [--tcp-disable-trace-route {false, true}]
                                                             [--tcp-port]
                                                             [--tcp-port-behavior {ListenIfAvailable, None}]
                                                             [--threshold-failed-percent]
                                                             [--threshold-round-trip-time]

Examples

Add a test configuration with HTTP supported

az network watcher connection-monitor test-configuration add --connection-monitor MyConnectionMonitor --location westus --name MyHTTPTestConfiguration --test-groups DefaultTestGroup --protocol Http --http-request-header name=Host value=bing.com --http-request-header name=UserAgent value=Edge

Add a test configuration with TCP supported

az network watcher connection-monitor test-configuration add --connection-monitor MyConnectionMonitor --location westus --name MyHTTPTestConfiguration --test-groups TCPTestGroup DefaultTestGroup --protocol Tcp --tcp-port 4096

Required Parameters

--connection-monitor

Connection monitor name.

--location -l

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

--name -n

The name of the connection monitor test configuration.

--protocol

The protocol to use in test evaluation.

accepted values: Http, Icmp, Tcp
--test-groups

Space-separated list of names of test group which only need to be affected if specified.

Optional Parameters

--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-prefer-https

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

accepted values: false, true
--http-request-header

The HTTP headers to transmit with the request. List of property=value pairs to define HTTP headers.

--http-valid-status-codes

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

--icmp-disable-trace-route

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

accepted values: false, true
--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
--subscription

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

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

az network watcher connection-monitor test-configuration list

List all test configurations of a connection monitor.

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

Required Parameters

--connection-monitor

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

--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 test-configuration remove

Remove a test configuration from a connection monitor.

az network watcher connection-monitor test-configuration remove --connection-monitor
                                                                --location
                                                                --name
                                                                [--subscription]
                                                                [--test-groups]

Examples

Remove a test configuration from all test groups of a connection monitor

az network watcher connection-monitor test-configuration remove --connection-monitor MyConnectionMonitor --location westus --name MyTCPTestConfiguration

Remove a test configuration from two test groups of a connection monitor

az network watcher connection-monitor test-configuration remove --connection-monitor MyConnectionMonitor --location westus --name MyHTTPTestConfiguration --test-groups HTTPTestGroup DefaultTestGroup

Required Parameters

--connection-monitor

Connection monitor name.

--location -l

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

--name -n

The name of the connection monitor test configuration.

Optional Parameters

--subscription

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

--test-groups

Space-separated list of names of test group which only need to be affected if specified.

az network watcher connection-monitor test-configuration show

Show a test configuration from a connection monitor.

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

Required Parameters

--connection-monitor

Connection monitor name.

--location -l

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

--name -n

The name of the connection monitor test configuration.

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.