שתף באמצעות


az datadog monitor

Note

This reference is part of the datadog extension for the Azure CLI (version 2.17.0 or higher). The extension will automatically install the first time you run an az datadog monitor command. Learn more about extensions.

Manage monitor with datadog.

Commands

Name Description Type Status
az datadog monitor create

Create a monitor resource.

Extension GA
az datadog monitor delete

Delete a monitor resource.

Extension GA
az datadog monitor get-default-key

Get the default api key.

Extension GA
az datadog monitor list

List all monitors under the specified resource group. And List all monitors under the specified subscription.

Extension GA
az datadog monitor list-api-key

List the api keys for a given monitor resource.

Extension GA
az datadog monitor list-host

List the hosts for a given monitor resource.

Extension GA
az datadog monitor list-linked-resource

List all Azure resources associated to the same Datadog organization as the target resource.

Extension GA
az datadog monitor list-monitored-resource

List the resources currently being monitored by the Datadog monitor resource.

Extension GA
az datadog monitor refresh-set-password-link

Refresh the set password link and return a latest one.

Extension GA
az datadog monitor set-default-key

Set the default api key.

Extension GA
az datadog monitor show

Get the properties of a specific monitor resource.

Extension GA
az datadog monitor update

Update a monitor resource.

Extension GA
az datadog monitor wait

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

Extension GA

az datadog monitor create

Create a monitor resource.

az datadog monitor create --monitor-name
                          --resource-group
                          [--datadog-organization-properties]
                          [--location]
                          [--no-wait]
                          [--sku-name]
                          [--tags]
                          [--type {SystemAssigned, UserAssigned}]
                          [--user-info]

Examples

Monitors_Create

az datadog monitor create --name "myMonitor" --resource-group "myResourceGroup" --location "West US 2" --tags Environment="Dev" --user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" --type "SystemAssigned" --sku-name "payg_v2_Monthly"

Monitors creation with linking to Datadogo organization.

az datadog monitor create --name "myMonitor" --resource-group "myResourceGroup" --location "West US 2" --datadog-organization-properties api-key=XX application-key=XX --tags Environment="Dev" --user-info name="Alice" email-address="alice@microsoft.com" phone-number="123-456-7890" --type "SystemAssigned" --sku-name "Linked"

Required Parameters

--monitor-name --name -n

Monitor resource name.

--resource-group -g

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

Optional Parameters

--datadog-organization-properties

Datadog organization properties.

Usage: --datadog-organization-properties linking-auth-code=XX linking-client-id=XX redirect-uri=XX api-key=XX application-key=XX enterprise-app-id=XX

linking-auth-code: The auth code used to linking to an existing datadog organization. linking-client-id: The client_id from an existing in exchange for an auth token to link organization. redirect-uri: The redirect uri for linking. api-key: Api key associated to the Datadog organization. application-key: Application key associated to the Datadog organization. enterprise-app-id: The Id of the Enterprise App used for Single sign on.

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

Default value: False
--sku-name

Name of the SKU.

--tags

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

--type

Identity type.

Accepted values: SystemAssigned, UserAssigned
--user-info

User info.

Usage: --user-info name=XX email-address=XX phone-number=XX

name: Name of the user email-address: Email of the user used by Datadog for contacting them if needed phone-number: Phone number of the user used by Datadog for contacting them if needed.

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 datadog monitor delete

Delete a monitor resource.

az datadog monitor delete [--ids]
                          [--monitor-name]
                          [--no-wait]
                          [--resource-group]
                          [--subscription]
                          [--yes]

Examples

Monitors_Delete

az datadog monitor delete --name "myMonitor" --resource-group "myResourceGroup"

Optional Parameters

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

--monitor-name --name -n

Monitor resource name.

--no-wait

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

Default value: False
--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 datadog monitor get-default-key

Get the default api key.

az datadog monitor get-default-key [--ids]
                                   [--monitor-name]
                                   [--resource-group]
                                   [--subscription]

Examples

Monitors_GetDefaultKey

az datadog monitor get-default-key --name "myMonitor" --resource-group "myResourceGroup"

Optional Parameters

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

--monitor-name --name -n

Monitor resource name.

--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 datadog monitor list

List all monitors under the specified resource group. And List all monitors under the specified subscription.

az datadog monitor list [--resource-group]

Examples

Monitors_ListByResourceGroup

