ManagementGroup.GetMonitoringRules Method

Definition

Retrieves monitoring rules.

Overloads

GetMonitoringRules()
Obsolete.

Gets rules.

GetMonitoringRules(ManagementPackRuleCriteria)
Obsolete.

Gets rules based on criteria.

GetMonitoringRules<T>(ManagementPackRuleCriteria, ICollection<T>)
Obsolete.

Gets all the rules in this management group targeted to any of these instances.

GetMonitoringRules<T>(ICollection<T>)
Obsolete.

Gets all the rules in this management group targeted to any of these instances.

GetMonitoringRules()

Caution

Please use Monitoring.GetRules()

Gets rules.

public:
 System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::EnterpriseManagement::Configuration::MonitoringRule ^> ^ GetMonitoringRules();
[System.Obsolete("Please use Monitoring.GetRules()")]
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Configuration.MonitoringRule> GetMonitoringRules ();
member this.GetMonitoringRules : unit -> System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Configuration.MonitoringRule>
Public Function GetMonitoringRules () As ReadOnlyCollection(Of MonitoringRule)

Returns

A collection of rules that match the criteria.

Attributes

Examples

The following example defines aManagementGroupinstance and retrieves its monitors, monitoring rules, and knowledge articles.

Applies to

GetMonitoringRules(ManagementPackRuleCriteria)

Caution

Please use Monitoring.GetRules()

Gets rules based on criteria.

public:
 System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::EnterpriseManagement::Configuration::MonitoringRule ^> ^ GetMonitoringRules(Microsoft::EnterpriseManagement::Configuration::ManagementPackRuleCriteria ^ criteria);
[System.Obsolete("Please use Monitoring.GetRules()")]
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Configuration.MonitoringRule> GetMonitoringRules (Microsoft.EnterpriseManagement.Configuration.ManagementPackRuleCriteria criteria);
member this.GetMonitoringRules : Microsoft.EnterpriseManagement.Configuration.ManagementPackRuleCriteria -> System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Configuration.MonitoringRule>
Public Function GetMonitoringRules (criteria As ManagementPackRuleCriteria) As ReadOnlyCollection(Of MonitoringRule)

Parameters

criteria
ManagementPackRuleCriteria

The criteria.

Returns

A collection of rules that match the criteria.

Attributes

Applies to

GetMonitoringRules<T>(ManagementPackRuleCriteria, ICollection<T>)

Caution

Please use Monitoring.GetRules<T>()

Gets all the rules in this management group targeted to any of these instances.

public:
generic <typename T>
 where T : Microsoft::EnterpriseManagement::Monitoring::PartialMonitoringObject System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::EnterpriseManagement::Configuration::MonitoringRule ^> ^ GetMonitoringRules(Microsoft::EnterpriseManagement::Configuration::ManagementPackRuleCriteria ^ criteria, System::Collections::Generic::ICollection<T> ^ monitoringObjects);
[System.Obsolete("Please use Monitoring.GetRules<T>()")]
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Configuration.MonitoringRule> GetMonitoringRules<T> (Microsoft.EnterpriseManagement.Configuration.ManagementPackRuleCriteria criteria, System.Collections.Generic.ICollection<T> monitoringObjects) where T : Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject;
member this.GetMonitoringRules : Microsoft.EnterpriseManagement.Configuration.ManagementPackRuleCriteria * System.Collections.Generic.ICollection<'T (requires 'T :> Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject)> -> System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Configuration.MonitoringRule> (requires 'T :> Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject)
Public Function GetMonitoringRules(Of T As PartialMonitoringObject) (criteria As ManagementPackRuleCriteria, monitoringObjects As ICollection(Of T)) As ReadOnlyCollection(Of MonitoringRule)

Type Parameters

T

Must be of type PartialMonitoringObject.

Parameters

criteria
ManagementPackRuleCriteria

A value that specifies the kind of monitoring rules.

monitoringObjects
ICollection<T>

The monitoring reports that target these specified monitoring object instances.

Returns

A collection of Rule objects.

Attributes

Exceptions

monitoringObjects is null

There was invalid data in the database corresponding to this method call.

Applies to

GetMonitoringRules<T>(ICollection<T>)

Caution

Please use Monitoring.GetRules<T>()

Gets all the rules in this management group targeted to any of these instances.

public:
generic <typename T>
 where T : Microsoft::EnterpriseManagement::Monitoring::PartialMonitoringObject System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::EnterpriseManagement::Configuration::MonitoringRule ^> ^ GetMonitoringRules(System::Collections::Generic::ICollection<T> ^ monitoringObjects);
[System.Obsolete("Please use Monitoring.GetRules<T>()")]
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Configuration.MonitoringRule> GetMonitoringRules<T> (System.Collections.Generic.ICollection<T> monitoringObjects) where T : Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject;
member this.GetMonitoringRules : System.Collections.Generic.ICollection<'T (requires 'T :> Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject)> -> System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Configuration.MonitoringRule> (requires 'T :> Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject)
Public Function GetMonitoringRules(Of T As PartialMonitoringObject) (monitoringObjects As ICollection(Of T)) As ReadOnlyCollection(Of MonitoringRule)

Type Parameters

T

Must be of type PartialMonitoringObject.

Parameters

monitoringObjects
ICollection<T>

The monitoring reports that target these specified monitoring object instances.

Returns

A collection of Rule objects.

Attributes

Exceptions

monitoringObjects is null

There was invalid data in the database corresponding to this method call.

Applies to