System Center Operations Manager LogoToday I encounterd what seems to be a bug in the System Center 2012 Visual Studio Authoring Extensions. I wanted to define a Performance Collection Rule that reads out the percentage of free memory from an SNMP device.

Since the device returns only the percentage of used memory I needed to use the ComputedPerfProvider provider to substract the used memory percentage from 100.

I could of course report used memory instead of free memory but I wanted the resulst to appear in the default SCOM Performance View, which only lists Free Memory:

System Center Operations Manager | Default Performance View

The XML to calculate the free percentage is quite easy and looks like this:

However when I tried to add this to the Configuration XML in the Data Source Configuration I got the following error message: The configuration of element ‘System.NetworkManagement.ComputedPerfProvider’ is including a non-existent schema type ‘Snmp!System.SnmpVarBindsSchema’:

The configuration of element 'System.NetworkManagement.ComputedPerfProvider' is including a non-existent schema type 'Snmp!System.SnmpVarBindsSchema'

Changing the Referenced Management Packed version to 2012SP1 or even 2012R2 did not fix the issue so I presume this is a bug in the authoring extensions.

As a workaround you can insert the XML directly into the .mptg file (do not edit the .mptg.mpx file as it will be overwritten on next build).

To do this close the project in Visual Studio and delete the .mptg.mpx file. Now take the XML and replace the < and > sign with html entities and remove indenting and line breaks. In my case the result looks like this:

<Interval>300</Interval><NoOfRetries>3</NoOfRetries><Timeout>200</Timeout><SnmpVarBinds><SnmpVarBind><OID>.</OID><Syntax>0</Syntax><Value VariantType="8" /></SnmpVarBind></SnmpVarBinds><ComputedPerformanceValue><Subtraction><NumericValue><Value>100</Value></NumericValue><NumericValue><XPathQuery Type="Integer">SnmpVarBinds/SnmpVarBind[OID="."]/Value</XPathQuery></NumericValue></Subtraction></ComputedPerformanceValue><ObjectName>Memory</ObjectName><CounterName>Free Memory %</CounterName>

Sadly it’s not possible to edit this XML from Visual Studio, even after inserting it this way. So futures updates must follow the same process.

Happy authoring!