Stop Alert Notification on a Server during a 3 hour window
PMPEDROS
Posts: 1 New member
Need assistance with writing a powershell script to stop the AG Lag Alert on a cluster during a specific time frame. It happens daily at the same time so i would like to have redgate not alert on it for a 3 hour window.
Tagged:
Answers
Here's a concise PowerShell script to disable the AG Lag Alert during a 3-hour window:
Adjust
Stop-SqlAgentJob
or alert handling based on your setup.Here’s a PowerShell script to stop AG Lag Alert on a cluster during a specific time frame using Redgate SQL Monitor:
This script connects to Redgate SQL Monitor, retrieves the AG Lag Alert, and disables it for the specified 3-hour window. Adjust
$AGName
,$ClusterName
,$StartTime
, and$EndTime
to match your cluster configuration.