SCOM discovery fails for authored custom class

I created a management pack in which I had a custom class and discovery for the class using the standard registry discovery.

The CLASS inherited from the Windows Computer class and discovery was based on the existance of a windows computer.  Part of the discovery included registry information for the properties.  One of those properties was defined as an integer.

CLASS: MyClass

PROPERTIES:

  • Prop1: string
  • Prop2: Integer

The registry keys do not necessarily exist on discovery and that is ok because we have a task that builds the keys as we need them.

When Prop1 is discovered based on a registry value that does not exist yet, it is given an empty value and that is ok.  When Prop2 is discovered based on a registry value that does not exist yet, it is given an empty value BUT that is not converted to a zero and is thus an invalid type for a property defined as an integer.

You will see eventID 10801 logged on the RMS.  In part the event description includes:

Invalid monitoring class property value specified in the discovery data item. The value needs to adhere to the type.
MonitoringClassPropertyName: MyClass.Prop2
MonitoringClassPropertyValue:         <– should be a zero at least, not blank

Interestingly, SCOM 2012 returns a zero where SCOM 2007 returns a failure.

There are 3 options at this point:

  1. Change the type to a string
  2. Create a custom scripted discovery which returns a zero if the registry value is not found or at least validates an integer
  3.  Upgrade to SCOM 2012

OK… Option #3 is not realistic but is “technically” an option.

If anyone finds that I have missed something, please feel free to share.  My development of the management pack was using the authoring console and importing into SCOM 2012 R2 for testing.  I didn’t not discover the issue until I imported the MP into SCOM 2007.

Not sure if this is general knowledge but it was new to me.

2 thoughts on “SCOM discovery fails for authored custom class

  1. Craig Pero Post author

    Thanks for that feedback Joe.  Normally, that would work but in this case, the registry value may or may not end up existing so the root issue is that scom 2007 returns an empty value which causes the validation at the RMS to fail. 🙁

    My ultimate reason for blogging this is for any MP author who might end up in this situation, it is good to know.  The simplest solution if you need to collect the data is a custom vb script in which you validate the discovery data and return the value you consider valid.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.