az datadog monitor list --resource-group "myResourceGroup"

Monitors_List

az datadog monitor list

Optional Parameters

--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 datadog monitor list-api-key

List the api keys for a given monitor resource.

az datadog monitor list-api-key --monitor-name
                                --resource-group

Examples

Monitors_ListApiKeys

az datadog monitor list-api-key --name "myMonitor" --resource-group "myResourceGroup"

Required Parameters

--monitor-name --name -n

Monitor resource name.

--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 datadog monitor list-host

List the hosts for a given monitor resource.

az datadog monitor list-host --monitor-name
                             --resource-group

Examples

Monitors_ListHosts

az datadog monitor list-host --name "myMonitor" --resource-group "myResourceGroup"

Required Parameters

--monitor-name --name -n

Monitor resource name.

--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 datadog monitor list-linked-resource

List all Azure resources associated to the same Datadog organization as the target resource.

az datadog monitor list-linked-resource --monitor-name
                                        --resource-group

Examples

Monitors_ListLinkedResources

az datadog monitor list-linked-resource --name "myMonitor" --resource-group "myResourceGroup"

Required Parameters

--monitor-name --name -n

Monitor resource name.

--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 datadog monitor list-monitored-resource

List the resources currently being monitored by the Datadog monitor resource.

az datadog monitor list-monitored-resource --monitor-name
                                           --resource-group

Examples

Monitors_ListMonitoredResources

az datadog monitor list-monitored-resource --name "myMonitor" --resource-group "myResourceGroup"

Required Parameters

--monitor-name --name -n

Monitor resource name.

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

Refresh the set password link and return a latest one.

az datadog monitor refresh-set-password-link [--ids]
                                             [--monitor-name]
                                             [--resource-group]
                                             [--subscription]

Monitors_RefreshSetPasswordLink

az datadog monitor refresh-set-password-link --name "myMonitor" --resource-group "myResourceGroup"
--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.

--monitor-name --name -n

Monitor resource name.

--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 datadog monitor set-default-key

Set the default api key.

az datadog monitor set-default-key [--created]
                                   [--created-by]
                                   [--ids]
                                   [--key]
                                   [--monitor-name]
                                   [--name]
                                   [--resource-group]
                                   [--subscription]

Examples

Monitors_SetDefaultKey

az datadog monitor set-default-key --monitor-name "myMonitor" --key "1111111111111111aaaaaaaaaaaaaaaa" --resource-group "myResourceGroup"

Optional Parameters

--created

The time of creation of the API key.

--created-by

The user that created the API key.

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

--key

The value of the API key.

--monitor-name

Monitor resource name.

--name

The name of the API key.

--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 datadog monitor show

Get the properties of a specific monitor resource.

az datadog monitor show [--ids]
                        [--monitor-name]
                        [--resource-group]
                        [--subscription]

Examples

Monitors_Get

az datadog monitor show --name "myMonitor" --resource-group "myResourceGroup"

Optional Parameters

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

--monitor-name --name -n

Monitor resource name.

--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 datadog monitor update

Update a monitor resource.

az datadog monitor update [--ids]
                          [--monitor-name]
                          [--monitoring-status]
                          [--no-wait]
                          [--resource-group]
                          [--sku-name]
                          [--subscription]
                          [--tags]

Examples

Monitors_Update

az datadog monitor update --name "myMonitor" --tags Environment="Dev" --monitoring-status "Disabled" --resource-group "myResourceGroup"

Optional Parameters

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

--monitor-name --name -n

Monitor resource name.

--monitoring-status

Flag specifying if the resource monitoring is enabled or disabled. Allowed values: "Enabled", "Disabled".

--no-wait

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

Default value: False
--resource-group -g

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

--sku-name

Name of the SKU.

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

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 datadog monitor wait

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

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

Examples

Pause executing next line of CLI script until the datadog monitor is successfully created.

az datadog monitor wait --name "myMonitor" --resource-group "myResourceGroup" --created

Pause executing next line of CLI script until the datadog monitor is successfully updated.

az datadog monitor wait --name "myMonitor" --resource-group "myResourceGroup" --updated

Pause executing next line of CLI script until the datadog monitor is successfully deleted.

az datadog monitor wait --name "myMonitor" --resource-group "myResourceGroup" --deleted

Optional Parameters

--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
--monitor-name --name -n

Monitor resource name.

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