FIXED in UR11 OM12R2: 3-State Monitor Not Triggering New Notifications When Changing Between Degraded States
This post demonstrates how we can use a simple test case to verify whether the issue involving 3-state unit monitors not triggering new alert notifications when changing from Warning to Critical or vice versa, still persist in an OpsMgr 2012 R2 management group patched with Update Rollup 11 (UR11) (KB3183990) .
While I was going through the list of issues fixed in Update Rollup 11 for System Center 2012 R2 Operations Manager with my business counterpart, Dimi Doumtsis, there was 1 fix in particular that caught our attention:
This issue has been around since the OpsMgr 2007 SP1 days, where a 3-state unit monitor would change state from Healthy to Warning and trigger an alert notification when the first warning threshold is breached, but when the critical threshold is breached later and changes the health state of the unit monitor from Warning to Critical, it does not trigger another alert notification.
Over the years, this issue has affected alot of OpsMgr users and caused a fair amount of support cases to be logged, where the 3-state monitor they configured (Severity: Matches monitor’s health) failed to trigger an alert notification for a critical situation that requires their immediate attention - for example, when the % free space of a logical disk on a critical server dropped from 10% (Warning) to 1% (Critical).
The easy fix was to create two 2-state unit monitors instead, one with the critical threshold and the other with the warning threshold. That way, the user would receive an alert notification from the 2-state monitor with the critical threshold when it’s threshold is breached, but will also receive another alert from the 2-state monitor with the warning threshold as well.
But Finally, the fix for this long persisting issue is available in Update Rollup 11 for OpsMgr 2012 R2, and can be downloaded from the update catalog site to be applied to an OpsMgr 2012 R2 management group.
To verify the fix after applying UR11 to an OpsMgr 2012 R2 management group, here is a simple test case that can be setup in two steps:
- Configure a 3-state VBscript-based unit monitor and force the state changes to trigger alerts,
- Configure a notification subscription scoped to the 3-state unit monitor from (1.) with a command notification channel to simulate a notification by writing the alert information to a text file whenever a new alert is generated by the 3-state monitor.
Step 1: To Configure the 3-state VBscript-based unit monitor:
Create a 3-state unit monitor using the Timed Script Three State Monitor type, target the RMS Emulator class and configure it to run at a 5 minute interval.
Paste the following VBscript in the Script field of the Script page and give a name like MyTestScript.vbs to the script in the File Name field:
'Returns: State = "Green"
'SCOM Parameter Name: Property[@Name='SetState']
'Healthy: Equals "Green"
'Warning: Equals "Yellow"
'Critical: Equals "Red"
Dim oAPI, propertyBag
Set oAPI = CreateObject("MOM.ScriptAPI")
Set propertyBag = oAPI.CreatePropertyBag()
Call propertyBag.AddValue ("SetState", "Green")
Call oAPI.Return(propertyBag)
To control the state of this unit monitor, just change the value of the “SetState” key in the propertyBag.AddValue method of the VBscript –> “Red” for a Critical state, “Yellow“ for a Warning state and “Green” for a Healthy State.
Map the SetState parameter - Property[@Name='SetState'] – to the values (Red, Yellow, Green) for the Unhealthy, Degraded and Healthy Expressions as follows:
Enable alerting for the 3-state unit monitor with the following settings:
- Generate an alert when: The monitor is in a critical or warning health state
- Severity: Match monitor’s health
Step 2: To Configure the notification subscription with command notification channel:
Follow the steps on How to Configure Command Notification in SCOM 2012 with PowerShell script by fesiro for the notification channel and subscriber:
Create a new notification subscription and scope it to the 3-state unit monitor, New(0) resolution state for it’s alerts and the command notification channel and subscriber created earlier:
Test Results:
On an OpsMgr 2012 R2 management group patched with only Update Rollup 7 (7.1.10226.1090), the test returned a NEGATIVE result as the issue still persist where the state changes in the 3-state unit monitor from Warning to Critical or Critical to Warning did not trigger a simulated notification by writing the alert information to the LogAlerts log file:
However, on an OpsMgr 2012 R2 management group patched with Update Rollup 11 (7.1.10226.1239), the test returned a POSITIVE result as every state change in the 3-state unit monitor from Warning to Critical or Critical to Warning triggered a simulated notification by writing the alert information to the LogAlerts log file:
The severity of the alert generated by the 3-state unit monitor was also updated accordingly with every state change from Warning to Critical or Critical to Warning:
Housekeeping: After completing the test, delete the management pack with the VBScript-based 3-state unit monitor and delete the notification subscription, channel and subscriber used for the test case.
The test results above showed that this long persisting issue is FINALLY fixed in Update Rollup 11 for OpsMgr 2012 R2. Well, better late than never! :-)
Additional Resources:
UR11 for SCOM 2012 R2 – Step by Step by Kevin Holman
https://blogs.technet.microsoft.com/kevinholman/2016/09/06/ur11-for-scom-2012-r2-step-by-step/
Disclaimer:
All information on this blog is provided on an as-is basis with no warranties and for informational purposes only. Use at your own risk. The opinions and views expressed in this blog are those of the author and do not necessarily state or reflect those of my employer.