In this post I will create a Process monitor in the Authoring Console. There are some pitfalls, for example the instance Count variable and to use lower-case in the process name.
1. Create an MP and a class in the Authoring console.
2. Create a discovery for your class. In my case i’ll check the registry if the spooler service is installed.
3. Now, create a reference to the process class. In Options add a reference by browsing to the folder containing Microsoft.SystemCenter.ProcessMonitoring.Library.mp.
4. Next it’s time to create to monitor. Open the Health Model tab and create a new custom monitor.
5. Set a Name and Target for the previously created class.
6. Click Browse for type in the Configurations tab.
7. Choose 1 of the 4 available types from the library referenced to. In this example I’ll pick ProcessInstanceCountMonitorType.
8. Fill in ProcessName, Frekvency, Max, Min and OutOfRangeTimeThreshold. Note, the process name must be written in lower-case or the monitor will not work.
9. Set the Health of the monitor.
10. Activate alerting. To obtain the Instance count you have to get the data from the variable $Data[Default=’0′]/Context/DataItem/Item0Context/DataItem/ProcessInformations/ProcessInformation[./ProcessName =’notepad.exe’]/ActiveInstanceCount$
11. Import the MP in the SCOM Console under the Administration tab.
12. In the Monitoring tab, check that the class has been discovered.
13. When the class is instanced with the correct server(s), kill the process to test the monitor.
14. An alert will show up.
In the next blog post about process monitoring I will create a custom Monitor Type that will let you override the Min-/Max-InstanceCount thresholds.
4 responses to Author Process monitoring