az monitor log-profiles
Manage log profiles.
Commands
Name | Description | Type | Status |
---|---|---|---|
az monitor log-profiles create |
Create a log profile in Azure Monitoring REST API. |
Core | GA |
az monitor log-profiles delete |
Delete the log profile. |
Core | GA |
az monitor log-profiles list |
List the log profiles. |
Core | GA |
az monitor log-profiles show |
Get the log profile. |
Core | GA |
az monitor log-profiles update |
Update a log profile in Azure Monitoring REST API. |
Core | GA |
az monitor log-profiles create
Create a log profile in Azure Monitoring REST API.
az monitor log-profiles create --categories
--days
--enabled {0, 1, f, false, n, no, t, true, y, yes}
--location
--locations
--name
[--service-bus-rule-id]
[--storage-account-id]
[--tags]
Examples
Create a log profile. (autogenerated)
az monitor log-profiles create --categories "Delete" --days 0 --enabled true --location westus2 --locations westus --name MyLogProfile --service-bus-rule-id "/subscriptions/{YOUR SUBSCRIPTION ID}/resourceGroups/{RESOURCE GROUP NAME}/providers/Microsoft.EventHub/namespaces/{EVENT HUB NAME SPACE}/authorizationrules/RootManageSharedAccessKey"
Required Parameters
Space-separated categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.' Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
Property | Value |
---|---|
Parameter group: | Retention Policy Arguments |
Whether the retention policy is enabled. Allowed values: false, true.
Property | Value |
---|---|
Parameter group: | Retention Policy Arguments |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Space-separated list of regions for which Activity Log events should be stored. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The name of the log profile.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
The resource id of the storage account to which you would like to send the Activity Log.
Space-separated tags: key[=value] [key[=value] ...]. Use '' to clear existing tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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 monitor log-profiles delete
Delete the log profile.
az monitor log-profiles delete [--ids]
[--name]
[--subscription]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the log profile.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az monitor log-profiles list
List the log profiles.
az monitor log-profiles list
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 monitor log-profiles show
Get the log profile.
az monitor log-profiles show [--ids]
[--name]
[--subscription]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the log profile.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az monitor log-profiles update
Update a log profile in Azure Monitoring REST API.
az monitor log-profiles update [--add]
[--categories]
[--days]
[--enabled {0, 1, f, false, n, no, t, true, y, yes}]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--locations]
[--name]
[--remove]
[--service-bus-rule-id]
[--set]
[--storage-account-id]
[--subscription]
[--tags]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Space-separated categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.' Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
Property | Value |
---|---|
Parameter group: | Retention Policy Arguments |
Whether the retention policy is enabled. Allowed values: false, true.
Property | Value |
---|---|
Parameter group: | Retention Policy Arguments |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Space-separated list of regions for which Activity Log events should be stored. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The name of the log profile.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
The resource id of the storage account to which you would like to send the Activity Log.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Space-separated tags: key[=value] [key[=value] ...]. Use '' to clear existing tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |