Monitoring diagnostics settings - az monitor diagnostic-settings

Commands to manage service diagnostic settings.

Commands

az monitor diagnostic-settings create Creates diagnostic settings for the specified resource.
az monitor diagnostic-settings show Gets the active diagnostic settings for the specified resource.
az monitor diagnostic-settings update Update diagnostic settings for the specified resource.

az monitor diagnostic-settings create

Creates diagnostic settings for the specified resource.

az monitor diagnostic-settings create --resource-id
[--logs]
[--metrics]
[--namespace]
[--resource-group]
[--rule-name]
[--storage-account]
[--tags]
[--workspace]

Required Parameters

--resource-id

The identifier of the resource.

Optional Parameters

--logs

JSON encoded list of logs settings. Use @{file} to load from a file.

--metrics

JSON encoded list of metric settings. Use @{file} to load from a file.

--namespace

Name or ID of the Service Bus namespace.

--resource-group -g

Name of the resource group.

--rule-name

Name of the Service Bus authorization rule.

--storage-account

Name or ID of the storage account to which you would like to send Diagnostic Logs.

--tags

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

--workspace

Name or ID of the Log Analytics workspace to which you would like to send Diagnostic Logs.

az monitor diagnostic-settings show

WARNING: This method will be deprecated in future releases.

az monitor diagnostic-settings show --resource-id

Required Parameters

--resource-id

The identifier of the resource.

az monitor diagnostic-settings update

Update diagnostic settings for the specified resource.

az monitor diagnostic-settings update --resource-id
[--add]
[--remove]
[--set]

Required Parameters

--resource-id

The identifier of the resource.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.