<!-- $Header: emdb/sysman/admin/default_collection/rac_database.xml /st_emdbsa_11.2/5 2009/06/27 11:16:32 pardutta Exp $
   MODIFIED    (MM/DD/YY)
      gapadman  06/26/09 - fix wlm psm metric alert
      rsamaved  03/27/09 - fix wlm metric name
      rsamaved  05/08/08 - add 11gR2 version
      sadattaw  05/08/08 - add alert on status for service performance
      dchakumk  03/10/08 - XbranchMerge dchakumk_6752_xbmsrc from
                           st_emdbsa_11.1
      gapadman  01/02/08 - Adding WLM Metrics
      sadattaw  03/14/07 - fix threshold def for service_performance metric
      kramarat  01/12/07 - XbranchMerge kramarat_cluster_db_services_fix from
                           main
      sadattaw  01/11/07 - removing avg resp & throughput thresholds for
                           service_performance metric
      sadattaw  11/16/06 - adding thresholds for service_performance metric
      sadattaw  10/19/06 - 
      kdas      04/26/06 - support Global aDDM 
      pbantis   04/20/05 - Add db_init_params to oracle_racconfig. 
      rreilly   02/21/05 - remove controlfiles_size 
      ysun      02/15/05 - use include mechanism
      ysun      02/01/05 - update cardinality              
      xshen     01/17/05 - add db_options metric
      rreilly   01/24/05 - add audit_failed_logins metric
      yma       01/11/05 - bug 4095025
      rreilly   11/11/04 - add tbspAllocation metric 
      rreilly   11/04/04 - bug 3978294 fix db_tablespaces collection 
      gallison  10/29/04 - DG Support 
      ysun      10/13/04 - across target reference
      dkjain    10/08/04 - ESA 10gR2 impl 
      pbantis   10/01/04 - Add more HA collections. 
      rreilly   09/28/04 - default threshold comparator for problemTbsp metric 
                           to GE 
      ysun      09/21/04 - update active sessions metric
      ysun      09/15/04 - add database level active sessions
      rreilly   08/24/04 - collect db_datafiles 
      rreilly   08/12/04 - bug 32646676 remove Invalid Objects metric 
      rreilly   07/28/04 - enh 3062024 tblspc free space (mb) 
      rreilly   07/27/04 - collect polices weekly 
      ychan     07/12/04 - Remove 10gBeta 
      jochen    05/26/04 - Add 10gR2 
      jochen    05/26/04 - Add param to StgPerf 
      sbadrina  05/06/04 - 
      abodge    11/03/03 - Add Storage, Objects metrics to RAC 
      jochen    10/27/03 - Add stgPerf wastedSpace 
      jsoule    10/04/03 - support beta2 and release 
      ysun      10/08/03 - add UserBlock
      xshen     10/02/03 - rename config snapshot type name 
      gallison  09/30/03 - 
      eujang    10/01/03 - Changed security to oracle_security for snapshot type
      eujang    09/22/03 - ESM integration 
      pbantis   09/18/03 - Remove upload_on_fetch for HA collections. 
      jstone    09/12/03 - feature usage interval is 24 hrs 
      jsoule    08/27/03 - Add Recovery_Area data, problemTbsp reversion
      kmckeen   08/20/03 - Add tbspc space-used metric for 10i db dictionary 
                           mngd tbspc 
      ysun      08/11/03 - add suspended sessions alert
-->

<!DOCTYPE TargetCollection SYSTEM "../dtds/TargetCollection.dtd"[
<!ENTITY database_schedules SYSTEM "./database.xmlp">
]>

<TargetCollection TYPE="rac_database">

  <!--
  ======================================================================
  == Collection Levels:
  ==   Minimum:     Those which are essential and are enabled out-of-the-box.
  ==   Recommended: Those which are important, but either aren't essential
  ==                or require additional configuration.
  ==   Complete:    All metrics (including ones of a traditional, but at
  ==                times misleading, nature).
  ======================================================================
    -->
  <CollectionLevel NAME="Recommended"/>

    &database_schedules;

  <!--
  ======================================================================
  == Category: User Block 
  == Fetchlet: SQL
  ======================================================================
    -->
  <CollectionItem NAME="UserBlock" UPLOAD="NO">
    <Schedule>
      <IntervalSchedule INTERVAL="5" TIME_UNIT="Min"/>
    </Schedule>

    <MetricColl NAME="UserBlock">

      <!--
      ==================================================================
      == Alert: Blocking Session Count
      ==================================================================
        -->
      <Condition COLUMN_NAME="count"
                 WARNING="0" OPERATOR="GT"
                 OCCURRENCES="3"
                 MESSAGE="Session %sid% blocking %value% other sessions for all instances."
                 MESSAGE_NLSID="rac_UserBlock_count_alertmessage" />
    </MetricColl>

  </CollectionItem>

  <!--
  ======================================================================
  == Category: RAC Cardinality
  == Fetchlet: SQL
  ======================================================================
    -->
  <CollectionItem NAME="cardinality" UPLOAD="NO">
    <Schedule>
      <IntervalSchedule INTERVAL="5" TIME_UNIT="Min"/>
    </Schedule>

    <MetricColl NAME="cardinality">

      <!--
      ==================================================================
      == Alert: active instance count
      ==================================================================
        -->
      <Condition COLUMN_NAME="instance_count"
                 CRITICAL="NotDefined" WARNING="NotDefined" OPERATOR="LT"
                 MESSAGE="%value% instance(s) out of %total_count% are up."
                 MESSAGE_NLSID="cardinality_alertmessage" />
    </MetricColl>

  </CollectionItem>


