The following question arose in the OpsMgr management packs newsgroup:
I have the SCOM Unleashed book (great book!) and imported their MP which among another things monitors Windows processes. However, it came with no instructions on how to actually use it except to configure it via overrides.
Has anyone figured out how to use this MP? Also, is it possible to monitor memory or total CPU time for a particular Windows process? I’d like to setup a rule that says something like if process application.exe has been running longer than x minutes, or memory usage is great than y, alert me.
Ok, here’s how it works:
The ProcessMonitor is a "mini" management pack that runs a WMI query. The query performs a:
select * from Win32_Process Where Name = (the parameter passed by the script for the name of the process to monitor).
Any fields available within the Win32_Process WMI query should be easy to integrate with the script. The script itself can be found within the Operations console in the Authoring space. Navigate to Authoring -> Management Pack Objects -> Monitors. Then look within System Center Managed Computer (Any OS) -> Entity Health -> Availability -> ProcessMonitor. On the properties for the monitor, the script is available to be edited from the Script tab.
The fields that appear as available within Win32_Process are:
So there you have it!