Monitoring Object and Partial Monitoring Object Comparison

Updated: January 31, 2012

Applies To: System Center 2012 - Operations Manager

The PartialMonitoringObject class and MonitoringObject class are the only classes that are used to represent monitoring objects in the Operations Manager database. These classes represent instances of a monitoring class, which is a type that is defined in a management pack. Each monitoring class can have its own set of custom properties defined for it. The PartialMonitoringObject class defines built-in properties that are in every monitoring object. Only these properties are returned when you are retrieving PartialMonitoringObject instances, which means that none of the custom properties that are defined in a monitoring class are returned with the instance. The MonitoringObject class is derived from the PartialMonitoringObject class, and you can use it to retrieve all the properties that are returned with a PartialMonitoringObject object, plus the custom properties that are defined for a monitoring class.

When you retrieve a large number of objects using a query, using MonitoringObject objects instead of PartialMonitoringObject objects can result in a large amount of data being returned. For example, for every instance of a Windows Computer class, 53 properties are returned. This is in addition to the mandatory properties that are returned by using PartialMonitoringObject objects. By using PartialMonitoringObject objects rather than using MonitoringObject objects, you can significantly reduce the load on the Operations Manager database when you retrieve a large number of objects. You also significantly reduce the amount of data that is sent from the System Center Data Access service to the SDK client. Because the Operations Manager database omits custom property values when it responds to the query, using partial monitoring objects decreases the load on the database and improves query performance.

You should use PartialMonitoringObject objects if you do not need to access the custom property values for the object so that you benefit from the faster performance.

In order to set or get a property value from a MonitoringObject or a PartialMonitoringObject class instance, you must access their dictionary indexer by passing a object as key:

static void GetSetPropertyValues(MonitoringObject mObject)
  foreach(ManagementPackProperty property in mObject.GetProperties())
	 mObject[property] = “Some Value”;
	 Console.WriteLine("	" + property.Name + " = " + mObject[property].Value.ToString());

The following list contains the properties that are defined for all partial monitoring objects.

The following list contains methods that return PartialMonitoringObject objects.

The following topics contain examples that use MonitoringObject objects:

The following topics contain examples that use PartialMonitoringObject objects:

See Also