<!-- Policy Collection: oracle_racconfig                             -->
<!-- Description: Collects data for raw metrics that have been       -->
<!--              defined for the configuration policies and are     -->
<!--              available for rac instances.                       -->
<!-- NOTE: This is for rac_database type only, db instances will     -->
<!--       use the oracle_dbconfig definition located in             -->
<!--       instance.xmlp.  The rac version of this collection        -->
<!--       is missing only db_sga. Need db_init_params for policies. -->  
<!-- NOTE: db_datafiles is no longer used by the Policies, but       -->
<!--       the data is still used in EM, so it must be collected.    -->
  <CollectionItem NAME="oracle_racconfig" UPLOAD_ON_FETCH="TRUE" CONFIG="TRUE">
     <Schedule>
      <IntervalSchedule INTERVAL = "24" TIME_UNIT = "Hr"/>
     </Schedule>

     <MetricColl NAME="db_init_params"/>
     <MetricColl NAME="db_tablespaces"/>
     <MetricColl NAME="db_datafiles"/>
     <MetricColl NAME="db_controlfiles"/>
     <MetricColl NAME="db_redoLogs"/>
     <MetricColl NAME="db_rollback_segs"/>
     <MetricColl NAME="db_license"/>
     <MetricColl NAME="db_options"/>
     <MetricColl NAME="db_dbNInstanceInfo"/>

     <MetricColl NAME="ha_info"/>
     <MetricColl NAME="ha_rman_config"/>

  </CollectionItem>
  <!-- End of db configuration collection -->
    <CollectionItem NAME="latest_db_hdm_findings_coll_item"  UPLOAD_ON_FETCH="TRUE">
    <Schedule>
      <IntervalSchedule INTERVAL="15" TIME_UNIT="Min"/>
    </Schedule>
     <MetricColl NAME="latest_hdm_db_metric_helper"/>
     <MetricColl NAME="latest_hdm_db_findings"/>
  </CollectionItem>

  
  <!-- service performance
  ======================================================================
  == Category: Service - 10i
  == Fetchlet: SQL
  ======================================================================
    -->
  <CollectionItem NAME="service_performance">
    <ValidIf>
      <CategoryProp NAME="VersionCategory" CHOICES="10gR1;10gR2;10gR203;11gR1;11gR2"/>
    </ValidIf>
    <Schedule>
        <IntervalSchedule INTERVAL="5" TIME_UNIT="Min"/>
    </Schedule>
    <MetricColl NAME="service_performance">

    <!--
    ====================================================================
    == Alert: CPU Load % for the service
    ====================================================================
      -->
    <Condition COLUMN_NAME="cpuload"
               CRITICAL="NotDefined" WARNING="NotDefined" OPERATOR="GT"
               MESSAGE="CPU Load Percent %value% for service %name% exceeds the thresholds set."
               MESSAGE_NLSID="service_performance_alertmessage"
               CLEAR_MESSAGE="CLEARED - CPU Load Percent %value% for service %name% exceeds the thresholds set."
               CLEAR_MESSAGE_NLSID="service_performance_alertmessage_clear" />

    <!--
    ====================================================================
    == Alert: Service status
    ====================================================================
      -->
    <Condition COLUMN_NAME="status"
               CRITICAL="Down" WARNING="NotDefined" OPERATOR="EQ"
               MESSAGE="Service %name% is Down."
               MESSAGE_NLSID="service_perf_stat_alertmessage"
               CLEAR_MESSAGE="CLEARED - Service %name% is Down."
               CLEAR_MESSAGE_NLSID="service_perf_stat_alertmessage_clear" />
    </MetricColl>

  </CollectionItem>

  <CollectionItem NAME="qos_psm" UPLOAD="YES">
      <Schedule>
          <IntervalSchedule INTERVAL="5" TIME_UNIT="Min"/>
      </Schedule>
      <MetricColl NAME="qos_psm">
          <Condition COLUMN_NAME="NEG_PSM_DURATION" 
                     CRITICAL="NotDefined" 
                     WARNING="NotDefined" 
                     OPERATOR="GT" 
                     OCCURRENCES="3" 
                     MESSAGE="Negative PSM Duration value %value% for Performance Class %PC% has crossed the threshold." 
                     MESSAGE_NLSID="psm_alertmessage"
                     CLEAR_MESSAGE="CLEARED - Negative PSM Duration value %value% for Performance Class %PC% has crossed the threshold." 
                     CLEAR_MESSAGE_NLSID="psm_alertmessage_clear"/>
      </MetricColl>
  </CollectionItem>

</TargetCollection>
