< Back
Add-AzureRmWebtestAlertRule
Post
NAME Add-AzureRmWebtestAlertRule
SYNOPSIS
Adds or updates a webtest alert rule.
SYNTAX
Add-AzureRmWebtestAlertRule [-Action <System.Collections.Generic.List`1[Microsoft.Azure.Management.Monitor.Management.Models.RuleAction]>]
[-DefaultProfile <IAzureContextContainer>] [-Description <String>] [-DisableRule] -FailedLocationCount <Int32> -Location <String> -MetricName
<String> [-MetricNamespace <String>] -Name <String> -ResourceGroupName <String> -TargetResourceUri <String> -WindowSize <TimeSpan>
[<CommonParameters>]
DESCRIPTION
The Add-AzureRmWebtestAlertRule cmdlet adds or updates an alert rule of either metric, event, or webtest type. The added rule is associated to a
resource group and has a name. This cmdlet implements the ShouldProcess pattern, i.e. it might request confirmation from the user before actually
creating, modifying, or removing the resource.
PARAMETERS
-Action <System.Collections.Generic.List`1[Microsoft.Azure.Management.Monitor.Management.Models.RuleAction]>
Specifies a comma-separated list of actions.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Description <String>
Specifies a description of the rule.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DisableRule [<SwitchParameter>]
Disables the rule. If you do not specify this parameter, the rule is enabled.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-FailedLocationCount <Int32>
Specifies the failed location count for the webtest rules. This is similar to the threshold in the other types of rules.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Location <String>
Specifies the location where the rule is defined.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-MetricName <String>
Specifies the name of the metric.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-MetricNamespace <String>
Specifies the metric namespace for rule.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the rule.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TargetResourceUri <String>
Specifies the resource ID of the webtest.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-WindowSize <TimeSpan>
Specifies the time window size for the rule to compute its data.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Insights.OutputClasses.PSAddAlertRuleOperationResponse
NOTES
Example 1: Add a webtest alert rule
PS C:\\>Add-AzureRmWebtestAlertRule -Name "webtestRule" -Location "East US" -ResourceGroup "Default-Web-EastUS" -WindowSize 00:05:00 -MetricName
"metric" -TargetResourceUri ":/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourcegroups/Default-Web-WestUS/providers/microsoft.insights/we
btests/leowebtestr1-webtestr1" -Description "Nice Webtest rule" -Failed 3
RequestId StatusCode
--------- ----------
9a5bc388-c7ac-4dc6-aa70-f4bc29c2c712 OK
This command adds or updates a webtest alert rule.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... talertrule
Set-AzureRmActivityLogAlert
Add-AzureRmMetricAlertRule
Get-AzureRmAlertHistory
New-AzureRmAlertRuleWebhook
SYNOPSIS
Adds or updates a webtest alert rule.
SYNTAX
Add-AzureRmWebtestAlertRule [-Action <System.Collections.Generic.List`1[Microsoft.Azure.Management.Monitor.Management.Models.RuleAction]>]
[-DefaultProfile <IAzureContextContainer>] [-Description <String>] [-DisableRule] -FailedLocationCount <Int32> -Location <String> -MetricName
<String> [-MetricNamespace <String>] -Name <String> -ResourceGroupName <String> -TargetResourceUri <String> -WindowSize <TimeSpan>
[<CommonParameters>]
DESCRIPTION
The Add-AzureRmWebtestAlertRule cmdlet adds or updates an alert rule of either metric, event, or webtest type. The added rule is associated to a
resource group and has a name. This cmdlet implements the ShouldProcess pattern, i.e. it might request confirmation from the user before actually
creating, modifying, or removing the resource.
PARAMETERS
-Action <System.Collections.Generic.List`1[Microsoft.Azure.Management.Monitor.Management.Models.RuleAction]>
Specifies a comma-separated list of actions.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Description <String>
Specifies a description of the rule.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DisableRule [<SwitchParameter>]
Disables the rule. If you do not specify this parameter, the rule is enabled.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-FailedLocationCount <Int32>
Specifies the failed location count for the webtest rules. This is similar to the threshold in the other types of rules.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Location <String>
Specifies the location where the rule is defined.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-MetricName <String>
Specifies the name of the metric.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-MetricNamespace <String>
Specifies the metric namespace for rule.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the rule.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TargetResourceUri <String>
Specifies the resource ID of the webtest.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-WindowSize <TimeSpan>
Specifies the time window size for the rule to compute its data.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Insights.OutputClasses.PSAddAlertRuleOperationResponse
NOTES
Example 1: Add a webtest alert rule
PS C:\\>Add-AzureRmWebtestAlertRule -Name "webtestRule" -Location "East US" -ResourceGroup "Default-Web-EastUS" -WindowSize 00:05:00 -MetricName
"metric" -TargetResourceUri ":/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourcegroups/Default-Web-WestUS/providers/microsoft.insights/we
btests/leowebtestr1-webtestr1" -Description "Nice Webtest rule" -Failed 3
RequestId StatusCode
--------- ----------
9a5bc388-c7ac-4dc6-aa70-f4bc29c2c712 OK
This command adds or updates a webtest alert rule.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... talertrule
Set-AzureRmActivityLogAlert
Add-AzureRmMetricAlertRule
Get-AzureRmAlertHistory
New-AzureRmAlertRuleWebhook