When you create a monitor for a process name (say) w3wp.exe using "Process Monitor - WMI" component type, the GUI provides a way to set thresholds for CPU, Physical Memory, Virtual Memory etc.
I want to be able to set similar threshold for a monitor that I created using WMI Performance Counter Monitor component type. For example, I created a monitor to check for PercentInterruptTime property from Win32_PerfFormattedData_PerfOS_Processor WMI class. However I want to be to set the threshold on this monitor (say) PercentInterruptTime > 50. How do I do this?
Does this involve creating the WMI query in following way:
SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor WHERE PercentInterruptTime > 50
If I do this, when query runs, there may or may not be any results depending on the PercentInterruptTime property. How does getting results or no results affect setting an alert on this monitor?
Does this involve writing a custom VB script? If so, what should the script return to the script invoker to process the results? For example, how does the invoker know whether there are any results or not? The example scripts simply execute some code and then seem to echo, they don't show a way to send information to the caller (APM).
Is there a better way to do this?
Thanks