CmdID / az / az monitor / az monitor diagnostic-settings
az monitor diagnostic-settings create
Create diagnostic settings for the specified resource. Azure CLI reference
11 options Its page in the Azure CLI reference
Options
--event-hub-ruleName or ID of the event hub authorization rule.--event-hubName or ID an event hub.--log-analytics-destination-typeA string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: <normalized service identity>_<normalized category name>.--logsJSON encoded list of logs settings.--marketplace-partner-idThe full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.--metricsThe list of metric settings.--name, -nThe name of the diagnostic setting.--resourceName or ID of the target resource.--service-bus-rule-idThe service bus rule Id of the diagnostic setting.--storage-accountName or ID of the storage account to send diagnostic logs to.--workspaceName or ID of the Log Analytics workspace to send diagnostic logs to.