clear_stateless_alerts

Clears the stateless alerts associated with the specified target. Only a user can clear these stateless alerts; the Enterprise Manager Agent does not automatically clear these alerts. To find the metric internal name associated with a stateless alert, use the get_metrics_for_stateless_alerts verb.

You cannot use this command to clear stateless alerts associated with diagnostic incidents. You can only clear these alerts in the Enterprise Manager console by clearing their associated Incident or Problem.

Format

emcli clear_stateless_alerts        -older_than=number_in_days        -target_type=target_type        -target_name=target_name        [-include_members]        [-metric_internal_name=target_type_metric:metric_name:metric_column]        [-unacknowledged_only]        [-ignore_notifications]        [-preview]

[ ]  indicates that the parameter is optional

Options

  • older_than

    Specify the age of the alert in days. (Specify 0 for currently open stateless alerts.)

  • target_type

    Internal target type identifier, such as host, oracle_database, and emrep.

  • target_name

    Name of the target.

  • include_members

    Applicable for composite targets to examine alerts belonging to members as well.

  • metric_internal_name

    Metric to be cleaned up. Use the get_metrics_for_stateless_alerts verb to see a complete list of supported metrics for a given target type.

  • unacknowledged_only

    Only clear alerts if they are not acknowledged.

  • ignore_notifications

    Use this option if you do not want to send notifications for the cleared alerts. This may reduce the notification sub-system load.

  • preview

    Shows the number of alerts to be cleared on the target(s).

Example

This example clears alerts generated from the database alert log over a week old. In this example, no notifications are sent when the alerts are cleared.

emcli clear_stateless_alerts -older_than=7 -target_type=oracle_database -tar 
get_name=database -metric_internal_name=oracle_database:alertLog:genericErrStack -ignore_notifications