Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 45 additions & 15 deletions src/azure-cli/azure/cli/command_modules/monitor/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,17 @@

helps['monitor activity-log alert list'] = """
type: command
short-summary: List activity log alert rules under a resource group or the current subscription.
short-summary: List activity log alert rules within a resource group or across the current subscription.
parameters:
- name: --resource-group -g
short-summary: Name of the resource group under which the activity log alert rules are being listed. If it is omitted, all the activity log alert rules under the current subscription are listed.
short-summary: Specify the name of the resource group to list activity log alert rules. If omitted, lists all alert rules in the current subscription.
examples:
- name: List activity log alert rules in a specific resource group
text: |
az monitor activity-log alert list --resource-group myResourceGroup
- name: List all activity log alert rules in the current subscription
text: |
az monitor activity-log alert list
"""

helps['monitor activity-log list'] = """
Expand Down Expand Up @@ -85,33 +92,33 @@

helps['monitor autoscale create'] = """
type: command
short-summary: Create new autoscale settings.
short-summary: Create new autoscale settings for a target resource.
long-summary: >
For more information on autoscaling, visit: https://learn.microsoft.com/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings
For more information on autoscaling and its configuration, visit: https://learn.microsoft.com/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings
parameters:
- name: --action -a
short-summary: Add an action to fire when a scaling event occurs.
short-summary: Specify an action to trigger when a scaling event occurs.
long-summary: |
Usage: --action TYPE KEY [ARG ...]
Email: --action email bob@contoso.com ann@contoso.com
Webhook: --action webhook https://www.contoso.com/alert apiKey=value
Webhook: --action webhook https://www.contoso.com/alert?apiKey=value
Multiple actions can be specified by using more than one `--action` argument.
examples:
- name: Create autoscale settings to scale between 2 and 5 instances (3 as default). Email the administrator when scaling occurs.
- name: Create autoscale settings to scale between 2 and 5 instances with 3 as the default. Notify the administrator via email when scaling occurs.
text: |
az monitor autoscale create -g {myrg} --resource {resource-id} --min-count 2 --max-count 5 \\
az monitor autoscale create -g {myrg} --resource {resource-id} --min-count 2 --max-count 5 \
--count 3 --email-administrator

az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale out 1 \\
az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale out 1 \
--condition "Percentage CPU > 75 avg 5m"

az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale in 1 \\
az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale in 1 \
--condition "Percentage CPU < 25 avg 5m"
- name: Create autoscale settings for exactly 4 instances.
- name: Create autoscale settings to maintain a constant 4 instances.
text: >
az monitor autoscale create -g {myrg} --resource {resource-id} --count 4
- name: Create new autoscale settings. (autogenerated)
- name: Create new autoscale settings with specified scales. (autogenerated)
text: |
az monitor autoscale create --count 3 --max-count 5 --min-count 2 --name MyAutoscaleSettings --resource myScaleSet --resource-group MyResourceGroup --resource-type Microsoft.Compute/virtualMachineScaleSets
crafted: true
Expand Down Expand Up @@ -210,12 +217,35 @@

helps['monitor autoscale profile list-timezones'] = """
type: command
short-summary: Look up time zone information.
short-summary: List available time zones for autoscale profiles.
parameters:
- name: --offset
short-summary: Filter time zones by UTC hour offset.
- name: --search-query -q
short-summary: Search for time zones matching the query text.
examples:
- name: List all time zones.
text: az monitor autoscale profile list-timezones
- name: List time zones with UTC+3 offset.
text: az monitor autoscale profile list-timezones --offset 3
- name: Search for time zones containing 'Pacific'.
text: az monitor autoscale profile list-timezones --search-query "Pacific"
"""

helps['monitor autoscale profile show'] = """
type: command
short-summary: Show details of an autoscale profile.
short-summary: Display the details of a specified autoscale profile.
parameters:
- name: --autoscale-name
short-summary: Name of the autoscale settings.
- name: --resource-group -g
short-summary: Name of the resource group. Configure the default group using `az configure --defaults group=<name>`.
- name: --name -n
short-summary: Name of the autoscale profile.
examples:
- name: Show details of an autoscale profile
text: |
az monitor autoscale profile show --autoscale-name myAutoscaleSettings --resource-group myResourceGroup --name myProfileName
"""

helps['monitor autoscale rule'] = """
Expand Down Expand Up @@ -619,9 +649,9 @@

helps['monitor clone'] = """
type: command
short-summary: Clone metrics alert rules from one resource to another resource.
short-summary: Clone metric alert rules from one Azure resource to another.
examples:
- name: Clone the metric alert settings from one VM to another
- name: Clone metric alert settings between two VMs
text: |
az monitor clone --source-resource /subscriptions/{subscriptionID}/resourceGroups/Space1999/providers/Microsoft.Compute/virtualMachines/vm1 --target-resource /subscriptions/{subscriptionID}/resourceGroups/Space1999/providers/Microsoft.Compute/virtualMachines/vm2
"""
Loading