I have a SAM (and/or alerts) question that I'm looking for guidance on. Never posted here before so I thought I'd give it a try...
Suppose I create a yes/no custom property and associate it with a monitoring application template. Can I have a powershell component monitor in the application change the yes/no value of the application custom property when it executes during a poll?
For example, suppose that the application monitor has a custom property named ICareAboutThisRightNow (Yes or No) and has two powershell component monitors:
Component#1. Is any disk more than 90% full? If yes, then flag the status of this component as critical, propagate this to the application status and use this condition as part of an alert trigger.
Component#2. Is the current time on this system between 6pm and 6am? If it is, then I want this PowerShell component monitor to change the value of the application custom property ICareAboutThisRightNow to "No". Otherwise it will change the value of the Application custom property ICareAboutThisRightNow to "Yes".
Next I want to trigger an alert on the application if it has status Critical due to a condition detected by component #1 BUT only if the value of application custom property ICareAboutThisRightNow is "Yes".
I've been trying to implement a system like this for a while but without success. I hadn't thought of using custom properties until it was touched on in a recent webinar. I'd appreciate advice as to how I could implement this scheme.
Or If I strip out Component2 from the application monitor, leaving just Component1 and no custom property, could I write a custom trigger action that would only send the email for the alert IF :
a. The Application is Critical because of a condition detected by Component#1
b. A PowerShell script (basically the same one used above in Component#2) runs in real time as part of the alert handling and somehow prevents the alert from being sent between 6pm and 6am on the system that is alerting?
Thanks In Advance.