az monitor diagnostic-settings

Manage service diagnostic settings.

Commands

az monitor diagnostic-settings create Create 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.

az monitor diagnostic-settings create

Create 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 send diagnostic logs to.
--tags
Space separated tags in 'key[=value]' format. Use '' to clear existing tags.
--workspace
Name or ID of the Log Analytics workspace to send diagnostic logs to.

az monitor diagnostic-settings show

Gets the active diagnostic settings for the specified resource.

az monitor diagnostic-settings show --resource-id

Required Parameters

--resource-id
The identifier of the resource.

az monitor diagnostic-settings update

Update diagnostic settings.

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