Gets alerts marked for the monitoring connector. Namespace: Microsoft.EnterpriseManagement.ConnectorFramework
Assembly: Microsoft.EnterpriseManagement.OperationsManager (in microsoft.enterprisemanagement.operationsmanager.dll)

Usage

Visual Basic
Dim instance As ConnectorFrameworkProxy
Dim connectorId As Guid
Dim batchSize As Integer
Dim returnValue As ConnectorMonitoringAlert()

returnValue = instance.GetMonitoringAlertsWithBatchSize(connectorId, batchSize)

Syntax

Visual Basic
Public Function GetMonitoringAlertsWithBatchSize ( _
		connectorId As Guid, _
		batchSize As Integer _
) As ConnectorMonitoringAlert()
C#
public ConnectorMonitoringAlert[] GetMonitoringAlertsWithBatchSize (
		Guid connectorId,
		int batchSize
)
C++
public:
array<ConnectorMonitoringAlert^>^ GetMonitoringAlertsWithBatchSize (
		Guid connectorId, 
		int batchSize
)
J#
public ConnectorMonitoringAlert[] GetMonitoringAlertsWithBatchSize (
		Guid connectorId, 
		int batchSize
)
JScript
public function GetMonitoringAlertsWithBatchSize (
		connectorId : Guid, 
		batchSize : int
) : ConnectorMonitoringAlert[]

Parameters

connectorId

The globally unique identifier (GUID) for the monitoring connector to get alerts for.

batchSize

The approximate maximum batch size to return.

Return Value

An array of ConnectorMonitoringAlert objects, limited to the batchSize parameter, that contain the alerts for the specified monitoring connector.

Remarks

This method will only retrieve up to the number of alerts that are specified by the batchSize parameter. This limitation allows you to perform the get monitoring alerts operation in small batches, thereby avoiding a time-out failure.

It is good practice to limit the number of alerts obtained by a single call. When you perform this GetMonitoringAlertsWithBatchSize method you should check to see if the count property of the returned collection equals or exceeds the batchSize. If the count property of the returned collection equals or exceeds the batchSize then you should acknowledge the alerts received, and call this function again to get the next batch of alerts. Only when the returned collection is smaller than the batchSize can you be sure that you have received all of the alerts.

This method gets alerts only from the bookmark date to the current time less 30 seconds.

After you get the Monitoring alert, you need to acknowledge that alert with an AcknowledgeMonitoringAlerts. Failure to acknowledge an alert will result in subsequent calls to get new alerts returning the already received alerts.


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.

Platforms

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