Compartir a través de


ConnectorFrameworkProxy.GetMonitoringAlertsWithBookmarkWithBatchSize Method (Guid, DateTime, Int32)

 

Applies To: Operations Manager for System Center 2012

Gets alerts for the specified monitoring connector. You also specify a timestamp bookmark, and all alerts with a timestamp after the bookmark will be returned.

Namespace:   Microsoft.EnterpriseManagement.ConnectorFramework
Assembly:  Microsoft.EnterpriseManagement.OperationsManager (in Microsoft.EnterpriseManagement.OperationsManager.dll)

Syntax

public ConnectorMonitoringAlert[] GetMonitoringAlertsWithBookmarkWithBatchSize(
    Guid connectorId,
    DateTime utcBookmarkTime,
    int batchSize
)
public:
array<ConnectorMonitoringAlert^>^ GetMonitoringAlertsWithBookmarkWithBatchSize(
    Guid connectorId,
    DateTime utcBookmarkTime,
    int batchSize
)
member GetMonitoringAlertsWithBookmarkWithBatchSize : 
        connectorId:Guid *
        utcBookmarkTime:DateTime *
        batchSize:int -> ConnectorMonitoringAlert[]
Public Function GetMonitoringAlertsWithBookmarkWithBatchSize (
    connectorId As Guid,
    utcBookmarkTime As Date,
    batchSize As Integer
) As ConnectorMonitoringAlert()

Parameters

  • connectorId
    Type: System.Guid

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

  • utcBookmarkTime
    Type: System.DateTime

    A timestamp bookmark. All alerts with a timestamp prior to this will be returned.

  • batchSize
    Type: System.Int32

    The approximate maximum batch size to return.

Return Value

Type: Microsoft.EnterpriseManagement.ConnectorFramework.ConnectorMonitoringAlert[]

Returns an Array of ConnectorMonitoringAlert objects, limited by the batchSize parameter, that contain the alerts for the specified monitoring connector.

Remarks

This method gets all alerts assigned to a specific monitoring connector after the specified bookmark date and time.

The batchSize limitation allows you to perform the get monitoring alerts operation in small batches, thereby avoiding a timeout failure.

It is good practice to limit the number of alerts obtained by a single call. When you perform this GetMonitoringAlertsWithBookmarkWithBatchSize 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.

See Also

ConnectorFrameworkProxy Class
Microsoft.EnterpriseManagement.ConnectorFramework Namespace

Return to top