Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid escape in monitor examples #535

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Create an action group test-notifications.

- Create an action group test-notifications with action group
```bash
monitor action-group test-notifications create --action-group MyActionGroup \ --resource-group MyResourceGroup -a email alice [email protected] usecommonalertsChema --alert-type budget
monitor action-group test-notifications create --action-group MyActionGroup --resource-group MyResourceGroup -a email alice [email protected] usecommonalertsChema --alert-type budget
```
4 changes: 2 additions & 2 deletions Commands/monitor/activity-log/alert/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ This command will create a default activity log with one condition which compare

- Create an alert rule with condition about error level service health log.
```bash
monitor activity-log alert create -n AlertName -g ResourceGroup \ --condition category=ServiceHealth and level=Error
monitor activity-log alert create -n AlertName -g ResourceGroup --condition category=ServiceHealth and level=Error
```

- Create an alert rule with an action group and specify webhook properties.
```bash
monitor activity-log alert create -n AlertName -g ResourceGroup \ -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/acti onGroups/{ActionGroup} \ -w usage=test owner=jane
monitor activity-log alert create -n AlertName -g ResourceGroup -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} -w usage=test owner=jane
```

- Create an alert rule which is initially disabled.
Expand Down
2 changes: 1 addition & 1 deletion Commands/monitor/activity-log/alert/_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Update a new activity log alert or update an existing one.

- Update the condition
```bash
monitor activity-log alert update -n AlertName -g ResourceGroup \ --condition category=ServiceHealth and level=Error
monitor activity-log alert update -n AlertName -g ResourceGroup --condition category=ServiceHealth and level=Error
```

- Disable an alert rule.
Expand Down
6 changes: 3 additions & 3 deletions Commands/monitor/autoscale/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ For more information on autoscaling, visit: https://docs.microsoft.com/azure/mon

- Create autoscale settings to scale between 2 and 5 instances (3 as default). Email the administrator when scaling occurs.
```bash
monitor autoscale create -g myrg --resource resource-id --min-count 2 --max-count 5 \ --count 3 --email-administrator
monitor autoscale rule create -g myrg --autoscale-name resource-name --scale out 1 \ --condition "Percentage CPU > 75 avg 5m"
monitor autoscale rule create -g myrg --autoscale-name resource-name --scale in 1 \ --condition "Percentage CPU < 25 avg 5m"
monitor autoscale create -g myrg --resource resource-id --min-count 2 --max-count 5 --count 3 --email-administrator
monitor autoscale rule create -g myrg --autoscale-name resource-name --scale out 1 --condition "Percentage CPU > 75 avg 5m"
monitor autoscale rule create -g myrg --autoscale-name resource-name --scale in 1 --condition "Percentage CPU < 25 avg 5m"
```

- Create autoscale settings for exactly 4 instances.
Expand Down
2 changes: 1 addition & 1 deletion Commands/monitor/autoscale/_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For more information on autoscaling, visit: https://docs.microsoft.com/azure/mon

- Update autoscale settings to remove an email notification.
```bash
monitor autoscale update -g myrg -n autoscale-name \ --remove-action email [email protected]
monitor autoscale update -g myrg -n autoscale-name --remove-action email [email protected]
```

- Update autoscale settings.
Expand Down
16 changes: 8 additions & 8 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -56738,7 +56738,7 @@
"examples": [
{
"commands": [
"monitor action-group test-notifications create --action-group MyActionGroup \\ --resource-group MyResourceGroup -a email alice [email protected] usecommonalertsChema --alert-type budget"
"monitor action-group test-notifications create --action-group MyActionGroup --resource-group MyResourceGroup -a email alice [email protected] usecommonalertsChema --alert-type budget"
],
"name": "Create an action group test-notifications with action group"
}
Expand Down Expand Up @@ -57003,13 +57003,13 @@
},
{
"commands": [
"monitor activity-log alert create -n AlertName -g ResourceGroup \\ --condition category=ServiceHealth and level=Error"
"monitor activity-log alert create -n AlertName -g ResourceGroup --condition category=ServiceHealth and level=Error"
],
"name": "Create an alert rule with condition about error level service health log."
},
{
"commands": [
"monitor activity-log alert create -n AlertName -g ResourceGroup \\ -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/acti onGroups/{ActionGroup} \\ -w usage=test owner=jane"
"monitor activity-log alert create -n AlertName -g ResourceGroup -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} -w usage=test owner=jane"
],
"name": "Create an alert rule with an action group and specify webhook properties."
},
Expand Down Expand Up @@ -57191,7 +57191,7 @@
"examples": [
{
"commands": [
"monitor activity-log alert update -n AlertName -g ResourceGroup \\ --condition category=ServiceHealth and level=Error"
"monitor activity-log alert update -n AlertName -g ResourceGroup --condition category=ServiceHealth and level=Error"
],
"name": "Update the condition"
},
Expand Down Expand Up @@ -58626,9 +58626,9 @@
"examples": [
{
"commands": [
"monitor autoscale create -g myrg --resource resource-id --min-count 2 --max-count 5 \\ --count 3 --email-administrator",
"monitor autoscale rule create -g myrg --autoscale-name resource-name --scale out 1 \\ --condition \"Percentage CPU > 75 avg 5m\"",
"monitor autoscale rule create -g myrg --autoscale-name resource-name --scale in 1 \\ --condition \"Percentage CPU < 25 avg 5m\""
"monitor autoscale create -g myrg --resource resource-id --min-count 2 --max-count 5 --count 3 --email-administrator",
"monitor autoscale rule create -g myrg --autoscale-name resource-name --scale out 1 --condition \"Percentage CPU > 75 avg 5m\"",
"monitor autoscale rule create -g myrg --autoscale-name resource-name --scale in 1 --condition \"Percentage CPU < 25 avg 5m\""
],
"name": "Create autoscale settings to scale between 2 and 5 instances (3 as default). Email the administrator when scaling occurs."
},
Expand Down Expand Up @@ -58775,7 +58775,7 @@
},
{
"commands": [
"monitor autoscale update -g myrg -n autoscale-name \\ --remove-action email [email protected]"
"monitor autoscale update -g myrg -n autoscale-name --remove-action email [email protected]"
],
"name": "Update autoscale settings to remove an email notification."
},
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
<arg type="string" var="$Path.actionGroupName" options="action-group-name action-group" required="True" group="" idPart="name">
<help short="The name of the action group."/>
</arg>
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" group="" idPart="resource_group">
<help short="Name of resource group. You can configure the default group using `az configure --defaults group=<name>`."/>
</arg>
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
<arg type="string" var="$notificationRequest.alertType" options="alert-type" required="True" group="">
<help short="The value of the supported alert type. Supported alert type values are: servicehealth, metricstaticthreshold, metricsdynamicthreshold, logalertv2, smartalert, webtestalert, logalertv1numresult, logalertv1metricmeasurement, resourcehealth, activitylog, budget"/>
Expand Down
Loading