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
Name of the managed cluster.
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 of the alert configuration (must be unique within the cluster).
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.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
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.
Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
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
Name of the managed cluster.
Name of the alert configuration to delete.
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.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Default value: | False |
Do not prompt for confirmation.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
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
Name of the managed cluster.
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.
Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
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
Name of the managed cluster.
Name of the alert configuration to show.
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.
Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
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
Name of the managed cluster.
Name of the alert configuration to update.
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.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Resource ID of the Azure Monitor action group to send notifications to.
Pass an empty string to remove the current notification target.
Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
How AKS manages alerts for the cluster.
| Property | Value |
|---|---|
| Accepted values: | Disabled, Managed |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |