Partager via


MonitoringConnector.GetMonitoringAlertsForTiers Method (Int32, IList)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets alerts marked for the monitoring connector, for each tiered Management Group. The retrieved array is limited to the batchSize parameter. The failures that occurred for the configured tiers are returned along with the alerts.

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

Usage

'Usage
Dim instance As MonitoringConnector
Dim batchSize As Integer
Dim failures As IList(Of ConnectorTieredOperationFailure)
Dim returnValue As ReadOnlyCollection(Of ConnectorMonitoringAlert)

returnValue = instance.GetMonitoringAlertsForTiers(batchSize, failures)

Syntax

'Declaration
Public Function GetMonitoringAlertsForTiers ( _
    batchSize As Integer, _
    <OutAttribute> ByRef failures As IList(Of ConnectorTieredOperationFailure) _
) As ReadOnlyCollection(Of ConnectorMonitoringAlert)
public ReadOnlyCollection<ConnectorMonitoringAlert> GetMonitoringAlertsForTiers (
    int batchSize,
    out IList<ConnectorTieredOperationFailure> failures
)
public:
ReadOnlyCollection<ConnectorMonitoringAlert^>^ GetMonitoringAlertsForTiers (
    int batchSize, 
    [OutAttribute] IList<ConnectorTieredOperationFailure^>^% failures
)
public ReadOnlyCollection<ConnectorMonitoringAlert> GetMonitoringAlertsForTiers (
    int batchSize, 
    /** @attribute OutAttribute() */ /** @ref */ IList<ConnectorTieredOperationFailure> failures
)

Parameters

  • batchSize
    The approximate max batch size to return.
  • failures
    The array of failures that may have occurred for various tiers

Return Value

Returns a ReadOnlyCollection of ConnectorMonitoringAlert objects 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.

This method only gets alerts that are marked for the monitoring connector from the bookmark time to the current time less 30 seconds.

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

After you retrieve the monitoring alert, you need to acknowledge that alert with an AcknowledgeMonitoringAlerts or one of the overloaded methods. Failure to acknowledge an alert will result in subsequent calls to get new alerts returning the already received alerts.

This method only gets alerts that are marked for the monitoring connector from the bookmark time to the current time less 30 seconds.

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 Vista, Windows Server 2003, and

Target Platforms

See Also

Reference

MonitoringConnector Class
MonitoringConnector Members
Microsoft.EnterpriseManagement.ConnectorFramework Namespace