az aks alert-config

Note

This reference is part of the aks-preview extension for the Azure CLI (version 2.85.0 or higher). The extension will automatically install the first time you run an az aks alert-config command. Learn more about extensions.

Commands to manage AKS-managed alert configurations for a cluster.

Alert configurations let AKS create and manage alerts for important cluster events and conditions, delivering notifications through an Azure Monitor action group.

Commands

Name Description Type Status
az aks alert-config add

Add an alert configuration to a managed cluster.

Extension GA
az aks alert-config delete

Delete an alert configuration from a managed cluster.

Extension GA
az aks alert-config list

List the alert configurations of a managed cluster.

Extension GA
az aks alert-config show

Show the details of an alert configuration.

Extension GA
az aks alert-config update

Update an alert configuration in a managed cluster.

Extension GA

az aks alert-config add

Add an alert configuration to a managed cluster.

az aks alert-config add --cluster-name
                        --mode {Disabled, Managed}
                        --name
                        --resource-group
                        [--acquire-policy-token]
                        [--action-group-id]
                        [--aks-custom-headers]
                        [--change-reference]
                        [--no-wait]

Examples

Add a managed alert configuration that notifies an action group

az aks alert-config add -g MyResourceGroup --cluster-name MyCluster -n myalerts --mode Managed --action-group-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/myag

Add an alert configuration with alerting disabled

az aks alert-config add -g MyResourceGroup --cluster-name MyCluster -n myalerts --mode Disabled

Required Parameters

--cluster-name

Name of the managed cluster.

--mode

How AKS manages alerts for the cluster.

Use Managed to have AKS create, update and delete the alerts and send notifications to the configured action group. Use Disabled to turn alerting off.

Property Value
Accepted values: Disabled, Managed
--name -n

Name of the alert configuration (must be unique within the cluster).

--resource-group -g

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

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--action-group-id

Resource ID of the Azure Monitor action group to send notifications to.

Optional. When omitted, the alert configuration is created without a notification target and no notifications are delivered.

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

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

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

--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 aks alert-config delete

Delete an alert configuration from a managed cluster.

az aks alert-config delete --cluster-name
                           --name
                           --resource-group
                           [--acquire-policy-token]
                           [--aks-custom-headers]
                           [--change-reference]
                           [--no-wait]
                           [--yes]

Examples

Delete an alert configuration

az aks alert-config delete -g MyResourceGroup --cluster-name MyCluster -n myalerts

Required Parameters

--cluster-name

Name of the managed cluster.

--name -n

Name of the alert configuration to delete.

--resource-group -g

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

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

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

Property Value
Default value: False
--yes -y

Do not prompt for confirmation.

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

--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 aks alert-config list

List the alert configurations of a managed cluster.

az aks alert-config list --cluster-name
                         --resource-group
                         [--aks-custom-headers]

Examples

List all alert configurations in a cluster

az aks alert-config list -g MyResourceGroup --cluster-name MyCluster

Required Parameters

--cluster-name

Name of the managed cluster.

--resource-group -g

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

Optional Parameters

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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

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 aks alert-config show

Show the details of an alert configuration.

az aks alert-config show --cluster-name
                         --name
                         --resource-group
                         [--aks-custom-headers]

Examples

Show an alert configuration

az aks alert-config show -g MyResourceGroup --cluster-name MyCluster -n myalerts

Required Parameters

--cluster-name

Name of the managed cluster.

--name -n

Name of the alert configuration to show.

--resource-group -g

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

Optional Parameters

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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

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 aks alert-config update

Update an alert configuration in a managed cluster.

Only the properties you specify are changed; the rest are preserved.

az aks alert-config update --cluster-name
                           --name
                           --resource-group
                           [--acquire-policy-token]
                           [--action-group-id]
                           [--aks-custom-headers]
                           [--change-reference]
                           [--mode {Disabled, Managed}]
                           [--no-wait]

Examples

Turn off alerting without changing the notification target

az aks alert-config update -g MyResourceGroup --cluster-name MyCluster -n myalerts --mode Disabled

Point an existing alert configuration at a different action group

az aks alert-config update -g MyResourceGroup --cluster-name MyCluster -n myalerts --action-group-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/otherag

Clear the notification target

az aks alert-config update -g MyResourceGroup --cluster-name MyCluster -n myalerts --action-group-id ""

Required Parameters

--cluster-name

Name of the managed cluster.

--name -n

Name of the alert configuration to update.

--resource-group -g

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

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--action-group-id

Resource ID of the Azure Monitor action group to send notifications to.

Pass an empty string to remove the current notification target.

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--mode

How AKS manages alerts for the cluster.

Property Value
Accepted values: Disabled, Managed
--no-wait

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

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

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