0 Replies Latest reply on Nov 30, 2012 10:17 AM by 671265

    How to clear alert when a null value is returned for a metric column?

      Hey all,

      Recently, I've encountered a problem about clearing alert when a null value is returned for a metric column. From Oracle official doc, it seems that NO_CLEAR_ON_NULL could be used for this propose. However, it doesn't.

      Here is the line from doc, you can see when NO_CLEAR_ON_NULL is set as FALSE, the null value will clear alert, and the default value for NO_CLEAR_ON_NULL is FALSE.
      NO_CLEAR_ON_NULL: This attribute is used to control severity clearing when a null value is returned for a metric column. It defaults to FALSE with the behavior that a null value ends up clearing previous alert severities. With a TRUE value for this attribute, null values will be skipped in severity evaluations without clearing the severity. 
      TRUE | FALSE (default)
      STATELESS_ALERTS: This attribute if set to TRUE indicates to EM that alerts on this
      column will not have corresponding clears. This allows the UI to decide whether to
      allow users to manually clear alerts on this column.
      TRUE | FALSE (default)
      Here is my code for the metric,
      -- meta definition
        <Metric NAME="Flushing_Table_Overtime" TYPE="TABLE" HELP="NO_HELP">
            <Label NLSID="mmd_ip">Flushing Table Overtime</Label>
            <ColumnDescriptor NAME="State" TYPE="STRING" IS_KEY="FALSE">
                <Label NLSID="mmd_rc_State">State</Label>
            <ColumnDescriptor NAME="Time_Seconds" TYPE="NUMBER" IS_KEY="FALSE">
                <Label NLSID="mmd_fto_Time_Seconds">Flush Table consume Seconds</Label>
            <GetTable NAME="MysqlProcessAggregate"/>
            <GetView NAME="v_flushing_tables" FROM_TABLE="MysqlProcessAggregate">
              <Column NAME="State" />
              <Column NAME="Time_Seconds" />
              <Filter COLUMN_NAME="State" OPERATOR="EQ">Flushing tables</Filter>
      -- coll definition
        <CollectionItem NAME="Flushing_Table_Overtime">
            <IntervalSchedule INTERVAL="10" TIME_UNIT="Min" />
          <MetricColl NAME="Flushing_Table_Overtime">
            <Condition COLUMN_NAME="Time_Seconds"
                       CRITICAL="30" OPERATOR="GT"
                       MESSAGE="There is a Flushing Table command has exceeded %critical_threshold% seconds."
                       MESSAGE_NLSID="msg_Flushing_Table_Overtime" />
      If this feature can not be achieved by coding XML, then is there a way to clear alert with Oracle Package? I have confirm neither sysman.em_severity.delete_current_severity nor sysman.em_severity.clear_alerts could do it.

      Would anyone give me a hint?
      Thanks in advance!

      Best wishes,