Open Alerts but the Health Explorer shows Healthy

On occasions you can run into a situation where OpsMgr shows open alerts in the console (with a warning or error condition), but the Health Explorer shows that the monitored object is actually Healthy.

Here’s a quick script to show you them (if you have any):

Get-Alert -criteria “ResolutionState <> ‘255’ AND IsMonitorAlert = ‘True’ AND MonitoringObjectHealthState = ‘1’”

 

If you want to also close the alerts, then try this one:

Get-Alert -criteria “ResolutionState <> ‘255’ AND IsMonitorAlert = ‘True’ AND MonitoringObjectHealthState = ‘1’” | Resolve-Alert -comment “Monitor is now Healthy”

 

In case you were wondering, if you want to know what the various values for MonitoringObjectHealthState are:

0=Uninitialized (ie, Maintenance, Not-Monitored)
1=Success
2=Warning
3=Error