-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hi There,
I am trying to create the alert using the same however alert creation always stopped after 27th
Please find the below error and details,
`PS C:\Gourav\Git\Alert_OMS_2\manageability-toolkits\Alert Toolkit> .\New-CoreAlerts.ps1
cmdlet New-CoreAlerts.ps1 at command pipeline position 1
Supply values for the following parameters:
SubscriptionId: 8c328a86-XXXX-XXX-XXX-bXXXXXXX
WorkspaceName: omsrg03
ResourceGroup: omsrg03
Location: 'Canada Central'
Logging into Azure and selecting subscription...
Existing Az session detected. Skipping login prompt.
Verifying parameters...
Enter the email address to be subscribed for alerts: gouravin@outlook.com
Creating action group...
Action group with name, 'omsrg03-email-ag1' created successfully
Configuring event log collections...
Configuring performance counter collections...
Alerts where selected with the tags All ...
Beginning creation of 38 alerts...
-Creating alert 1 of 38: 'High CPU Usage'
-Creating alert 2 of 38: 'Low Disk Space Windows - Critical'
-Creating alert 3 of 38: 'Low Memory'
-Creating alert 4 of 38: 'NTFS - File System Corrupt'
-Creating alert 5 of 38: 'Unexpected shutdown'
-Creating alert 6 of 38: 'SQL - Cannot recover the master database'
-Creating alert 7 of 38: 'SQL - Could not find filegroup in sys.filegroups'
-Creating alert 8 of 38: 'SQL - Could not mark database as suspect'
-Creating alert 9 of 38: 'SQL - Could not recover database because of unresolved transaction outcomes'
-Creating alert 10 of 38: 'SQL - Database cannot be opened due to inaccessible files or insufficient memory or disk space'
-Creating alert 11 of 38: 'SQL - Failed to allocate memory for common language runtime (CLR) functionality'
-Creating alert 12 of 38: 'SQL - An error occurred during database recovery'
-Creating alert 13 of 38: 'SQL - The maximum number of user connections has already been reached'
-Creating alert 14 of 38: 'SQL - The server is too busy to perform the backup or restore operation'
-Creating alert 15 of 38: 'SQL - Could not do cleanup for the killed process'
-Creating alert 16 of 38: 'SQL - Could not find FOREIGN KEY constraints for table, although the table is flagged as having them'
-Creating alert 17 of 38: 'SQL - Could not write a CHECKPOINT record in database because the log is out of space'
-Creating alert 18 of 38: 'SQL - Database capacity threshold exceeded'
-Creating alert 19 of 38: 'SQL - Enlist of MSDTC transaction failed'
-Creating alert 20 of 38: 'SQL - Log Capacity threshold exceeded'
-Creating alert 21 of 38: 'SQL - Microsoft SQLServer 2014 Monitoring Event 17063 DatabaseConsistencyErrors'
-Creating alert 22 of 38: 'SQL - Microsoft SQLServer 2014 Monitoring Event 17063 SQLOpsJobExecutionfailures'
-Creating alert 23 of 38: 'SQL - Microsoft SQLServer 2014 Monitoring Override Custom Error 60200'
-Creating alert 24 of 38: 'SQL - Microsoft SQLServer 2014 Monitoring Override Event14151 ExpiredSubscription'
-Creating alert 25 of 38: 'SQL - SQLServerAgent could not be started'
-Creating alert 26 of 38: 'SQL - The log for database is not available'
-Creating alert 27 of 38: 'SQL - Transactional replication latency threshold exceeded'
C:\Gourav\Git\Alert_OMS_2\manageability-toolkits\Alert Toolkit\New-CoreAlerts.ps1 : Failed to create alert rule with exception:
Exception type: Exception, Message: System.Exception: Error occurred while creating Log Alert rule ---> System.AggregateException:
One or more errors occurred. ---> Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ScheduledQueryRulesOperations.d__5.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.Azure.Commands.Insights.ScheduledQueryRules.NewScheduledQueryRuleCommand.ProcessRecordInternal()
--- End of inner exception stack trace ---
at Microsoft.Azure.Commands.Insights.ScheduledQueryRules.NewScheduledQueryRuleCommand.ProcessRecordInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status code:Null, Reason phrase: Null
At line:1 char:1
- .\New-CoreAlerts.ps1
-
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-CoreAlerts.ps1`