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.
- 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.
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:
- Change the type to a string
- Create a custom scripted discovery which returns a zero if the registry value is not found or at least validates an integer
- 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.