Skip to content

Commit

Permalink
Bugfix to should process
Browse files Browse the repository at this point in the history
  • Loading branch information
savpek committed Jan 7, 2021
1 parent 73aeb74 commit acf671d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Script.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@

./misc/GenerateDefaultAlertDocMd.ps1
$webHookReceiver = New-AzActionGroupReceiver `
Get-ChildItem $PSScriptRoot/src/*.ps1 | foreach { . $_.FullName }

$receiver = New-AzActionGroupReceiver `
-Name 'FunctionAppWebHook' `
-WebhookReceiver `
-ServiceUri "https://adsasdfkfadsoafsdkfadsoodfsakdsfaoadfs.fi" `
-UseCommonAlertSchema

Get-DefaultAlertRules | Set-AlertRules -ResourceGroup 'foo' -ActionGroupReceiver $receiver

# $alertRules = .\Get-DefaultAlertRules.ps1 | .\New-AlertRuleOverwrite.ps1 -ResourceType "Microsoft.Web/Sites" -Name "Few Server errors" -ResourceFilter { $_.Name -like "*testing2312313"} -FixSteps "https://newfoo.fi" -FixStepsLocation Before
# # | .\New-AlertRule.ps1 -ResourceType "Microsoft.Web/Sites" -Name "foo" -Description "foo" -Severity Critical -Criteria {} -WindowSize (new-timespan -Hours 1)
# .\Apply-AlertRules.ps1 -ResourceGroup pekantesti1 -AlertRules $alertRules -ActionGroupReceiver $webHookReceiver -WhatIf
2 changes: 1 addition & 1 deletion src/Set-AlertRules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function Set-AlertRules {
}


$PSCmdlet.ShouldProcess($ResourceGroup, "Set-AzActionGroup - azure-alerts")
if($PSCmdlet.ShouldProcess($ResourceGroup, "Set-AzActionGroup - azure-alerts"))
{
$alertRef = Set-AzActionGroup `
-Name "azure-alerts" `
Expand Down

0 comments on commit acf671d

Please sign in to comment.