Skip to content

Commit 2fc1680

Browse files
Split Az.AlertsManagement Examples (#16922)
1 parent 6f41954 commit 2fc1680

11 files changed

+16
-16
lines changed

src/AlertsManagement/AlertsManagement/help/Get-AzActionRule.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ Get-AzActionRule [-Name <String>] [-ResourceGroupName <String>] [-TargetResource
4646

4747
### Example 1
4848
```powershell
49-
PS C:\> Get-AzActionRule -ResourceGroupName "test-rg" -Severity "Sev2" -MonitorService "Platform"
49+
Get-AzActionRule -ResourceGroupName "test-rg" -Severity "Sev2" -MonitorService "Platform"
5050
```
5151

5252
List all action rules configured in resource group test-rg filtered on Sev2 severity and Platform Monitor Service. Use Format-List to get the details of each action rule in list.
5353

5454
### Example 2
5555
```powershell
56-
PS C:\> Get-AzActionRule -ResourceGroupName "test-rg" -Name "Test-Action-Rule" | Format-List
56+
Get-AzActionRule -ResourceGroupName "test-rg" -Name "Test-Action-Rule" | Format-List
5757
```
5858

5959
Get the action rule with name Test-Action-Rule in test-rg resource group.

src/AlertsManagement/AlertsManagement/help/Get-AzAlert.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ Get-AzAlert [-TargetResourceId <String>] [-MonitorService <String>] [-MonitorCon
4242

4343
### Example 1
4444
```powershell
45-
PS C:\> Get-AzAlert -Severity "Sev2" -MonitorCondition "Fired" -IncludeContext $true
45+
Get-AzAlert -Severity "Sev2" -MonitorCondition "Fired" -IncludeContext $true
4646
```
4747

4848
List all alerts with Sev2 severity and Fired monitor condition. Setting IncludeContext to true, include custom payload of alert.
4949
Use Format-List to get the complete details of each alert in list.
5050

5151
### Example 2
5252
```powershell
53-
PS C:\> Get-AzAlert -AlertId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529" | Format-List
53+
Get-AzAlert -AlertId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529" | Format-List
5454
```
5555

5656
Get Alert details by Id (GUID) or Resource Id (Complete ARM Id)

src/AlertsManagement/AlertsManagement/help/Get-AzAlertObjectHistory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Get-AzAlertObjectHistory -InputObject <PSSmartGroup> [-DefaultProfile <IAzureCon
3030

3131
### Example 1
3232
```powershell
33-
PS C:\> Get-AzAlertObjectHistory -AlertId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529"
33+
Get-AzAlertObjectHistory -AlertId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529"
3434
```
3535

3636
Gets alert history details.

src/AlertsManagement/AlertsManagement/help/Get-AzSmartGroup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Get-AzSmartGroup -SmartGroupId <String> [-DefaultProfile <IAzureContextContainer
3030

3131
### Example 1
3232
```powershell
33-
PS C:\> Get-AzSmartGroup -TimeRange "1h"
33+
Get-AzSmartGroup -TimeRange "1h"
3434
```
3535

3636
List all smart groups formed in last 1 hour. Use Format-List to get the complete details of each smart group in list.
3737

3838
### Example 2
3939
```powershell
40-
PS C:\> Get-AzSmartGroup -SmartGroupId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529" | Format-List
40+
Get-AzSmartGroup -SmartGroupId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529" | Format-List
4141
```
4242

4343
Get Smart Group details by Id (GUID) or Resource Id (Complete ARM Id)

src/AlertsManagement/AlertsManagement/help/Get-AzSmartGroupHistory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Get-AzSmartGroupHistory -InputObject <PSSmartGroup> [-DefaultProfile <IAzureCont
3030

3131
### Example 1
3232
```powershell
33-
PS C:\> Get-AzSmartGroupHistory -AlertId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529"
33+
Get-AzSmartGroupHistory -AlertId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529"
3434
```
3535

3636
Gets smart group history details.

src/AlertsManagement/AlertsManagement/help/Measure-AzAlertStatistic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Measure-AzAlertStatistic -GroupBy <String> [-TargetResourceType <String>] [-Targ
3535

3636
### Example 1
3737
```powershell
38-
PS C:\> Measure-AzAlertStatistic -GroupBy "severity,alertstate" -State "Active"
38+
Measure-AzAlertStatistic -GroupBy "severity,alertstate" -State "Active"
3939
```
4040

4141
Summarize alerts count grouped by severity and state filtered by Active state.

src/AlertsManagement/AlertsManagement/help/Remove-AzActionRule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Remove-AzActionRule -InputObject <PSActionRule> [-DefaultProfile <IAzureContextC
3737

3838
### Example 1
3939
```powershell
40-
PS C:\> Remove-AzActionRule -ResourceGroupName "test-rg" -Name "ActionRuleName"
40+
Remove-AzActionRule -ResourceGroupName "test-rg" -Name "ActionRuleName"
4141
```
4242

4343
This cmdlet deletes the action rule with name ActionRuleName in resource group test-rg

src/AlertsManagement/AlertsManagement/help/Set-AzActionRule.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@ Set-AzActionRule -ResourceGroupName <String> -Name <String> [-Description <Strin
5555

5656
### Example 1
5757
```powershell
58-
PS C:\> Set-AzActionRule -ResourceGroupName "test-rg" -Name "Test-AR" -Scope "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72" -SeverityCondition "Equals:Sev0,Sev1" -MonitorCondition "NotEquals:Resolved" -Description "Test description" -Status "Enabled" -ActionRuleType "Suppression" -ReccurenceType "Weekly" -SuppressionStartTime "06/26/2018 06:00:00" -SuppressionEndTime "07/27/2018 06:00:00" -ReccurentValue 1,4,6
58+
Set-AzActionRule -ResourceGroupName "test-rg" -Name "Test-AR" -Scope "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72" -SeverityCondition "Equals:Sev0,Sev1" -MonitorCondition "NotEquals:Resolved" -Description "Test description" -Status "Enabled" -ActionRuleType "Suppression" -ReccurenceType "Weekly" -SuppressionStartTime "06/26/2018 06:00:00" -SuppressionEndTime "07/27/2018 06:00:00" -ReccurentValue 1,4,6
5959
```
6060

6161
This cmdlet creates an action rule for supression, with a subscription scope.
6262

6363
### Example 2
6464
```powershell
65-
PS C:\> Set-AzActionRule -ResourceGroupName "test-rg" -Name "Test-AR" -Scope "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourceGroups/alertslab","/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourceGroups/Test-VMs" -SeverityCondition "Equals:Sev0,Sev1" -MonitorCondition "NotEquals:Resolved" -Description "Test description" -Status "Enabled" -ActionRuleType "ActionGroup" -ActionGroupId "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.insights/actiongroups/testAG"
65+
Set-AzActionRule -ResourceGroupName "test-rg" -Name "Test-AR" -Scope "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourceGroups/alertslab","/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourceGroups/Test-VMs" -SeverityCondition "Equals:Sev0,Sev1" -MonitorCondition "NotEquals:Resolved" -Description "Test description" -Status "Enabled" -ActionRuleType "ActionGroup" -ActionGroupId "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.insights/actiongroups/testAG"
6666
```
6767

6868
This cmdlet creates an action rule for action group, with a list of resource groups scope.
6969

7070
### Example 3
7171
```powershell
72-
PS C:\> Set-AzActionRule -ResourceGroupName "test-rg" -Name "Test-AR" -Scope "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourceGroups/alertslab/providers/microsoft.insights/metricAlerts/Total Requests Exceeded" -SeverityCondition "Equals:Sev0,Sev1" -MonitorCondition "NotEquals:Resolved" -Description "Test description" -Status "Enabled" -ActionRuleType "Diagnostics"
72+
Set-AzActionRule -ResourceGroupName "test-rg" -Name "Test-AR" -Scope "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourceGroups/alertslab/providers/microsoft.insights/metricAlerts/Total Requests Exceeded" -SeverityCondition "Equals:Sev0,Sev1" -MonitorCondition "NotEquals:Resolved" -Description "Test description" -Status "Enabled" -ActionRuleType "Diagnostics"
7373
```
7474

7575
This cmdlet creates an action rule for diagnostics settings, with a resource scope.

src/AlertsManagement/AlertsManagement/help/Update-AzActionRule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Update-AzActionRule -InputObject <PSActionRule> [-Status <String>] [-Tag <Hashta
3737

3838
### Example 1
3939
```powershell
40-
PS C:\> Update-AzActionRule -ResourceGroupName "test-rg" -Name "Test-ActionRule" -Status "Disabled"
40+
Update-AzActionRule -ResourceGroupName "test-rg" -Name "Test-ActionRule" -Status "Disabled"
4141
```
4242

4343
This cmdlet disables the action rule.

src/AlertsManagement/AlertsManagement/help/Update-AzAlertState.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Update-AzAlertState -State <String> -InputObject <PSAlert> [-DefaultProfile <IAz
3131

3232
### Example 1
3333
```powershell
34-
PS C:\> Update-AzAlertState -AlertId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529" -State "Closed"
34+
Update-AzAlertState -AlertId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529" -State "Closed"
3535
```
3636

3737
This cmdlet updates the alert state to Closed.

src/AlertsManagement/AlertsManagement/help/Update-AzSmartGroupState.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Update-AzSmartGroupState -State <String> -InputObject <PSSmartGroup> [-DefaultPr
3131

3232
### Example 1
3333
```powershell
34-
PS C:\> Update-AzSmartGroupState -SmartGroupId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529" -State "Acknowledged"
34+
Update-AzSmartGroupState -SmartGroupId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529" -State "Acknowledged"
3535
```
3636

3737
This cmdlet updates the smart group state to Acknowleged.

0 commit comments

Comments
 (0)