Many customers frequently ask the question whether or not it is possible to fetch a report of up-time of a service being monitored with SCOM. Usually, the answer is – not out of the box. However, you can achieve this using a simple workaround.
One way of doing it is to author your own service monitor, but that involves considerable amount of knowledge and experience of management packs and the underlying coding. It usually takes a lot of time as well. Not everyone has the right knowledge or the time to spend on this so I thought I’d share a quick trick I do to measure uptime of a service and also be able to present it to the concerned parties in the form of a report.
It often happens that you have a service running on your servers that is used as “proof” to show that the application was running, or maybe as analysis for troubleshooting. Hence it becomes necessary to be able to measure the uptime of this service accurately and to be able to show it to the management or to pass it around your department.
The thing is, when you’re creating a monitor to measure availability of a service in SCOM, you usually choose a “Basic Service Monitor”. This monitor is not very intelligent and simply places an instance of itself on every server belonging to the class that you choose.
However, you do have another option to monitor your service and it is the “Windows Service Template”. This type provides many more features and finer control on your service monitoring. You can read my earlier blog comparing these two options of service monitoring and decide when to use what.
So the way the Windows Service template works is that it creates a discovery of its own and creates an actual class. This class can further be used to target other workflows that you may have to monitor this class of servers. Another advantage of that is you can now use this class to fetch a “Service Availability” report.
For example, let’s say I’m monitoring the Spooler service on a bunch of servers, and I need to be able to see the uptime of this service on each of these servers. So I create a Windows Service Template monitor and call it “Test Spooler”.
This means you can also target your availability report to this target as well and measure the uptime of the service it is monitoring.
You can also fetch a report for a group of service monitors created this way. There’s a good discussion on the Microsoft forums we had a while back regarding this exact requirement.
Hope that helps!