Microsoft released an PowerShell script called “CheckDatabaseRedundancy.ps1,” which “monitor redundancy of replicated mailbox databases by validating that there’s at least two configured, healthy, current copies, and alerts when a single healthy copy of replicated database exists. In this case, both active & passive copies are counted when determining redundancy. When executing, you must specify either a database name or DAG member name. To specify database, use MailboxDatabaseName parameter and to specify DAG member, use MailboxServerName parameter. When run interactively in console, script performs redundancy check only once, and outputs CurrentState (red or green) on screen. Like other scripts and cmdlets, CheckDatabaseRedundancy.ps1 can also be run in monitoring mode and generate events by adding MonitoringContext parameter. This enables script to be invoked by a monitoring solution, such as Microsoft System Center Operations Manager (SCOM). In monitoring mode, script logs red alert and green alert events into local server’s Application event log. Red alert event (event ID 4113) is fired only if database has been “red” for 20 minutes more (in duration, not consecutive) in hour-long run of script, and green alert event (event ID 4114) when database has been “green” for 10 consecutive minutes. By default, once a red alert event is generated, it’ll continue to be reported every 15 minutes,” noted Microsoft.
More Info: Download