I have written some custom SCOM management packs that read from a database and populate event collection data (see here and here for some examples from other people). My first management pack works without any problems. The second management pack (essentially a copy of the first) fails with an out of memory exception. The Operations Manager event log on the SCOM server contains an entry that starts with the following:
Converting data batch to XML failed with error “Not enough storage is available to complete this operation.” (0x8007000E) in rule “[RuleName]”
This has been plaguing me for weeks but I now have an answer.
The definition of a collection event record includes a description field. The description field may be defined with a static value, a property bag (params) value or combination of both. The property bag value can be fully qualified (in the format of $Data/Property[@Name=’<PropertyBagItemName>’]$) or referenced by index. See here for more information.