Using MPAuthor to create a class, discover and monitor a service

<!--[if lt IE 9]>


Comments (11)
  1. Jesty says:

    Thanks for the blog Kevin.. we would include the same in our best practices for authoring rules and monitors for a class.

  2. Sascha Bieler says:

    Thank you so much for this excellent blog post. Made things easier, again!

  3. Ricci says:

    I glad to see post talking about right way create target for monitoring, but still little disappointed to see tutorial written with 3rd party tool. You can show how do things using authoring extensions?

  4. Prakash Bhimji says:

    Great Article Kevin, our current environment is a total mess, every monitor is targeted to "Windows Computer"

  5. Matu says:

    It is one of the best tech blog!
    Please do not stop writing! 🙂
    I’m looking forward for next topics!

    Thanks a lot for sharing your knowledge.

    Best regards.

  6. Srinivas Kanugula says:

    It is really excellent for Beginners for understanding the Management Pack


  7. Brian says:

    Everything worked out well until I got to the part of the State View creation. Once I deployed the finished MP into my management group it never pulled in the servers into that State View. I could see them under Discovered Inventory and the class that
    I created. When creating that health state I pulled in the new class. Is there some other step that I missed?


  8. Joe says:

    Hi Brian,

    I noticed the same thing and think I found a bug. If you view the XML of the state view you will see the Severity section. When healthy is selected it actually puts unknown. You need to change the XML from "Unknown" to "Green". Once I did this my machines started
    to show up.


  9. Floris says:

    Hi Kevin, great blog!
    I Was wondering if it would be possible to use several targets vs monitors in 1 MP.
    My purpose is to connect certain targets to certain services. If service has reg key a/b/c then monitor services a/b/c | if a server has reg key a/d then monitor server a/d
    Is something like this possible?

  10. @Floris – I’m not sure in what context you are using service. It sounds like the first item is "business service". Thereafter, windows services? This is doable but there are possible challenges:

    1. Create a class for your business service. Discover this business service based on a generic service registry key e.g. HKEY_LOCAL_MACHINESOFTWARESCOMDiscoveryDataMyApp

    2a. Create a class discovery monitor for each windows service that could exist with health roll ups configured to class in step 1 (or use localapplication for an automatic health roll up). Where the windows service is discovered, the monitor will execute.
    Where the service is not discovered, the monitor will not execute. However, this requires a class per windows service which might be unnecessary overhead unless you need a class per windows service e.g. for setting individual maintenance mode on the specific
    windows service.

    2b. Create a script based monitor targeted at the business service – check for windows services installed and their status. This is more overhead on the monitored server than a unit service monitor.

    The challenge is that you can only target monitors at a class (and not based upon the properties of a class). I’d tend towards option 2a if I had to choose between them.

    You could also look to leverage the fact that there is a “Alert only if service startup type is automatic” switch which means that in step 2a, you could target service monitors for each service at the Business Class and only services which exist on the server
    and are set to automatic start are actually monitored. I’m not a fan of that approach for reasons discussed here –

  11. @Ricci

    I’m starting up an authoring series across on the Microsoft UK SCOM PFE blog – – which might help.

    I actually find Visual Studio very quick for authoring by creating a fragment library that covers most monitoring scenarios. It is even possible to use snippets to facilitate rapid creation of code that can be used as a basis for more extended monitoring.

Comments are closed.

Skip to main content