Represents a monitoring object and provides access to its properties, state, as well as related monitoring objects. Namespace: Microsoft.EnterpriseManagement.Monitoring
Assembly: Microsoft.EnterpriseManagement.OperationsManager (in microsoft.enterprisemanagement.operationsmanager.dll)


Visual Basic
Dim instance As MonitoringObject


Visual Basic
<SerializableAttribute> _
Public Class MonitoringObject
		Inherits PartialMonitoringObject
public class MonitoringObject : PartialMonitoringObject
public ref class MonitoringObject : public PartialMonitoringObject
/** @attribute SerializableAttribute() */ 
public class MonitoringObject extends PartialMonitoringObject
public class MonitoringObject extends PartialMonitoringObject


The following example gets a collection of monitoring objects and outputs their states and names.

C#  Copy Code
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.EnterpriseManagement.Configuration;
using Microsoft.EnterpriseManagement.Configuration.IO;
using Microsoft.EnterpriseManagement;
using System.Collections.ObjectModel;
using Microsoft.EnterpriseManagement.Administration;
using Microsoft.EnterpriseManagement.Monitoring;

namespace SDKSamples
	class Program
		static void Main(string[] args)
			ManagementGroup mg = new ManagementGroup("localhost");
			ReadOnlyCollection<MonitoringObject> monitoringObjects;
			MonitoringClass computerMonitoringClass;
			MonitoringObjectCriteria criteria;
			computerMonitoringClass = mg.GetMonitoringClass(SystemMonitoringClass.WindowsComputer);
			criteria = new MonitoringObjectCriteria(string.Format("HealthState='{0}'", (int)HealthState.Error), computerMonitoringClass);
			monitoringObjects = mg.GetMonitoringObjects(criteria);
			foreach (MonitoringObject monitoringObject in monitoringObjects)
				Console.WriteLine("Object Name: {0}", monitoringObject.DisplayName);
				Console.WriteLine("In Error State since: {0}", monitoringObject.StateLastModified.Value.ToLocalTime().ToString());


A monitoring object is an instance that is discovered by Microsoft System Center Operations Manager. For more information about this class, see Monitoring Object and Partial Monitoring Object Comparison.

Inheritance Hierarchy

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Development Platforms

Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP

Target Platforms

Windows Server 2008,Windows Server 2003,Windows Vista,Windows XP

See Also