az monitor log-profiles
Manage log profiles.
Commands
| az monitor log-profiles create |
Create a log profile. |
| az monitor log-profiles delete |
Deletes the log profile. |
| az monitor log-profiles list |
List the log profiles. |
| az monitor log-profiles show |
Gets the log profile. |
| az monitor log-profiles update |
Update a log profile. |
az monitor log-profiles create
Create a log profile.
az monitor log-profiles create --categories
--days
--enabled {false, true}
--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.
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
Whether the retention policy is enabled.
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.
The name of the log profile.
Optional Parameters
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.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az monitor log-profiles delete
Deletes the log profile.
az monitor log-profiles delete --name
Required Parameters
The name of the log profile.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az monitor log-profiles list
List the log profiles.
keyword callable clsA custom type or function that will be passed the direct response :return: An iterator like instance of either LogProfileCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2016_03_01.models.LogProfileCollection] :raises: ~azure.core.exceptions.HttpResponseError.
az monitor log-profiles list
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az monitor log-profiles show
Gets the log profile.
az monitor log-profiles show --name
Required Parameters
The name of the log profile.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az monitor log-profiles update
Update a log profile.
az monitor log-profiles update --name
[--add]
[--force-string]
[--remove]
[--set]
Examples
Update a log profile. (autogenerated)
az monitor log-profiles update --name MyLogProfile --set retentionPolicy.days=365
Required Parameters
The name of the log profile.
Optional Parameters
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>.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
Update an object by specifying a property path and value to set. Example: --set property1.property2=.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